Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarmo stops sending notification after longer Arm Away status #778

Closed
sokarovski opened this issue Jul 31, 2023 · 22 comments
Closed

Alarmo stops sending notification after longer Arm Away status #778

sokarovski opened this issue Jul 31, 2023 · 22 comments
Labels
bug Something isn't working work-in-progress

Comments

@sokarovski
Copy link

sokarovski commented Jul 31, 2023

Alarmo Version

v1.9.10

HA Version

2023.7

Bug description

I have setup a separate zone of Alarmo in my garage with only one PIR sensor. Usually that zone is always armed since i bearly go to the garage. Even if i go it is only for short period of time. In that short periods I dont bother to disarm the alarm and it sends me a notifiocation that there is trigger in the Garage. But after one day of staying in armed state I stop receiving any notifications. If i disarm and arm the alarm again it continues to work.

Steps to reproduce

  1. Arm a zone
  2. Trigger PIR in that zone, wait for the zone to enter Armed state again after triggered state.
    (i think that is optional i think the main problem is longer period of time that is causing the issue)
  3. Wait 24h or more without triggering again.
  4. Try to trigger the alarm it wont send any notifications.

Relevant log output

No response

@sokarovski sokarovski added the bug Something isn't working label Jul 31, 2023
@nielsfaber
Copy link
Owner

Thanks for the bug report.
I don't really understand this issue as there is nothing in the code which should have any time constraints.
But I haven't done any testing with longer idle time as you refer to.
I will plan this test and post you back with the result.

@nielsfaber
Copy link
Owner

Could you give some clarity about whether the alarm does not get triggered (i.e. the alarm entity not going to triggered state) or only the notification not being executed?

@sokarovski
Copy link
Author

sokarovski commented Aug 3, 2023

@nielsfaber The PIR sensor is activating i can see the events in the history. But the alarm state stays Away all the time. Please note that i have two Areas. Main House and Garage. Here is a graph showing exactly what happens.

Screenshot 2023-08-03 at 16 35 09

I dont know how Alarmo is coded, maybe it uses event, maybe cron jobs. Sorry for guessing out, but my guess is that maybe something at midnight is causing this behavior to detach events or crons. I double checked that i dont have any automations active since maybe HA installation is pretty new and i dont have not a single automation active at the moment that can be causing this.

And also shouldnt the master state be returned to Away when the garage area also returns to away?

@nielsfaber
Copy link
Owner

Thanks for sharing this info.
From the picture you sent I see two periods during which the sensor triggers but the alarm does not, all the way at the beginning and from the afternoon on August 1 onwards.
image

Are you certain this sensor is assigned to the garage area?

Am I correctly assuming you configured the alarm to return to armed state after the trigger time has expired?

And also shouldnt the master state be returned to Away when the garage area also returns to away?

This depends on the states of the other areas.
The behaviour is described here.

I will setup some test which enables a dummy sensor for a short moment every ~12 hours, and link it to an area.
This should mimic the same pattern as you have, so in a couple of days I should be able to have reproduced the issue.
I will share the results when I have them.

@sokarovski
Copy link
Author

@nielsfaber while browsing in the history i noted that most of the time this happens there is throttling in the PIR caused by higih movement.

Screenshot 2023-08-03 at 16 35 09

Also disabled notification and disarmed/armed again to see if maybe huge movement combined with notifications is causing the issue.

@sec4563
Copy link

sec4563 commented Aug 4, 2023

I have the same problem, although it triggered the alarm two times as expected until day 4 in away mode. On day 6, three motion sensors in a sensor group fired, but Alarmo stayed in armed mode. Manually disarming Alarmo and arming it again, solves the issue temporarily.

armed

@sokarovski
Copy link
Author

@nielsfaber @sec4563 i am almost positive that this happens because of notifications. I disabled notifications in the actions tab and it looks like it is triggering fine now though only 24 hours passed. I will wait another 24-48 and post the results.

@sokarovski
Copy link
Author

No, it's not the notifications, it happened again even with notifications turned off. It may be because there is high amount of movement.

Screenshot 2023-08-07 at 13 29 15 Screenshot 2023-08-07 at 13 28 26

@nielsfaber
Copy link
Owner

In my own test which activates a sensor every day around 18:00 I have not encountered any failure of triggering the alarm (it runs now for 5 days).
image

The issue seems not very easy to reproduce, at least not as easy as described in the initial bug report.
I cannot think of any relation with notifications as they are handled separately in Alarmo and always occur as consequence of the state change of the alarm entity, so they shouldn't block this.
In my test I have also notification being sent and this has not failed either.

