AlarmSystem with appdaemon

Yes like this. That’s good, the entity has been taken by the alarm app.

Now can you show the events in HA when you press a button on your switch?

1 Like

I don’t understand why it does not Auto arm or disarm based on device trackers. That works for me just fine.

The buttons also stopped working for me. I always thought that my batteries are empty. Can you check if home assistant create appropriate events?

2019-10-08 20:46:44 DEBUG (Thread-3) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'sensor_switch.aq3', 'sid': '158d00029086fb', 'short_id': 167, 'data': '{"status":"double_click"}'}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Switch_158d00029086fb: off>: {'status': 'double_click'}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event xiaomi_aqara.click[L]: entity_id=binary_sensor.switch_158d00029086fb, click_type=double>
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.switch_158d00029086fb, old_state=<state binary_sensor.switch_158d00029086fb=off; last_action=None, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>, new_state=<state binary_sensor.switch_158d00029086fb=off; last_action=double, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>>
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2943710896] Sending {'id': 16, 'type': 'event', 'event': {'event_type': 'xiaomi_aqara.click', 'data': {'entity_id': 'binary_sensor.switch_158d00029086fb', 'click_type': 'double'}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 10, 8, 17, 46, 44, 96766, tzinfo=<UTC>), 'context': {'id': 'f4fd3001d6ac4585be3056f504c69ded', 'parent_id': None, 'user_id': None}}}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2943710896] Sending {'id': 16, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'binary_sensor.switch_158d00029086fb', 'old_state': <state binary_sensor.switch_158d00029086fb=off; last_action=None, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>, 'new_state': <state binary_sensor.switch_158d00029086fb=off; last_action=double, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 10, 8, 17, 46, 44, 99524, tzinfo=<UTC>), 'context': {'id': '967c3d2485944e1eb5fbfc699cd3fc0c', 'parent_id': None, 'user_id': None}}}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2951529200] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=binary_sensor.switch_158d00029086fb, old_state=<state binary_sensor.switch_158d00029086fb=off; last_action=None, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>, new_state=<state binary_sensor.switch_158d00029086fb=off; last_action=double, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>>}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2963441584] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=binary_sensor.switch_158d00029086fb, old_state=<state binary_sensor.switch_158d00029086fb=off; last_action=None, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>, new_state=<state binary_sensor.switch_158d00029086fb=off; last_action=double, battery_level=31.0, friendly_name=Switch_158d00029086fb @ 2019-10-08T20:46:19.895510+03:00>>}
2019-10-08 20:46:44 DEBUG (Thread-3) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'sensor_switch.aq3', 'sid': '158d00029086fb', 'short_id': 167, 'data': '{"status":"double_click"}'}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Switch_158d00029086fb: off>: {'status': 'double_click'}
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event xiaomi_aqara.click[L]: entity_id=binary_sensor.switch_158d00029086fb, click_type=double>
2019-10-08 20:46:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2943710896] Sending {'id': 16, 'type': 'event', 'event': {'event_type': 'xiaomi_aqara.click', 'data': {'entity_id': 'binary_sensor.switch_158d00029086fb', 'click_type': 'double'}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 10, 8, 17, 46, 44, 910987, tzinfo=<UTC>), 'context': {'id': 'b3d94ef85e0d4f339e0f48fc1cf8f04f', 'parent_id': None, 'user_id': None}}}

u using snmp tracker ? cos its arm for me nicely.

Your switch triggers an event ‘xiaomi_aqara.click’, but the app listens for the event ‘click’.

Try changing ‘click’ to ‘xiaomi_aqara.click’ in lines 101, 103 and 105 of the alarm.py file and see if it works.

1 Like

That should definitely work I suppose sometime ago home assistant changed the event name.

1 Like

any idea why not_home is not taken into account but home state of device tracker? how can I narrow this down?

Have you waited long enough?
not_home will trigger after 15 minutes but home will trigger immediately

mine triggers after a shorter time. I gues your app listens to the devoce tracker entity? it’s not_home … all my other automation based on this state trigger but your app does not recognize this not_home state.

