fdegier / homebridge-jablotron-alarm

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

Error: TypeError: Cannot read properties of undefined (reading 'matchesErrorCode') #76

Closed Faasteer closed 10 months ago

Faasteer commented 2 years ago

Hi, everything was fine recently, but now for the first time in a long time, i have a problem with this plugin that i can't handle. Every day, around 4:40 AM I get these error messages.

[3/21/2022, 4:40:17 AM] [Jablotron] Error: TypeError: Cannot read properties of undefined (reading 'matchesErrorCode') at /homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:32:29 at IncomingMessage. (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1346:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) [3/21/2022, 4:40:17 AM] [Jablotron] Unable to parse JSON data: {"http-code":200,"errors":[{"code":"METHOD.NOT-SUPPORTED","message":"Unknown method.","debug":"Unknown method."}]}

[3/22/2022, 4:40:19 AM] [Jablotron] Error: TypeError: Cannot read properties of undefined (reading 'matchesErrorCode') at /homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:32:29 at IncomingMessage. (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1346:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) [3/22/2022, 4:40:19 AM] [Jablotron] Unable to parse JSON data: {"http-code":200,"errors":[{"code":"METHOD.NOT-SUPPORTED","message":"Unknown method.","debug":"Unknown method."}]}

I run Docker on Synology 918+. Everything is the latest version available. HomeBridge 4.42.0 (latest) homebridge-jablotron v2.5.3 Node.js v16.14.0 Npm v8.3.1

Can you help me with that, please?

misncz commented 2 years ago

There is a bug introduced recently with incorrect referencing. I raised PR to fix this. However have no idea why you are getting METHOD.NOT-SUPPORTED from Jablotron. Maybe @fdegier would know ...

fdegier commented 2 years ago

In the past we had a similar issue, I investigated it and remember that it was fixed. Don't recall the reference though. I just published v2.5.4 hopefully that fixes it.

Faasteer commented 2 years ago

Hello @fdegier and @misncz, first of all, I want to thank you for a quick reply. Unfortunately, now it's even worse than before the "repair". 😒 Now there are error messages in the log almost every minute. In fact, the same thing keeps happening.

Error 1:

[3/26/2022, 11:52:25 AM] [Jablotron] Unable to parse JSON data: {"status":false,"error_status":"not_logged_in","checksum":"4e0a5f2250e13b14583a900483a182ab","server_id":"2685983-1648291945","client_id":null}

Error 2:

[3/26/2022, 11:53:25 AM] [Jablotron] Error: TypeError: Cannot read properties of undefined (reading 'matchesErrorCode') at /homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:32:29 at IncomingMessage. (/homebridge/node_modules/homebridge-jablotron/lib/jablotron-client.js:68:21) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1346:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Of course, now the jablotron in my homekit doesn't work and shows a few days old status. I checked the login, password and PIN, which I have specially created for this plugin, several times, but everything works (I log in on the website and in the application, the PIN on the keyboard is also OK).

So I tried the last "user thing" - return to version 2.5.3, immediately after installation the current status appeared and I can control the security of our house again.

fdegier commented 2 years ago

Did you ever upgrade to the latest version?