e-mcgee / paradox_platform

Paradox alarm homebridge platform
25 stars 6 forks source link

Plug-in not logging #21

Closed deon-wentzel closed 6 years ago

deon-wentzel commented 6 years ago

Hi

I upgraded to 314 this morning (SAT), by updating the config.json as per requirements i.e added all the MQTT and debounceDelay option. Even though MQTT was set to false I added the TOPIC on all the sensor, etc. While running Homebridge with the new config, it would not login to the Paradox IP150. I then reverted back to 264 and removed the above and everything is working again. BTY using Homebridge 0.4.36.

e-mcgee commented 6 years ago

Hi Deon,

264 was the stable version after I added MQTT support. Since then I did fix the login issues that I had in the past where in some instances the connection to the alarm would timeout and then I did not recreate the connection before logging in. This was fixed though and is the major change in the login process between the two versions.

Did you restart homebridge on 314 after the login did not work? Can you perhaps give me the console log for the startup phase? The login is now in the poll loop so will only happen after 10s though so you need to give me the console log for at least the first 20s

deon-wentzel commented 6 years ago

Hi,

Okay I have upgrade to the latest 316, changed the config. started Homebridge see attached txt file. Let me know if you need anything else.

v316console-20.txt

deon-wentzel commented 6 years ago

To add to the above, when I set the Alarm to away, it does not arm. I tried the following

  1. Restart Homebridge as suggested above
  2. Stopped Homebridge set MQTT to true, started Homebridge, restarted Homebridge, results are the same.
  3. Changed it back, MQTT False

In the config all MQTT (TOPIC) and debounceDelay line are added on all , even though MQTT is False.

Also notice the Alarm Connect in Home App goes off after a while, the I enable it again with the same results.

e-mcgee commented 6 years ago

Hi Deon,

I think I solved it. Your logs shows you have a poll delay of around 5 seconds. In order to make the poll loop and re-login more robust I moved the socket creation into the poll loop before. The login process takes about 5 seconds so what happens is that your initial login does not complete before the next poll loop which then creates a new socket and tries to log in again. This continues which caused the subsequent failed login. So I added a switch to mute socket creation and login attempts while it is busy login in to prevent this race condition. I tested with a polldelay of 4 seconds and all seems fine. Also tested Connected switch to reconnect and it reconnects correctly with the poll delay of 4 seconds. Give 318 a try.

e-mcgee commented 6 years ago

BTW The current plugin catches all events from the alarm as they happen instantaneously. You should be good to make the poll delay longer as it now is really just a safety net to catch any changes that did not happen such as a failed PGM command.

e-mcgee commented 6 years ago

Sorry but had to update as I neglected to update README in 318 publish. It is now 319 with updated README.

deon-wentzel commented 6 years ago

Installed the update, and it is working, the one that I did notice is that is a delay when the Alarm is armed of about 20 sec. I will update the house Alarm with the new plugin too. Let me keep on monitoring and I will update you.

deon-wentzel commented 6 years ago

Hi, Installed 319 at the house and tested all, including PGMs (Garage Doors and gate), Alarm and motion sensors. All seem to be working fine..Thanks for the great work...