Closed arrie closed 7 years ago
The software logoff only prevents controls from being sent, events will still work. That is why the script performs a log on before doing any controls. There's no need to do a log on everyone the software logs off. In one of the issue someone found an issue with the keep alive packet. In the alarmin app I fixed the packet the software didn't log off anymore. Perhaps try this?
So disclaimer: My first time even looking at python!
I added config sections for MQTT user/pass - i'm using rabbitMQ so need that. Also added 2 new settings to auto stop polling, as well as a delay.
Basically subscribing to the events as well, so when that message comes in, I place the "disable polling" message back on the q, only difference being that I flag it with "internal" as the payload. When the message comes back in, i look for the internal flag to do the rest of the processing. Not sure if this is more or less what you had in mind? Just thought that this would be the least intrusive change to your original implementation.
The result is that a login from another system will fail, but raises this trigger in the currently connected system. We can log out, but have to log in again from the other system. The result can be seen below. Seems to do what I expect.
That being said, it's still not perfect:
Just want to get your thoughts on this approach before I continue.