nielsfaber / alarmo

Easy to use alarm system integration for Home Assistant
1.38k stars 120 forks source link

Enable alarm triggering when broader range of devices are used, e.g. someone turns on light #1039

Open hajar97 opened 1 month ago

hajar97 commented 1 month ago

Checklist

Proposal

Currently alarm can be triggered only for sensors. However, it is equally valuable to trigger alarm when some devices are activated. For example, if someone breaks into a house and uses light switch to turn on. Since no one is home lights should not be activated. If someone activated them then its a trigger for alarm.

Additional info

Other examples include, moving curtains, opening/closing shutters, turning on devices connected to sockets, etc.

lionslair commented 1 month ago

Could just do this via automation if alarm is armed

hajar97 commented 1 month ago

I could indeed. I could do the whole functionality of Alarmo via automations, but then whats the point of it at all, if its not the ease of use?To setup such automations its a lot of clicks per each device. In Alarmo UI I could just use it like any other sensor, tick the box next to it and if it is turned on/off I’d get alarm triggered. May be I am missing a good reason why not allow people to do that?On 5 Oct 2024, at 02:48, Nathan Rzepecki @.***> wrote: Could just do this via automation if alarm is armed

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

lionslair commented 1 month ago

I could indeed. I could do the whole functionality of Alarmo via automations, but then whats the point of it at all, if its not the ease of use?To setup such automations its a lot of clicks per each device. In Alarmo UI I could just use it like any other sensor, tick the box next to it and if it is turned on/off I’d get alarm triggered. May be I am missing a good reason why not allow people to do that?On 5 Oct 2024, at 02:48, Nathan Rzepecki @.> wrote: Could just do this via automation if alarm is armed —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

Personally I don't see why you can not create extra sensors via helpers so that is shows what you want under the sensor list. Personally I would not want to see every possible other entity in my HA as a sensor in alarmo. Feel you want here is a little niche. Maybe at best a way to add in extra entities manually.

hajar97 commented 1 month ago

Hm, I don’t think it is niche at all. None of the commercial Alarms is capable of raising an alarm if someone is turning light on in the house. Yet this is the first natural thing robbers would do when they enter dark rooms. Triggering an alarm when a device is used which is not supposed to be used could be a great advantage of Home Assistant and Alarmo over commercial alternatives. Yes I can create virtual sensors and then add them in Alarmo, but again this is more difficult, not all users will be able to do that, it takes more time than configuring it directly in Alarmo. You already have sensors of “Unknown” type which are hidden by default by a filter, but can be made visible when removing the filter. The same approach could be used here. All such devices would be invisible by default for all users, but if you want you can easily bring them up and configure too. On 5 Oct 2024, at 09:47, Nathan Rzepecki @.***> wrote:

I could indeed. I could do the whole functionality of Alarmo via automations, but then whats the point of it at all, if its not the ease of use?To setup such automations its a lot of clicks per each device. In Alarmo UI I could just use it like any other sensor, tick the box next to it and if it is turned on/off I’d get alarm triggered. May be I am missing a good reason why not allow people to do that?On 5 Oct 2024, at 02:48, Nathan Rzepecki @.> wrote: Could just do this via automation if alarm is armed —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

Personally I don't see why you can not create extra sensors via helpers so that is shows what you want under the sensor list. Personally I would not want to see every possible other entity in my HA as a sensor in alarmo. Feel you want here is a little niche. Maybe at best a way to add in extra entities manually.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

lionslair commented 1 month ago

Any time any alarm is triggered I turn on all lights in the whole house and outside regardless of time of day. I do not see how someone could get into the house without breaking a window entering via a door or ceiling and not triggering a motion sensor. Camera motion. Unless they were going ultra slow.

If they did all lights turn on. maybe I. Just making their life easier then.

Maybe your use case is you have less sensors to detect unauthorised entry.

Wouldn't work. In my situation I could turn on any light without pressing the switch. Over done it before I wouldn't want to trigger the alarm if I turn lights on while the house was armed.

hajar97 commented 1 month ago

