vectronic / homebridge-nut

Homebridge plugin for NUT (Network UPS Tools) Client
19 stars 3 forks source link

Add Username and Password Support #6

Closed jtrahan closed 3 years ago

jtrahan commented 3 years ago

It looks like there is no username/password support.

vectronic commented 3 years ago

I have added 'experimental' support for username and password based on the docs here: https://www.npmjs.com/package/node-nut

Two caveats:

Could you install the latest version (2.2.0) either via the homebridge config UI or command line:

npm install -g @vectronic/homebridge-nut

and let me know how it goes....

Any issues, it would be best to submit debug logs from homebridge. Something like:

homebridge -D | grep Nut

bubez81 commented 3 years ago

now it seems to work for me! Thank you!

[9/22/2021, 1:43:00 PM] [Ups Ufficio Soci] starting nut client for 192.168.0.2:3493 [9/22/2021, 1:43:00 PM] [Ups Ufficio Soci] nut client connected, reported devices: ApcUps=Description unavailable [9/22/2021, 1:43:50 PM] [Ups Ufficio Soci] adding new accessory: ApcUps

jtrahan commented 3 years ago

2.2.0 is working. However with 2.2.1 I'm getting this error in the logs.

[9/22/2021, 12:37:27 PM] [Nut] error invoking GetUPSList on nut client: Cannot read property 'then' of undefined

vectronic commented 3 years ago

Sorry about that. Confusion with Node callbacks and promises.... Try 2.2.2

I actually did a quick test this time :-) and it seemed to work for me....

jtrahan commented 3 years ago

Much Better :) Thank you for adding it.