ebaauw / homebridge-nb

Homebridge plugin for Nuki Bridge
Apache License 2.0
51 stars 3 forks source link

NB Shell command not working #129

Closed beatpaul closed 7 months ago

beatpaul commented 7 months ago

Hi Eric!

I did a new installation of my system from scratch to run Homebridge and your Plugins on a RPi 5 (Bookworm) and everything runs flawless. I just hafe just one Problem using your command line tools (I wand to delete multible callbacks)

If I enter e.g sudo nb -h the Result is bash: nb: Befehl nicht gefunden

I'm not sure if this due to the new pi / bookworm or somethiong else maybe you have an idea

thx a lot Paul

ebaauw commented 7 months ago

npm should create a symlink nb in the bin directory next to lib/node_modules. That directory should be in your $PATH for the shell to find nb. Where that directory is depends on your installation of NodeJS and whether you use npm -g. Typically, it should be found from the Terminal under the Homebridge UI, when Homebridge NB was installed through the UI. The programme itself is in …/node_modules/homebridge-nb/cli/nb.js.

Note that nb does not require root privileges, and you don’t want to run it through sudo.

Alternatively, you might try npx nb ….

beatpaul commented 7 months ago

Hi Erik! Thx for your advice! Actually i installed the plugin by restoring a backup, maybe this caused the missing symlink ?

anyways, setting the symlink by reinstalling node and npm did the trick for me!

It works now :) Thx for your help Paul