Open ondrejmirtes opened 8 months ago
Possibly connected to https://github.com/tahvane1/jablotron80/issues/168.
The cause of this behaviour is that with multiple active detectors, this branch is always executed, at least once a second:
When I comment that out, I don't get details about the 2nd+ detectors but the keyboard does not get spammed.
So we should probably focus on how to reduce the spamming while still getting details about multiple detectors.
FWIW with these lines commented, at least the integration is now usable for me - I can see the state and arm/disarm from my phone, and the keypad is usable too.
So solving these problems would be nice, but it's no longer urgent for me.
Alright, try this:
1) Keep one window open (one sensor active) 2) Arm the alarm 3) Press "?" on the keyboard, maybe even multiple times. Mine shows "Active detector" and then "Active output PGY". 4) In my case the keypad starts cycling (pressing "?" by HA integration) on its own again. 5) When I comment out https://github.com/tahvane1/jablotron80/blob/af8560cc8f3eacaa83989bf6deff80441382df1c/custom_components/jablotron80/jablotron.py#L2137-L2138 (a branch for a single detector), the cycling stops.
Yes I can see a clear issue here, and how it gets into a loop.
When it "hits" the device query button, it is waiting for /a4/ff messages, but this only occurs once it has cycled through all the info on the keypad, equivalent of pressing the button multiple times.
And when the messages coming back from the control panel trigger yet more queries, hence the loop occurs.
The issue is a result of a few things;
To resolve this problem whilst also achieving what @heifisch in #153 has set out to do needs quite a lot of effort!
For now, I recommend people turn off PGX/PGY and ensure there are no faults in their system. This will result in a stable configuration.
Spinning this issue off the issue: https://github.com/tahvane1/jablotron80/issues/163
My wireless keypad is being spammed by the integration and cycles through all active sensors every second or so. This means that when the alarm is armed but multiple windows are opened, user interacting with the keypad is not able to disarm the alarm.