maisken / Paradox_IP150

Hassio add-on, Python and MQTT bindings for controlling a Paradox alarm via the IP150 web interface
GNU General Public License v3.0
40 stars 10 forks source link

How to retain armed when internet connection is lost #38

Open gitlaman opened 2 weeks ago

gitlaman commented 2 weeks ago

As the title says, when im away and when my router restarts or when my server lose internet connection and when the connection is back i get notification that my alarm is dissarmed and after that armed. How can i avoid this notifications when that happens?

cybertza commented 2 weeks ago

Hey, i don't think this repo is active anymore, and most people have migrated to PAI, and then use the ESP's more as Serial to Ethernet Bridges for new installed and directly to the 150 for something like yours i assume.

I have been using mine like that for some time, https://github.com/ParadoxAlarmInterface/pai

if you dont want to migrate to PAI then to achieve what you want to do, you would have to change a few things, either on HA side or the code here, to create a filter for your HA core, you can update the automation from "Armed to Disarmed" to send your notify.notify if that makes sense, and not on any state to Disarmed, as there the shift would be unavailable => Disarmed or Armed or what ever.

Then on this code you could prob change the startup state to armed. I cant remember if this code actually polled the state at startup.

The PAI community is way more active on these types of things.

So i have this check for comms to the alarm for instance:

image

but you would do something like image

gitlaman commented 2 weeks ago

Thanks for the time to explain, i think i tried combinations with the automations for the notifications but i will try when i get back one more time if that does not help i will try PAI.

Here is screenshot of what i get when my router auto restars.

Screenshot_20240826_171536_Home Assistant

cybertza commented 2 weeks ago

Any other entries there?

So you can automate that out, by manner of : Disarmed for 10 Seconds. (or 2 if you confident it is always less than 2 seconds for instance.

I suspect this is due to the fact that the buffer for the software Is init with disarmed as def value, and that gets reported before its then reads the status to Disarmed, But this is just a logical Guess.

gitlaman commented 2 weeks ago

No other entries only that. The problem is with mqtt retain values but i tried that and it does not work. I think when mqtt server lose connection the first value is Disarmed and after two secconds it gets the armed_away state.

You are right for the delay i think that will help definitely.

Thanks a lot @cybertza