fdegier / homebridge-jablotron-alarm

Homebridge plugin for connecting Jablotron JA-100 alarm systems to Homekit.
The Unlicense
26 stars 6 forks source link

Log errors, function is working #87

Closed tomdh76 closed 10 months ago

tomdh76 commented 1 year ago

Thank you for this nice plugin! Everything seems to work but I have regular errors in the log. I have no idea if they mean something but if you can something with it it may improve the stability of the plugin? I have this error in the morning. Nothing is changed in the central at that time:

4:40:30 AM] [Jablotron] Error: Method not supported by Jablotron at /var/lib/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:33:31 at IncomingMessage. (/var/lib/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Later I turn off a PGM:

[11/3/2022, 6:44:43 AM] [Jablotron] Setting PGM state: false [11/3/2022, 6:44:43 AM] [Jablotron] Switching section pgm_2 (using pgm_2) to new state: unset [11/3/2022, 6:54:39 AM] [Jablotron] Jablotron - json parsing error: SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at IncomingMessage. (/var/lib/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:42) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) [11/3/2022, 6:54:39 AM] [Jablotron] Unable to parse JSON data:

502 Bad Gateway

502 Bad Gateway


nginx

Environment:

Homebridge-jablotron plugin version:v2.5.6

fdegier commented 1 year ago

Hi @tomdh76 Thanks for reporting, it's hard to debug honestly as it's quite random. I always assumed it was just the Jablotron API acting up. Soon I'll have to do extensive work on the API and will try to implement better logging to handle this.