There could be a relation with the amount of sensor activity and of course also with other things happening in HA.
However this makes finding the root cause a challenge, there's also a chance the issue resides in HA itself (Alarmo depends on HA functions, for example for the registration to sensor state changes).

I appreciate the effort you spend into this, let's keep gathering statistics and hopefully pinpoint to the issue.
Note that you could enable the debug logging for Alarmo, for example by adding this to the configuration.yaml (requires restarting HA):

logger:
  default: warning
  logs:
    custom_components.alarmo: debug

This will add quite some spam to your HA logs (be warned), but it should also print a line every time a sensor changes:

2023-08-07 17:28:00.260 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.motion_entrance changed: old_state=closed, new_state=open

It would be very helpful to have the loggings around the time whenever the alarm fails to trigger.

@sokarovski
Copy link
Author

@nielsfaber it happened again. The Debug was printing states of the sensor and alarm in the log, but after the problem happened the log is empty i cannot see the PIRs being active or any problem/exception. Though in history i can see the PIRs continue to be active.

Screenshot 2023-08-09 at 16 14 23

2023-08-08 13:04:33.156 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from armed_away to pending 2023-08-08 13:04:33.156 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm will be triggered after 20 seconds. 2023-08-08 13:04:33.156 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from armed_away to pending 2023-08-08 13:04:33.156 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.master was updated from triggered to pending 2023-08-08 13:04:33.156 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.master is updated from triggered to pending 2023-08-08 13:04:36.479 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:04:36.786 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:04:40.164 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:04:53.157 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_entry_timer_finished 2023-08-08 13:04:53.157 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from pending to triggered 2023-08-08 13:04:53.158 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is triggered! 2023-08-08 13:04:53.158 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from pending to triggered 2023-08-08 13:04:53.158 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.master was updated from pending to triggered 2023-08-08 13:04:53.158 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.master is updated from pending to triggered 2023-08-08 13:07:10.350 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:07:13.892 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:08:00.306 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:08:03.719 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:08:04.836 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:08:11.591 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:09:53.158 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_trigger_timer_finished 2023-08-08 13:09:53.158 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm 'Garage' is armed (armed_away). 2023-08-08 13:09:53.158 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from triggered to armed_away 2023-08-08 13:09:53.160 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from triggered to armed_away 2023-08-08 13:12:51.840 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:12:51.840 INFO (MainThread) [custom_components.alarmo.sensors] Alarm is triggered due to sensor: binary_sensor.garage_pir_1 2023-08-08 13:12:51.840 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from armed_away to pending 2023-08-08 13:12:51.840 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm will be triggered after 20 seconds. 2023-08-08 13:12:51.840 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from armed_away to pending 2023-08-08 13:12:51.840 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.master was updated from triggered to pending 2023-08-08 13:12:51.840 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.master is updated from triggered to pending 2023-08-08 13:12:55.352 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:13:05.742 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:13:08.893 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:13:11.841 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_entry_timer_finished 2023-08-08 13:13:11.841 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from pending to triggered 2023-08-08 13:13:11.841 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is triggered! 2023-08-08 13:13:11.841 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from pending to triggered 2023-08-08 13:13:11.841 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.master was updated from pending to triggered 2023-08-08 13:13:11.841 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.master is updated from pending to triggered 2023-08-08 13:13:19.711 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:13:25.106 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:13:29.739 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:13:32.891 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:13:37.827 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:13:43.824 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:17:52.213 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:17:58.891 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=open, new_state=closed 2023-08-08 13:18:09.276 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.garage_pir_1 changed: old_state=closed, new_state=open 2023-08-08 13:18:11.841 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_trigger_timer_finished 2023-08-08 13:18:11.841 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm 'Garage' is armed (armed_away). 2023-08-08 13:18:11.842 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.garage was updated from triggered to armed_away 2023-08-08 13:18:11.843 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.garage is updated from triggered to armed_away 2023-08-08 14:23:28.624 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Android TV at 192.168.15.15

@sokarovski sokarovski reopened this Aug 9, 2023
@nielsfaber
Copy link
Owner

A small update from my side.
I have left the automated daily sensor triggering running for another week.
From the history I can see that the alarm is triggered every time.
image

I think we can conclude that the issue is not related to a 'longer arm away status' as the initial bug report states.
The issue seems related to a specific usage pattern, possibly the large amount of sensor triggering.
Which also means it will be difficult for me to reproduce and tackle this issue on my own.

