I've bought the FA21RF/2 (a set of two) for two reasons:
- In case of a smoke alarm (Panic status) send me a Telegram message via my Telegram bot.
- In case of a breach (motion or magnet contact detection) make the smoke detectors sound an alarm.
The two FA's are in master/slave mode and are added as a single KD101 security switch in Domoticz.
Pressing the test button on either one of them raises a Panic status in Domoticz, so communication is going fine for one way.
When I click the button in Domoticz the alarm at both FA's goes off as well, commucations both directions are a-okay.
But for whatever reason I cannot active the alarm via bash/shell.
Simpel test script I wrote:
Code: Select all
$ cat smoke.sh
#!/bin/sh
DOMO_IP="192.168.1.60" # Domoticz IP Address
DOMO_PORT="8080" # Domoticz Port
SMOKE_IDX="518" # Smoke Detectors IDX
/usr/bin/curl --data chat_id=<TELEGRAM ID> --data-urlencode "text=SMOKE ALARM" "https://api.telegram.org/bot<BOT ID>:<BOT KEY>/sendMessage"
sleep 10
/usr/bin/curl -s -i -H "Accept: application/json" http://$DOMO_IP:$DOMO_PORT/json.htm?type=command¶m=resetsecuritystatus&idx=$SMOKE_IDX&switchcmd=Normal
Anyone has an idea what I'm doing wrong?[/ HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *
{
"status" : "ERR"
}
I've read several treads but can't seem to find a good example.
Cheers,
Void.