Howdy everyone. I’m new to Konnected and HA. I’ve already fouled up one install so I’ve re-imaged the Rasp. Pi and started from scratch. Everything is hooked up and HA sees all the sensors. It also registers ‘open’ and 'closed" states almost instantly. While that all works fine and I can arm and disarm, it does not translate an open sensor (door or window) into a triggered alarm. The Pi along with all 4 Konnected boards have static IPs/ports and I’ve indicated that in the config. I’m on v0.91.3. Host OS is v2.11
Do these automations look right? Any suggestions are appreciated. Thanks.
############################
###Konnected Alarm Activation###
- alias: 'Trigger alarm while armed away'
trigger:
- platform: state
entity_id: binary_sensor.laundry_door
to: 'open'
- platform: state
entity_id: binary_sensor.kitchen_1
to: 'open'
- platform: state
entity_id: binary_sensor.kitchen_2
to: 'open'
- platform: state
entity_id: binary_sensor.living_2
to: 'open'
- platform: state
entity_id: binary_sensor.living_3
to: 'open'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm
############################
###Konnected Alarm Siren On###
- alias: 'Activate siren when alarm triggered'
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: 'triggered'
action:
- service: switch.turn_on
entity_id: switch.siren
############################
###Konnected Alarm Siren Off###
- alias: 'Deactivate siren when alarm turned off'
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: 'disarmed'
action:
- service: switch.turn_off
entity_id: switch.siren
The word ACTION and the code below it is indented two extra spaces. This may be preventing the alarm from actually going into the alarmed state. Many times simple syntax can be a real pain to spot and it causes major headaches. Hope this solves your issue.
I don’t think you do either but worth a shot. Also maybe try adding something know to work to the action like create a persistent notification or turn on a light, just to test if the sensors are actually triggering the automation or if it’s the action that’s borked
airbur, In looking at the code for my alarm, I noticed something else in your code. ALL my binary_sensor.{device_name} devices only report ON or OFF, and not OPEN or CLOSED. You may want to check that you are looking for the correct transition value in your initial trigger statements. Other that this, your code looks like it SHOULD work. As a last resort, build a simple test automation and verify one piece of your code at a time. Keep it simple and succinct. Verify that the code does that one thing correctly every time then test the next part. Somewhere along the chain of events, you’ll discover the problem. Good luck.
Binary sensors only report 'on' and 'off' to the backend no matter what they display in the frontend (open/closed, full/empty etc…). Make sure you include the quotes and that you use lower case letters only.