tx man this helps a lot

I have updated the alarm.py in my github repo accordingly.

1 Like

@runningman84 I have a queston … i’d like to use person instead of device_tracker… what parts do i need to adjust then?

Just use a person entity instead of a device tracker in the device tracker list.

I SET UP TELEGRAM NOTIFICATION
BUT IM GETTING TO MUCH SNAPSHOTS WHEN nothing going on ?

2020-03-12 13:11:22.037302 INFO alarm_system: Camera snapshot 50 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131120700839.jpg
2020-03-12 13:11:22.062441 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_131115015126.jpg
2020-03-12 13:11:22.067343 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_131115015126.jpg to user_id XXXXXXX
2020-03-12 13:11:22.574566 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131120700839.jpg
2020-03-12 13:11:22.583254 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131120700839.jpg to user_id XXXXXXX
2020-03-12 13:15:19.038826 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 39.13->38.97
2020-03-12 13:16:28.244983 INFO alarm_system: Camera snapshot 51 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131627781780.jpg
2020-03-12 13:16:28.291165 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_131622017741.jpg
2020-03-12 13:16:28.295800 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_131622017741.jpg to user_id XXXXXXX
2020-03-12 13:16:28.752706 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131627781780.jpg
2020-03-12 13:16:28.757139 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_131627781780.jpg to user_id XXXXXXX
2020-03-12 13:19:20.042002 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 38.97->38.79
2020-03-12 13:21:34.198976 INFO alarm_system: Camera snapshot 52 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132133731795.jpg
2020-03-12 13:21:34.258611 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_132128020750.jpg
2020-03-12 13:21:34.264252 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_132128020750.jpg to user_id XXXXXXX
2020-03-12 13:21:34.739174 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132133731795.jpg
2020-03-12 13:21:34.743560 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132133731795.jpg to user_id XXXXXXX
2020-03-12 13:23:20.044647 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 38.79->38.61
2020-03-12 13:26:40.252784 INFO alarm_system: Camera snapshot 53 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132639766623.jpg
2020-03-12 13:26:40.292720 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_132634017222.jpg
2020-03-12 13:26:40.298430 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_132634017222.jpg to user_id XXXXXXX
2020-03-12 13:26:40.774314 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132639766623.jpg
2020-03-12 13:26:40.779964 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_132639766623.jpg to user_id XXXXXXX
2020-03-12 13:27:20.032231 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 38.61->38.41
2020-03-12 13:31:21.042060 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 38.41->38.19
2020-03-12 13:31:46.224787 INFO alarm_system: Camera snapshot 54 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133145787786.jpg
2020-03-12 13:31:46.314737 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_133140018999.jpg
2020-03-12 13:31:46.319655 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_133140018999.jpg to user_id XXXXXXX
2020-03-12 13:31:46.757487 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133145787786.jpg
2020-03-12 13:31:46.761756 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133145787786.jpg to user_id XXXXXXX
2020-03-12 13:34:41.432737 INFO light_saver_livingroom: Callback power_on from sensor.illumination_f0b429cc65f0:state 74->81
2020-03-12 13:35:22.038306 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 38.19->37.96
2020-03-12 13:36:52.256920 INFO alarm_system: Camera snapshot 55 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133651695581.jpg
2020-03-12 13:36:52.280355 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_133646015960.jpg
2020-03-12 13:36:52.286563 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_133646015960.jpg to user_id XXXXXXX
2020-03-12 13:36:52.773755 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133651695581.jpg
2020-03-12 13:36:52.777935 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_133651695581.jpg to user_id XXXXXXX
2020-03-12 13:39:22.044076 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 37.96->37.72
2020-03-12 13:41:56.535456 INFO alarm_system: Camera snapshot 56 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134156160067.jpg
2020-03-12 13:41:56.693012 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_134152014302.jpg
2020-03-12 13:41:56.709048 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_134152014302.jpg to user_id XXXXXXX
2020-03-12 13:41:57.122449 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134156160067.jpg
2020-03-12 13:41:57.128374 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134156160067.jpg to user_id XXXXXXX
2020-03-12 13:43:23.023628 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 37.72->37.46
2020-03-12 13:47:03.346449 INFO alarm_system: Camera snapshot 57 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134702921067.jpg
2020-03-12 13:47:03.455817 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_134657016768.jpg
2020-03-12 13:47:03.462174 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_134657016768.jpg to user_id XXXXXXX
2020-03-12 13:47:03.864606 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134702921067.jpg
2020-03-12 13:47:03.869477 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_134702921067.jpg to user_id XXXXXXX
2020-03-12 13:47:23.040165 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 37.46->37.19
2020-03-12 13:51:23.038991 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 37.19->36.91
2020-03-12 13:52:09.106393 INFO alarm_system: Camera snapshot 58 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135208774696.jpg
2020-03-12 13:52:09.284352 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_135203017840.jpg
2020-03-12 13:52:09.288914 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_135203017840.jpg to user_id XXXXXXX
2020-03-12 13:52:09.650041 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135208774696.jpg
2020-03-12 13:52:09.655142 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135208774696.jpg to user_id XXXXXXX
2020-03-12 13:55:24.039068 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 36.91->36.61
2020-03-12 13:57:15.222368 INFO alarm_system: Camera snapshot 59 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135714747343.jpg
2020-03-12 13:57:15.273410 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_135709021099.jpg
2020-03-12 13:57:15.279065 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_135709021099.jpg to user_id XXXXXXX
2020-03-12 13:57:15.753458 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135714747343.jpg
2020-03-12 13:57:15.759675 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_135714747343.jpg to user_id XXXXXXX
2020-03-12 13:59:25.036065 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 36.61->36.3
2020-03-12 14:02:21.064250 INFO alarm_system: Camera snapshot 60 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140220736408.jpg
2020-03-12 14:02:21.261412 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_140215017635.jpg
2020-03-12 14:02:21.265619 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_140215017635.jpg to user_id XXXXXXX
2020-03-12 14:02:21.657034 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140220736408.jpg
2020-03-12 14:02:21.662795 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140220736408.jpg to user_id XXXXXXX
2020-03-12 14:03:25.043314 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 36.3->35.98
2020-03-12 14:07:26.037185 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 35.98->35.64
2020-03-12 14:07:27.210274 INFO alarm_system: Camera snapshot 61 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140726786259.jpg
2020-03-12 14:07:27.314630 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_140721016586.jpg
2020-03-12 14:07:27.320146 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_140721016586.jpg to user_id XXXXXXX
2020-03-12 14:07:27.754311 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140726786259.jpg
2020-03-12 14:07:27.759182 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_140726786259.jpg to user_id XXXXXXX
2020-03-12 14:11:27.036965 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 35.64->35.3
2020-03-12 14:12:33.149109 INFO alarm_system: Camera snapshot 62 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141232760626.jpg
2020-03-12 14:12:33.290504 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_141227020996.jpg
2020-03-12 14:12:33.296546 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_141227020996.jpg to user_id XXXXXXX
2020-03-12 14:12:33.699091 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141232760626.jpg
2020-03-12 14:12:33.703350 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141232760626.jpg to user_id XXXXXXX
2020-03-12 14:15:27.038295 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 35.3->34.94
2020-03-12 14:17:39.167777 INFO alarm_system: Camera snapshot 63 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141738773457.jpg
2020-03-12 14:17:39.301743 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_141733018584.jpg
2020-03-12 14:17:39.306140 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_141733018584.jpg to user_id XXXXXXX
2020-03-12 14:17:39.690183 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141738773457.jpg
2020-03-12 14:17:39.695289 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_141738773457.jpg to user_id XXXXXXX
2020-03-12 14:19:27.042153 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 34.94->34.57
2020-03-12 14:22:45.122476 INFO alarm_system: Camera snapshot 64 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142244728131.jpg
2020-03-12 14:22:45.255264 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_142239009095.jpg
2020-03-12 14:22:45.261429 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_142239009095.jpg to user_id XXXXXXX
2020-03-12 14:22:45.659324 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142244728131.jpg
2020-03-12 14:22:45.663769 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142244728131.jpg to user_id XXXXXXX
2020-03-12 14:23:28.041906 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 34.57->34.19
2020-03-12 14:27:29.044349 INFO light_saver_livingroom: Callback power_on from sun.sun:elevation 34.19->33.8
2020-03-12 14:27:51.099563 INFO alarm_system: Camera snapshot 65 stored as /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142750734488.jpg
2020-03-12 14:27:51.262654 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.entrance_20200312_142745015725.jpg
2020-03-12 14:27:51.274746 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.entrance_20200312_142745015725.jpg to user_id XXXXXXX
2020-03-12 14:27:51.649222 INFO alarm_system: Callback camera_snapshot_stored_callback from folder_watcher:created /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142750734488.jpg
2020-03-12 14:27:51.654371 INFO alarm_system: Sending photo /config/image_snapshot/camera_snapshot_camera.camera_zal_20200312_142750734488.jpg to user_id XXXXXXX

