troygNZ / homebridge-solax

Homebridge Solax Monitoring
Apache License 2.0
7 stars 1 forks source link

Crashing Homebridge on default new install #35

Closed jamie-2bit closed 2 years ago

jamie-2bit commented 2 years ago

Default install on the latest docker image I get this as soon as I restart Homebridge:

[1/6/2022, 11:37:58 AM] TypeError: Cannot read properties of undefined (reading 'join') at Function.logDetails (/homebridge/node_modules/homebridge-solax/src/config.ts:25:72) at new SolaxPlatform (/homebridge/node_modules/homebridge-solax/src/solaxPlatform.ts:24:18) at /usr/local/lib/node_modules/homebridge/src/server.ts:440:40 at Array.forEach () at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:372:27) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:29) [1/6/2022, 11:37:58 AM] Got SIGTERM, shutting down Homebridge...

troygNZ commented 2 years ago

Thanks. What docker image are you using? I'm using Onzu, but haven't updated for a little while. I'll try and reproduce and report back. Cheers Troy

troygNZ commented 2 years ago

I've managed to reproduce it on the latest version of Onzu docker image, but also on an earlier verison. This error is due to no alerts thresholds being specified. I'll update the code to handle this gracefully, though ideally should always have at-least 1 alert threshold defined.

In the interim, if you specify a value for at-least one item, it'll work. image

jamie-2bit commented 2 years ago

Perfect! Thanks. Perhaps a brief explaination in the settings gui as to what the alert threshold is :-)

troygNZ commented 2 years ago

Version 1.3.3 will now handle no alert thresholds being specified. Cheers.