ebaauw / homebridge-deconz

Homebridge plugin for deCONZ
Apache License 2.0
137 stars 7 forks source link

command line tools fail exposing Phoscon Groups and Scenes in apps like Eve #181

Closed mangoschorle closed 1 year ago

mangoschorle commented 1 year ago

I installed homebridge-deconz v1.0.6 via the Homebridge Web UI (no errors during the process). After this, the command line tools weren't available (neither deconz nor ui). I then tried to install the missing binaries via sudo npm -g i homebridge-deconz . Even though I found them, running them caused the following errors:

ui get /devices /usr/local/lib/node_modules/homebridge-deconz/node_modules/hb-lib-tools/index.js:192 if (a?.[1] != null) { ^

SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/homebridge-deconz/cli/ui.js:14:5) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) pi@homebridge:~ $ ui get /devices /usr/local/lib/node_modules/homebridge-deconz/node_modules/hb-lib-tools/index.js:192 if (a?.[1] != null) {

Did I do something wrong here? My goal is to expose my Phoscon App groups and scenes to Eve or Home+

ebaauw commented 1 year ago

What version of NodeJS are you running?

mangoschorle commented 1 year ago

I don't know which version is used by homebridge but at least, after a apt update and apt upgrad, from the terminal I get

pi@homebridge:~ $ node -v
v12.22.12
mangoschorle commented 1 year ago

Okay I ran: sudo hb-service update-node to update, which after a reboot gave me ℹ Node.js v20.9.0 already up-to-date. However node -v still gives me v12.22.12. Might be worth addint that I installed Homebridge by just using the officially provided Image.

EDIT: Ok after restarting the node service the UI terminal states that the version is now 20.9.0