The logging you shared suggests that either:

  • Alarmo was not actively watching state changes of the sensor anymore
  • HA failed to forward the triggering of the sensor to Alarmo
  • Alarmo (falsely) concluded the sensor was in the safe state and ignored the trigger

In order to pinpoint which scenario occurred some extra logging info is required.
I made some modifications to the code which add this info (printed in the debug log).
If you could download the attached file and overwrite your local sensors.py file in the custom_components/alarmo directory with this version that would be very helpful.
Note I attached the file as .txt since github doesn't allow direct uploading of .py files, either the extension should be renamed or the contents of the current sensors.py file should be replaced with the content of the changed file.
After changing it, HA needs to be restarted to load the new file.
If something goes wrong or you want to stop debugging, the original file can always be found here https://github.com/nielsfaber/alarmo/blob/v1.9.10/custom_components/alarmo/sensors.py.

Thanks in advance for your willingness to help with this issue.

sensors.txt

@deadly667
Copy link

deadly667 commented Aug 30, 2023

I have got the same behavior but it's not due to long Arm Away rather to when it goes from Armed Away to Triggered and then when it comes back to Armed Away no trigger is detected any more. I "hot fix" it at my system in the way that when it comes from Triggered to Armed Away state that I disarm it and arm it again in Armed Away state and no problems since.

For me it seems that when it comes from Triggered back to Armed Away that it don't detect any states or it cannot go to Triggering state again. It is not connected with the time spent in initial Armed Away state.

@nielsfaber
Copy link
Owner

@deadly667 Are you able to reproduce this in your setup, or is this not always the case?
As I explained in my previous post, I have ran a test for almost 2 weeks where the alarm gets triggered by a sensor and then returns to the armed state. I haven't seen any of the behaviour you describe.
If the scenario is easy to test for you, it would be great if you can get a debug logging of the event. I shared a modified file with extra logging, this should give more insight in the situation.
The reliability of alarmo is most important to me, so I would like to tackle this issue as soon as possible.

@froloffw7
Copy link

Hello, I have the same issue. It seems it doesn't related to the type of arming (home, night, away).
I have setup, similar to the topic starter: motion sensor and magnet door sensor in the garage, which I wish to keep armed all the time. Only door sensor trigger alarms more or less reliable, while motion sensor doesn't.
I installed sensor.txt from above. Attaching here some log from this morning.

2023-09-11 08:46:51.835 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.alarmo is updated from triggered to armed_home
2023-09-11 09:52:14.984 DEBUG (MainThread) [custom_components.alarmo.sensors] async_sensor_state_changed was executed
2023-09-11 09:52:14.984 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.lumi_lumi_sensor_magnet_opening changed: old_state=closed, new_state=open
2023-09-11 09:52:14.985 INFO (MainThread) [custom_components.alarmo.sensors] Alarm is triggered due to sensor: binary_sensor.lumi_lumi_sensor_magnet_opening
2023-09-11 09:52:14.985 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.alarmo was updated from armed_home to triggered
2023-09-11 09:52:14.988 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is triggered!
2023-09-11 09:52:14.995 DEBUG (SyncWorker_8) [custom_components.alarmo.sensors] Stop listening to state changes of the sensors
2023-09-11 09:52:14.996 DEBUG (SyncWorker_8) [custom_components.alarmo.sensors] Start watching for state changes of the following sensors: binary_sensor.lumi_lumi_sensor_magnet_opening,binary_sensor.garage_door
2023-09-11 09:52:14.998 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.alarmo is updated from armed_home to triggered
2023-09-11 09:52:14.998 DEBUG (MainThread) [custom_components.alarmo.automations] Executing automation 1693224095
2023-09-11 09:52:18.162 DEBUG (MainThread) [custom_components.alarmo.sensors] async_sensor_state_changed was executed
2023-09-11 09:52:18.162 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.lumi_lumi_sensor_magnet_opening changed: old_state=open, new_state=closed
2023-09-11 09:53:14.988 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_trigger_timer_finished
2023-09-11 09:53:14.989 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm 'Alarmo' is armed (armed_home).
2023-09-11 09:53:14.989 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.alarmo was updated from triggered to armed_home
2023-09-11 09:53:14.992 DEBUG (SyncWorker_11) [custom_components.alarmo.sensors] Stop listening to state changes of the sensors
2023-09-11 09:53:14.992 DEBUG (SyncWorker_11) [custom_components.alarmo.sensors] Start watching for state changes of the following sensors: binary_sensor.lumi_lumi_sensor_magnet_opening,binary_sensor.garage_door
2023-09-11 09:53:14.995 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.alarmo is updated from triggered to armed_home

