-
Notifications
You must be signed in to change notification settings - Fork 87
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
PGM activation and spurious zone status #286
Comments
After PAI triggers PGM it queues refresh of PGM statuses. It should happen just after sending PGM command to the panel. |
Hello, I thank you for your answer. line 11 at 2022-03-21 21:02:36,438 you can see PGM on activation. |
Hello, I have an hypothesis, maybe it is completely wrong, I don't know enough the design of PAI and have difficulties to catch the code:
Is it an idea to dig? Regards, |
I do not understand how a zone is related to a PGM in your case. |
When you activate PGM with PAI. PGM gets activated and status refresh request is scheduled to the event loop. So it should refresh within a fraction of a second. |
I think you should be able to reproduce it if you belong an evo 192 panel or similar:
In my case the PGM is triggered with an MQTT message received from hassio, and I look zone status in Hassio. Here you have the log with dumping messages paradox.log line 3593, 1.6s later you can see that on reception of an event, zone 20 becomes open which is correct: 2022-03-21 21:02:38,065 - DEBUG - MainThread - PAI.paradox.paradox - Message received: Container: line 6136, 1.4s later the PGM status reception (received 3s after PGM control output has been send ) trigger also a open to close change for the zone 20 (it is wrong, it is the pgm status reception which cause the spurious zone status message): We can see that PGM status reception (triggered by PGM control output) by PAI send wrong zone status when this zone stus has changed between PGM control output and PGM status refresh |
But PAI can not control zone status. It only reads it. Is that zone wired to that PGM? |
when PGM state changes panel does not send any event to the bus for PAI to read. At least it is how I remember. So it is not possible to detect PGM status right away. |
Hello,
But I do not understand enough the general design of PAI, and my python knowledge is to low. Thank you for your work, PAI is nice solution even with small defects. |
It is exactly as you described. Now I understood why this happens. I did not thought that status fetching takes 4 seconds. I actually need to log that on debug level.
This is what I wanted to make but did not had time to implement. |
@Benoit3 Do not forget to switch to current dev branch if you are planning to edit something. Python is simple language to learn. |
Alarm system
EVO192 (V6.86) + IP100 (V5.1) + Hassio
baudrate 57600+ "System Options -> Communication -> “Transmit zone status on serial port” " activated
Environment
Git branch
V2.7.1
Describe the bug
A PGM is used to open the motor driven gate. PGM is activated through MQTT message "on" and deactivated with a 2s timer (defined in EVO panel) to generate a pulse (duration 1 to 2s) on the gate controler.
A magnetic sensor switch is used to detect the gate close status and connected to one EVO zone.
I observe (In PAI log and through send MQTT messages) spurious status on zone associated to the gate: when an open request is done through PAI (and the PGM) the gate open (normal), the zone status first change to open (correct), 1s later change back (error) to close then back to open (correct finally) 10 s after.
This spurious behaviour is seen on other zones which are opened simultaneously with the gate (just after PGM activation).
This spurious behaviour of the zone status is not seen if the PGM is activated through another method (EVO remote control->utility key->PGM) or via direct activation of the gate controler.
=> it seems that zone status reported just after a PGM activation are valid during 1 s, corrupted during 10s and correct after.
To Reproduce
When the MQTT message is end to open the gate:
Logs
It seems it is not possible to send you logs through keybase.io (Error: no valid primary key self-signature or key(s) have expired)
So I send you commented extract without sensitive info:
an MQTT message is sent (from Hassio) to open the gate through PAI and the PGM "Portail"
2022-03-19 11:02:53,644 - INFO - PAI.paradox.interfaces.mqtt.basic - message topic=paradox/control/outputs/Portail, payload=on
2022-03-19 11:02:53,646 - DEBUG - PAI.paradox.interfaces.mqtt.basic - Output command: Portail=on user: None
2022-03-19 11:02:53,646 - DEBUG - PAI.paradox.paradox - Control Output: Portail - on
2022-03-19 11:02:53,784 - INFO - PAI.paradox.hardware.evo.panel - PGM command: "on" succeeded
2022-03-19 11:02:53,970 - DEBUG - PAI.paradox.hardware.evo.panel - Received status response: 1
.....
2022-03-19 11:02:55,127 - DEBUG - PAI.paradox.hardware.evo.panel - Received status response: 7
####Here (2s later) we can see the zone "Portail" status changed from False to True, it is correct
2022-03-19 11:02:55,307 - DEBUG - PAI.paradox.data.memory_storage - Change zone/Portail/open from False to True
corresponding MQTT message is send : :-) !
2022-03-19 11:02:55,312 - DEBUG - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/states/zones/Portail/open=True
....
But here (1.5s later) the zone "Portail" status is change back to False, it is an ERROR, electrical status of the input didn't change, this event is not seen with PRT3
2022-03-19 11:02:56,611 - DEBUG - PAI.paradox.hardware.evo.panel - Received status response: 58
2022-03-19 11:02:56,843 - DEBUG - PAI.paradox.paradox - pgm/line_ring:False ignored
2022-03-19 11:02:56,845 - DEBUG - PAI.paradox.data.memory_storage - Change system/date/time from 2022-03-19 12:02:41 to 2022-03-19 12:02:47
2022-03-19 11:02:56,845 - DEBUG - PAI.paradox.data.memory_storage - Change system/power/vdc from 16.6 to 16.5
2022-03-19 11:02:56,845 - DEBUG - PAI.paradox.data.memory_storage - Change system/power/dc from 11.5 to 11.6
2022-03-19 11:02:56,847 - DEBUG - PAI.paradox.data.memory_storage - Change zone/Portail/open from True to False
2022-03-19 11:02:56,863 - DEBUG - PAI.paradox.lib.ps - Future already done
2022-03-19 11:02:56,865 - DEBUG - PAI.paradox.paradox - Could not create event from change
2022-03-19 11:02:56,865 - DEBUG - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/states/system/date/time=2022-03-19 12:02:47
2022-03-19 11:02:56,865 - DEBUG - PAI.paradox.paradox - Could not create event from change
2022-03-19 11:02:56,869 - DEBUG - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/states/system/power/vdc=16.5
2022-03-19 11:02:56,869 - DEBUG - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/states/system/power/dc=11.6
And the corresponding MQTT erroneous message is send
2022-03-19 11:02:56,870 - DEBUG - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/states/zones/Portail/open=False
.....
10 second later the zone "Portail" status is definitely corrected to True
022-03-19 11:03:06,544 - DEBUG - PAI.paradox.hardware.evo.panel - Received status response: 58
2022-03-19 11:03:06,726 - DEBUG - PAI.paradox.paradox - pgm/line_ring:False ignored
2022-03-19 11:03:06,728 - DEBUG - PAI.paradox.data.memory_storage - Change system/date/time from 2022-03-19 12:02:47 to 2022-03-19 12:02:57
2022-03-19 11:03:06,728 - DEBUG - PAI.paradox.data.memory_storage - Change system/power/dc from 11.6 to 11.7
2022-03-19 11:03:06,730 - DEBUG - PAI.paradox.data.memory_storage - Change zone/Portail/open from False to True
The text was updated successfully, but these errors were encountered: