I’ve a problem with my Home Assistant, IFTTT and the component IFTTT Alarm Control Panel.
Since IFTTT have changed and now used Webhook instead API Password.
I’ve seen that we need now to create an automation to exchange with IFTTT an then execute action with something like that.
I have setup 3 applets in IFTTT to arm/disarm/arming home the alarm.
How can I update the status of the alarm every time the alarm changes status.
I am missing these next steps:
IF the alarm system was disarmed, THEN perform a Webhook POST web request to url https://HASS_URL/api/services/alarm_control_panel/ifttt_push_alarm_state?api_password=API_PASSWORD with content type application/json and body {"entity_id": "alarm_control_panel.DEVICE_NAME", "state": "disarmed"}.
IF the alarm system state changed to armed home, THEN perform a Webhook POST web request to url https://HASS_URL/api/services/alarm_control_panel/ifttt_push_alarm_state?api_password=API_PASSWORD with content type application/json and body {"entity_id": "alarm_control_panel.DEVICE_NAME", "state": "armed_home"}.
IF the alarm system state changed to armed away, THEN perform a Webhook POST web request to url https://HASS_URL/api/services/alarm_control_panel/ifttt_push_alarm_state?api_password=API_PASSWORD with content type application/json and body {"entity_id": "alarm_control_panel.DEVICE_NAME", "state": "armed_away"}.
IF the alarm system state changed to armed night, THEN perform a Webhook POST web request to url https://HASS_URL/api/services/alarm_control_panel/ifttt_push_alarm_state?api_password=API_PASSWORD with content type application/json and body {"entity_id": "alarm_control_panel.DEVICE_NAME", "state": "armed_night"}.
I am doing the same as you, this stopped working since upgrading to the latest version of HA. I would guess the syntax of the call has changed but haven’t had the time to test (alternatively i could be completely wrong and something else is at play.
Neither.
The documentation is not 100% correct.
You have to use the integration with ifttt and then you have to use the url there.
Do not use the url that is in the documentation to update the status.
I have been trying to figure the Alarm Control panel. I have succeeded in communicating from IFTTT to Home assistant with ease. But can’t get to get it to work the other way around. Should I have a script in automation for it or something else?
Also when is restart the HA the status is unknown is there a way to request the status, don’t seem like possible in IFTTT.
I’m struggling to get this working.
I’ve setup IFTTT, Webhooks and my automation.yaml file as you guys antoine_g and 03397 already pointed out in this topic.
My IFTTT Content type is Application/json and Body is set to:
{ “action”: “call_service”, “service”: “ifttt_push_alarm_state”, “entity_id”: “alarm_control_panel.XXXXX”, “state”: “armed_away” }
…tried even…
{ “action”: “call_service”, “service”: “alarm_control_panel.ifttt_push_alarm_state”, “entity_id”: “alarm_control_panel.XXXXX”, “state”: “armed_away” }
My automation.yaml is
Logger: homeassistant.components.ifttt
Source: components/ifttt/init.py:98
Integration: ifttt (documentation, issues)
First occurred: 10:15:23 PM (3 occurrences)
Last logged: 10:28:46 PM
Received invalid data from IFTTT. Data needs to be formatted as JSON: { “action”: “call_service”, “service”: “alarm_control_panel.ifttt_push_alarm_state”, “entity_id”: “alarm_control_panel.XXXXXXX”, “state”: “armed_away” }
Could someone point me into the right direction? I have no clue how to solve this.
Logger: homeassistant.components.ifttt
Source: components/ifttt/init.py:98
Integration: ifttt (documentation, issues)
First occurred: 1:40:42 PM (1 occurrences)
Last logged: 1:40:42 PM
Received invalid data from IFTTT. Data needs to be formatted as JSON: { “action”: “call_service”, “service”: “ifttt_push_alarm_state”, “entity_id”: “alarm_control_panel.my_house_alarm_name”, “state”: “armed_away” }
Just to understand it correctly and I surely do not miss entering anything:
I have this entry in configuration.yaml:
IFTTT
ifttt:
key: !secret ifttt_key
…Key stored in secrets.yaml but as I understood correctly this will only be triggered if I start something towards IFTTT Webhook
And my IFTTT Webhook is triggered by Google Assistant with the passphrase “Would you”
to
URL: https://xxxxx.duckdns.org/api/webhook/IFTTT key stored also in secrets.yaml like mentioned before
Method: POST
Content type: application/json
Body: { “action”: “call_service”, “service”: “ifttt_push_alarm_state”, “entity_id”: “alarm_control_panel.my_house_alarm_name”, “state”: “armed_away” }
Did I fail to enter something somewhere?
Please advise…I try to figure this out but I’m stuck.
I am having the same problem. I am currently on 0.114.3. I use Nabu Casa for my webhooks url.
This is my IFTTT setup:
Method: POST
Body: { “action”: “call_service”, “service”: “ifttt.push_alarm_state”, "entity_id": "alarm_control_panel.ismart_alarm", "state": "disarmed"}
URL: Nabu Casa generated webhooks URL
Content type: application/json
I know IFTTT is communicating with my HA because I get the following errors when switch states on my iSmart Alarm app:
Received invalid data from IFTTT. Data needs to be formatted as JSON: { “action”: “call_service”, “service”: “ifttt.push_alarm_state”, "entity_id": "alarm_control_panel.ismart_alarm", "state": "disarmed"}
Received invalid data from IFTTT. Data needs to be formatted as JSON: { “action”: “call_service”, “service”: “ifttt.push_alarm_state”, "entity_id": "alarm_control_panel.ismart_alarm", "state": "armed_home"}
Using the alarm control panel on HA works correctly with IFTTT to change the state of my alarm. If I can get some help on getting the updated state sent to HA via IFTTT I would greatly appreciate it.