Garage

@froloffw7
Copy link

Hello, it seems the reason why the motion sensor doesn't trigger alarm is that for some reason it is absent in the list when alarmo changes state from triggered to armed.

The sequence of events:

  • +00 sec motion trigger alarm, alarmo state was changed from armed_home to triggered.
  • +06 sec door was open
  • +15 sec door was closed
  • +60 sec trigger time expired, alarmo state was changed from triggered to armed_home. Motion sensor is not in the watch list.
2023-09-12 07:47:05.465 DEBUG (MainThread) [custom_components.alarmo.sensors] async_sensor_state_changed was executed
2023-09-12 07:47:05.466 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.motion_garage changed: old_state=closed, new_state=open
2023-09-12 07:47:05.466 INFO (MainThread) [custom_components.alarmo.sensors] Alarm is triggered due to sensor: binary_sensor.motion_garage
2023-09-12 07:47:05.467 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.alarmo was updated from armed_home to triggered
2023-09-12 07:47:05.469 DEBUG (SyncWorker_10) [custom_components.alarmo.sensors] Stop listening to state changes of the sensors
2023-09-12 07:47:05.470 DEBUG (SyncWorker_10) [custom_components.alarmo.sensors] Start watching for state changes of the following sensors: binary_sensor.lumi_lumi_sensor_magnet_opening,binary_sensor.motion_garage
2023-09-12 07:47:05.471 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm is triggered!
2023-09-12 07:47:05.475 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.alarmo is updated from armed_home to triggered
2023-09-12 07:47:05.476 DEBUG (MainThread) [custom_components.alarmo.automations] Executing automation 1693224095
2023-09-12 07:47:11.380 DEBUG (MainThread) [custom_components.alarmo.sensors] async_sensor_state_changed was executed
2023-09-12 07:47:11.380 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.lumi_lumi_sensor_magnet_opening changed: old_state=closed, new_state=open
2023-09-12 07:47:20.250 DEBUG (MainThread) [custom_components.alarmo.sensors] async_sensor_state_changed was executed
2023-09-12 07:47:20.251 DEBUG (MainThread) [custom_components.alarmo.sensors] entity binary_sensor.lumi_lumi_sensor_magnet_opening changed: old_state=open, new_state=closed
2023-09-12 07:48:05.472 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] async_trigger_timer_finished
2023-09-12 07:48:05.473 INFO (MainThread) [custom_components.alarmo.alarm_control_panel] Alarm 'Alarmo' is armed (armed_home).
2023-09-12 07:48:05.473 DEBUG (MainThread) [custom_components.alarmo.alarm_control_panel] entity alarm_control_panel.alarmo was updated from triggered to armed_home
2023-09-12 07:48:05.476 DEBUG (SyncWorker_5) [custom_components.alarmo.sensors] Stop listening to state changes of the sensors
2023-09-12 07:48:05.477 DEBUG (SyncWorker_5) [custom_components.alarmo.sensors] Start watching for state changes of the following sensors: binary_sensor.lumi_lumi_sensor_magnet_opening
2023-09-12 07:48:05.478 DEBUG (MainThread) [custom_components.alarmo.automations] state of alarm_control_panel.alarmo is updated from triggered to armed_home

@nielsfaber
Copy link
Owner

@froloffw7 Thanks a lot for helping out with this!
I think you found some valuable info that may very well explain the bug that is investigated here.

Some important remark to be made here:
When Alarmo reverts to the armed state after being triggered, he does so in force.
This means that any sensors which prevent the (re-)arming will become bypassed.

This is done since it otherwise the arming would fail and the alarm becomes disarmed.
I thought it would be better to have part of the alarm restored than to have it remain disarmed.
But perhaps this behaviour should have been explicitly documented.

From your logging and the previous screenshot of the history, I assume that this has happened for the motion sensor.
The questions that remain are:

  • Is the bypassing actually what happened? Perhaps you could repeat your test and take note of the bypassed_sensors property of the alarm entity?
  • Is the bypassing needed? Could you share a screenshot of the settings of this sensor within Alarmo? If the 'Allow open initially' setting was set, I'd say the sensor has been falsely bypassed: this would be a bug.
  • Is the bypassing desirable? Apparently the current behaviour is not what is expected (unintuitive), so perhaps it should be changed. I am open to discuss some improvement to the behaviour.

@sokarovski @deadly667 Could you confirm whether the automatic bypassing behaviour when returning to armed state may explain your observations? If so, how would you expect Alarmo to perform the re-arming?