Spot on - I don’t have so many fancy sensors and I don’t want spend money on them. My light switches are a perfect trap/sensor to detect if someone broke in. I totally get your case and it totally has its own place. It is not about your case vs mine. It is about flexibility of Alarmo integration so every user could configure it for their needs and utilise their available devices. Like you don’t have to use light switches as alarm triggers because you have a different setup. And my case is different and using light switches makes every sense. On 5 Oct 2024, at 14:45, Nathan Rzepecki @.***> wrote: Any time any alarm is triggered I turn on all lights in the whole house and outside regardless of time of day. I do not see how someone could get into the house without breaking a window entering via a door or ceiling and not triggering a motion sensor. Camera motion. Unless they were going ultra slow. If they did all lights turn on. maybe I. Just making their life easier then. Maybe your use case is you have less sensors to detect unauthorised entry. Wouldn't work. In my situation I could turn on any light without pressing the switch. Over done it before I wouldn't want to trigger the alarm if I turn lights on while the house was armed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nielsfaber commented 2 weeks ago

Alarmo only supports binary_sensor entities. If you want to use the state of a light to trigger the alarm, you can create a template sensor. See https://www.home-assistant.io/integrations/template/.

hajar97 commented 2 weeks ago

I am aware of this workaround. But it is much less convenient. Any chance you could add support for broader range of devices and their state changes as triggers for alarm, without having to go down the template binary sensors route?On 19 Oct 2024, at 07:19, Niels Faber @.***> wrote: Alarmo only supports binary_sensor entities. If you want to use the state of a light to trigger the alarm, you can create a template sensor. See https://www.home-assistant.io/integrations/template/.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nielsfaber commented 2 weeks ago

No chance. I cannot determine for everyone which entity states should be considered as safe and which should as unsafe. I think it’s best if the user provides this mapping logic himself by means of a template sensor. I don’t consider this a workaround, it’s just making use of features that are already in HA.

hajar97 commented 2 weeks ago

What about those devices that have binary states, e.g. light switches on or off?On 19 Oct 2024, at 09:17, Niels Faber @.***> wrote: No chance. I cannot determine for everyone which entity states should be considered as safe and which should as unsafe. I think it’s best if the user provides this mapping logic himself by means of a template sensor. I don’t consider this a workaround, it’s just making use of features that are already in HA.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nielsfaber commented 2 weeks ago

What about them? I still believe the desired behaviour depends on the user. For example, I have lights that I leave on when I am out of the house in the night. In this case it would make more sense to trigger the alarm when this light is turned off by a burglar. In short, am not going to implement hard-coded mapping of entity states to safe/unsafe scenarios. I suggest to use the template sensor to achieve your goal, I think it’s the most generic and flexible solution.

hajar97 commented 2 weeks ago

It is much more powerful to allow Toggle option for when triggering alarm, for windows or lights. Having them only limited to Closed or On is definitely not covering all scenarios. I already pointed this out in another feature request to trigger alarm when windows are opened or closed, not just when they are opened. I understand it may be covering your scenarios and you’re happy with that, cannot be bothered to generalise your capabilities for broader community. Better switch to Manual Alarm then and code it the way I want without any limitations of Alarmo. Same effort if I do it with or without Alarmo and no risk of no support or some arbitrary limitation later. On 19 Oct 2024, at 10:13, Niels Faber @.***> wrote: What about them? I still believe the desired behaviour depends on the user. For example, I have lights that I leave on when I am out of the house in the night. In this case it would make more sense to trigger the alarm when this light is turned off by a burglar. In short, am not going to implement hard-coded mapping of entity states to safe/unsafe scenarios. I suggest to use the template sensor to achieve your goal, I think it’s the most generic and flexible solution.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nielsfaber commented 2 weeks ago

I am sorry if you get the feeling I am not open to new ideas to expand Alarmo, this is not the case. The fact is that feature requests are opened every week and I have very limited time available to implement them. Hence I feel the need to be selective and consider the benefit for all users / generic use, rather than simply fulfilling a request of one user. Since in this case you can already achieve your goal via template sensors, I think that is an acceptable compromise. If you see Alarmo too limited for your usage and rather use the manual alarm, just go for it. I found that too limiting/cumbersome which is why I started this project in the first place.