what trigger snapshot ?

I do not know your full setup. In my case a doods image processor creates snapshot images once it finds a person. This image is then send via telegram.

1 Like

can this be adjusted to a manual arm and disarm instead of proximity?

If you do not specify trackers it will not arm or disarm automatically…

thats exactly what i want. i want to have to press button to arm and enter a pin to disarm.

Hi, from sometimes your AlarmSystem seem do not works, it happens probably after upgrade to 0.114.2… and changed from zigbee2mqtt to ZHA for my xiaomi zigbee devices.
Now I’m at v.0.117.3
I use Appdaemon 3 v. 5.0.1
if I change status from developes tools from “disarm” to “arm_home” or “arm_away” it do not arm the alarm, it do not go in “pending” mode, it do not go in “trigger” mode if I open a windows or a door.
It isn’t unable to change on xiaomi light too (light.xiaomi_gateway_light).
What could be happened?

Appdaemon 3 show me this error:

2020-11-12 18:33:01.231846 WARNING AppDaemon: ------------------------------------------------------------
2020-11-12 18:33:01.232062 WARNING AppDaemon: Unexpected error in worker for App alarm_system:
2020-11-12 18:33:01.232317 WARNING AppDaemon: Worker Ags: {‘name’: ‘alarm_system’, ‘id’: UUID(‘8f99a447-92cd-4c19-83d4-fb1469d6aeeb’), ‘type’: ‘attr’, ‘function’: <bound method AlarmSystem.alarm_state_disarmed_callback of <alarm.AlarmSystem object at 0x7f13214a5340>>, ‘attribute’: ‘state’, ‘entity’: ‘alarm_control_panel.ha_alarm’, ‘new_state’: ‘disarmed’, ‘old_state’: ‘triggered’, ‘kwargs’: {‘new’: ‘disarmed’, ‘handle’: UUID(‘3071c751-d218-453a-a16a-4798abd27d80’)}}
2020-11-12 18:33:01.232443 WARNING AppDaemon: ------------------------------------------------------------
2020-11-12 18:33:01.232839 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/appdaemon/appdaemon.py”, line 594, in worker
funcref(entity, attr, old_state, new_state,
File “/config/appdaemon/apps/alarm.py”, line 464, in alarm_state_disarmed_callback
self.call_service(“xiaomi_aqara/stop_ringtone”,
File “/usr/lib/python3.8/site-packages/appdaemon/plugins/hass/hassapi.py”, line 22, in func_wrapper
return func(*args, **kwargs)
File “/usr/lib/python3.8/site-packages/appdaemon/plugins/hass/hassapi.py”, line 522, in call_service
r.raise_for_status()
File “/usr/lib/python3.8/site-packages/requests/models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://192.168.1.2:8123/api/services/xiaomi_aqara/stop_ringtone