@sokarovski
Copy link
Author

sokarovski commented Sep 20, 2023

@sokarovski @deadly667 Could you confirm whether the automatic bypassing behaviour when returning to armed state may explain your observations? If so, how would you expect Alarmo to perform the re-arming?

@nielsfaber yes, it does explain.

I did a test where i went to the garage and left immediately. Doing only one trigger per day. Alarmo was working flawlessly for more than two weeks. So this tells me it is not time constraint. This only happens when i am into the garage working for hours. I am guessing that it is happening when the PIR sensor is still triggered but Alarmo tries to go in armed state after the triggered state.

Although that is very strange scenario caused by me being lazy to disarm the alarm. I can see a scenario for example when a thief would be constantly moving in your house and you will receive only one notification.

My suggested scenario will be if Alarmo want to go into Armed state and finds out that all sensors are not clear, it should stay for another "Trigger Time" in the triggered state, and agian, and agian, until all sensors are clear. Or maybe it should re-enter the triggered state and send you another notification.

@froloffw7
Copy link

froloffw7 commented Sep 20, 2023

Sorry, I don't understand the meaning of bypassed_sensors property. Can you please point me how and were to check this?

Attaching screenshot with motion sensor Alarmo settings.
Screen shot with sensor settings

Is it possible to implement the similar algorithm like "Allow open initially: Open state while arming is ignored (subsequent sensor activation will trigger alarm)" to return to armed state instead of iteration with "Trigger Time" delay, as iteration may create some other issues which will be difficult to catch and debug.

@nielsfaber
Copy link
Owner

@sokarovski

My suggested scenario will be if Alarmo want to go into Armed state and finds out that all sensors are not clear, it should stay for another "Trigger Time" in the triggered state, and agian, and agian, until all sensors are clear. Or maybe it should re-enter the triggered state and send you another notification.

Thanks for the idea.
However, I don't think this is the best choice, since many users configure a siren to be ringing whilst the system is in triggered state.
The purpose of the 'trigger time' is to determine the amount of time the siren should be ringing. Having the system repeat the triggered state for longer time would likely upset neighbours.

@froloffw7

Sorry, I don't understand the meaning of bypassed_sensors property. Can you please point me how and were to check this?

The bypassed sensors will be listed here (if any):
image

It is clear to me now that the user may not be aware of this property, and assumes all sensors are working OK when the system is armed.

Is it possible to implement the similar algorithm like "Allow open initially: Open state while arming is ignored (subsequent sensor activation will trigger alarm)"

Yes, this should be already in place. But you will need to enable this setting:
image

This gives Alarmo permission to ignore the initial state, so the arming (and also re-arming after triggering) would not fail, and the sensor will still activate the alarm after a next off-on state transition.
I think this already works as desired, if the setting is applied the motion sensor would not be added to the bypassed list after re-arming.

I am now planning to remove the automatic bypassing.
As a result of this change the arming would simply fail if any sensors are still open, the alarm would become disarmed. User intervention would be before the system can be armed again.
It is the more conservative approach but provide the user awareness of the situation.
As mentioned before, the motion sensors would not prevent the re-arming IF the "allow open initially" setting would be set.

@froloffw7
Copy link

froloffw7 commented Oct 11, 2023

Sorry, for the delay. I did some more tests with different settings.

It seems that enabling "Allow open initially" doesn't work in this case, as I still have events missed with Alarmo.
I suppose that this setting should cause that appropriate sensor (binary_sensor.motion_garage in my case) should leave the "bypassed_sensors" list, when condition meet (no motion), but it doesn't.
Also I tried to increase trigger time and this didn't help as well.

If you plan to do some related changes, I have a proposal:
it could be better to have some setting like Siren time, separated from Trigger time.

PS I just got an idea, whether the reason of this malfunction is that motion sensors require enabling "Allow exit delay" to enable "Allow open initially"?
I have "Exit delay" set to None in "Armed Home" mode.

@nielsfaber
Copy link
Owner

I just made the aforementioned change of not bypassing open sensors when re-arming after triggering.
In my testing the 'allow open initially' setting for motion sensors still applies, i.e. a sensor with the setting may be still active when re-arming the alarm, it will not cause the re-arming to fail.
I will let you know when the change is released in a new version.

@nielsfaber
Copy link
Owner

v1.9.11 is released which no longer bypasses the sensors when re-arming the alarm.
I will close this issue since this was found to be root cause of the problem.
If you still experience problems after updating, please let me know, we can reopen the case if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work-in-progress
Projects
None yet
Development

No branches or pull requests

5 participants