New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '../build/Release/dns_sd_bindings' #1315

Closed
Didel opened this Issue Jun 1, 2017 · 19 comments

Comments

Projects
None yet
4 participants
@Didel

Didel commented Jun 1, 2017

img_0697

I just installed a clean and fresh installation of Raspbian Jessie Lite on my Raspberry Pi 3, and the very first thing I did was to install Homebride right after that. I followed every step of the installation guide, but can't succeed in getting homebridge to run.

npm -v = 4.2.0
node -v = 7.10.0

Might be possibly related to #1314.

@Nastras

This comment has been minimized.

Show comment
Hide comment
@Nastras

Nastras Jun 1, 2017

I have the same Problem, what can i do?
img_1524

Nastras commented Jun 1, 2017

I have the same Problem, what can i do?
img_1524

@Didel

This comment has been minimized.

Show comment
Hide comment
@Didel

Didel Jun 1, 2017

I fixed it, I found the solution in the answer to #905 (slightly edited):

cd /usr/lib/node_modules/homebridge/
sudo npm install --unsafe-perm mdns
sudo npm rebuild --unsafe-perm

Didel commented Jun 1, 2017

I fixed it, I found the solution in the answer to #905 (slightly edited):

cd /usr/lib/node_modules/homebridge/
sudo npm install --unsafe-perm mdns
sudo npm rebuild --unsafe-perm
@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

After 'sudo npm install --unsafe-perm mdns' I get 'sudo: npm: opdracht niet gevonden' (translate: command not found)
What to do next?

Sibelle65 commented May 27, 2018

After 'sudo npm install --unsafe-perm mdns' I get 'sudo: npm: opdracht niet gevonden' (translate: command not found)
What to do next?

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

Most likely, the npm programme is not in the $PATH for root.

What OS are you on? Where did you install node and npm? What does which npm report?

Contributor

ebaauw commented May 27, 2018

Most likely, the npm programme is not in the $PATH for root.

What OS are you on? Where did you install node and npm? What does which npm report?

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

Hi, thanx for responding!
/usr/lib/node_modules/npm
Raspbian on a raspberry pi 3 B+
Because I had some troubles setting up homebridge and I tried different ways, the whole maps tree could be a big mess!
I also get the 'bindings' error all the time'. That's where it all started and I got in trouble.
I don't know if this is important, but I work with a VNC server/viewer and use a macbook as keyboard, screen, mouse etc.

Sibelle65 commented May 27, 2018

Hi, thanx for responding!
/usr/lib/node_modules/npm
Raspbian on a raspberry pi 3 B+
Because I had some troubles setting up homebridge and I tried different ways, the whole maps tree could be a big mess!
I also get the 'bindings' error all the time'. That's where it all started and I got in trouble.
I don't know if this is important, but I work with a VNC server/viewer and use a macbook as keyboard, screen, mouse etc.

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

Odd. On Raspbian, the installation should have created a symlink in /usr/bin to npm. Probably best to re-install NodeJS (see https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions), which includes npm, update npm, uninstall homebridge and re-install homebirdge:

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm -g i npm
$ sudo npm -g un homebridge
$ sudo npm -g i homebridge --unsafe-perm

I don't know if this is important, but I work with a VNC server/viewer and use a macbook as keyboard, screen, mouse etc.

That shouldn’t matter. I’m running homebridge on a headless Raspberry Pi 3 B+ over vnc or ssh without any issues.

Contributor

ebaauw commented May 27, 2018

Odd. On Raspbian, the installation should have created a symlink in /usr/bin to npm. Probably best to re-install NodeJS (see https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions), which includes npm, update npm, uninstall homebridge and re-install homebirdge:

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm -g i npm
$ sudo npm -g un homebridge
$ sudo npm -g i homebridge --unsafe-perm

I don't know if this is important, but I work with a VNC server/viewer and use a macbook as keyboard, screen, mouse etc.

That shouldn’t matter. I’m running homebridge on a headless Raspberry Pi 3 B+ over vnc or ssh without any issues.

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

This seems to work, I only get this - config.json warning - as I check homebridge installation:

$ homebridge
Loaded plugin: homebridge-nest
Registering platform 'homebridge-nest.Nest'
 ---
config.json (/home/pi/.homebridge/config.json) not found.
Setup Payload:

Sibelle65 commented May 27, 2018

This seems to work, I only get this - config.json warning - as I check homebridge installation:

$ homebridge
Loaded plugin: homebridge-nest
Registering platform 'homebridge-nest.Nest'
 ---
config.json (/home/pi/.homebridge/config.json) not found.
Setup Payload:
@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

You need to create the .homebridge directory and a config.json in there, see https://github.com/nfarina/homebridge#installation-details and https://github.com/KraigM/homebridge-nest#configuration.

Contributor

ebaauw commented May 27, 2018

You need to create the .homebridge directory and a config.json in there, see https://github.com/nfarina/homebridge#installation-details and https://github.com/KraigM/homebridge-nest#configuration.

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

I already have this:
/usr/lib/node_modules/homebridge
en een 'uitvoerbaar scriptbestand met de naam homebridge':
search:///usr?recursive=1&show_hidden=1&name=homebridge&name_ci=1

Is this not ok?
inside the first one, the homebridge:
bin
lib
node_modules
config-sample.json
LICENSE
package.json
README.md

should I create a new .homebridge and a config.json by hand and let the the homebridge live in the node_modules to home/pi but also keep the homebridge that lives in /usr/lib/node_modules/ ?

Sibelle65 commented May 27, 2018

I already have this:
/usr/lib/node_modules/homebridge
en een 'uitvoerbaar scriptbestand met de naam homebridge':
search:///usr?recursive=1&show_hidden=1&name=homebridge&name_ci=1

Is this not ok?
inside the first one, the homebridge:
bin
lib
node_modules
config-sample.json
LICENSE
package.json
README.md

should I create a new .homebridge and a config.json by hand and let the the homebridge live in the node_modules to home/pi but also keep the homebridge that lives in /usr/lib/node_modules/ ?

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

You’ve successfully installed homebridge and the homebridge-nest plugin, now you need to configure it.

Contributor

ebaauw commented May 27, 2018

You’ve successfully installed homebridge and the homebridge-nest plugin, now you need to configure it.

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

Sorry, I do not get it: You wrote: You need to create the .homebridge directory and a config.json in there, see https://github.com/nfarina/homebridge#installation-details and https://github.com/KraigM/homebridge-nest#configuration.
And I answered: I have already the homebride with a config-sample.json living in it.
path: /usr/lib/node_modules/homebridge
but it as lives in a different spot... (my config.json is not living in /home/pi/.homebridge/config.json )
my question is:
Is it ok like this or do I have to replace something?

(I am a novice on this!)

Sibelle65 commented May 27, 2018

Sorry, I do not get it: You wrote: You need to create the .homebridge directory and a config.json in there, see https://github.com/nfarina/homebridge#installation-details and https://github.com/KraigM/homebridge-nest#configuration.
And I answered: I have already the homebride with a config-sample.json living in it.
path: /usr/lib/node_modules/homebridge
but it as lives in a different spot... (my config.json is not living in /home/pi/.homebridge/config.json )
my question is:
Is it ok like this or do I have to replace something?

(I am a novice on this!)

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

You don’t need to replace anything. homebridge is installed to /usr/lib/node_modules/homebridge. homebridge-nest is installed to /usr/lib/node_modules/homebridge-nest. The next step is to configure homebridge, telling homebridge to use the homebridge-nest plugin and telling homebridge-nest how to connect to your Nest devices. You need to create /home/pi/.homebridge/config.json and edit it, as described in the links.

Contributor

ebaauw commented May 27, 2018

You don’t need to replace anything. homebridge is installed to /usr/lib/node_modules/homebridge. homebridge-nest is installed to /usr/lib/node_modules/homebridge-nest. The next step is to configure homebridge, telling homebridge to use the homebridge-nest plugin and telling homebridge-nest how to connect to your Nest devices. You need to create /home/pi/.homebridge/config.json and edit it, as described in the links.

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

I created a /home/pi/homebridge file by hand and created a config.json in it.
I did it by creating a file in Raspberry Pi and copy the sample code. (used Atom editor)
So I copied the sample code from the sample config.json and edited it for NEST use.
If I search in my Raspberry for homebridge files now, I find 2 homebrigde files, so that is ok.
I did a reboot on Raspberry Pi.
And still, as I run: $ homebridge I get this config.json file not found.

$ homebridge
Loaded plugin: homebridge-nest
Registering platform 'homebridge-nest.Nest'
 ---
config.json (/home/pi/.homebridge/config.json) not found.
Setup Payload:
X-HM://----number----

Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

and a QR-code.

Because I am not at home I can not scan the QR now (Nest should be near), so that is for later.

Why he still does not find the file?
And there is a file homebridge-nest in:
/usr/lib/node_modules/homebridge-nest
is that ok? I think this is what you mean wit homebridge-next as you wrote.

Sibelle65 commented May 27, 2018

I created a /home/pi/homebridge file by hand and created a config.json in it.
I did it by creating a file in Raspberry Pi and copy the sample code. (used Atom editor)
So I copied the sample code from the sample config.json and edited it for NEST use.
If I search in my Raspberry for homebridge files now, I find 2 homebrigde files, so that is ok.
I did a reboot on Raspberry Pi.
And still, as I run: $ homebridge I get this config.json file not found.

$ homebridge
Loaded plugin: homebridge-nest
Registering platform 'homebridge-nest.Nest'
 ---
config.json (/home/pi/.homebridge/config.json) not found.
Setup Payload:
X-HM://----number----

Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

and a QR-code.

Because I am not at home I can not scan the QR now (Nest should be near), so that is for later.

Why he still does not find the file?
And there is a file homebridge-nest in:
/usr/lib/node_modules/homebridge-nest
is that ok? I think this is what you mean wit homebridge-next as you wrote.

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

I created a /home/pi/homebridge file by hand and created a config.json in it.

The directory needs to be called .homebridge (with a dot).

Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

This is for pairing the HomeKit bridge that homebridge exposes to your iDevice, using the QR code that homebridge will display, not the QR code from the Nest. I do think you need to be on the local network when pairing your iDevice with a HomeKit accessory (incl. homebridge).

Contributor

ebaauw commented May 27, 2018

I created a /home/pi/homebridge file by hand and created a config.json in it.

The directory needs to be called .homebridge (with a dot).

Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

This is for pairing the HomeKit bridge that homebridge exposes to your iDevice, using the QR code that homebridge will display, not the QR code from the Nest. I do think you need to be on the local network when pairing your iDevice with a HomeKit accessory (incl. homebridge).

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

If I make .homebridge I get an error. It says: .homebridge already exists.

Sibelle65 commented May 27, 2018

If I make .homebridge I get an error. It says: .homebridge already exists.

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

Delete the old .homebridge directory (just to be sure) and rename homebridge to .homebridge:

$ rm -r .homebridge
$ mv homebridge .homebridge
Contributor

ebaauw commented May 27, 2018

Delete the old .homebridge directory (just to be sure) and rename homebridge to .homebridge:

$ rm -r .homebridge
$ mv homebridge .homebridge
@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

Well.... My homebridge now is not visible anymore, it is .homebridge now which is hidden I guess.
The config.json is in it, as I did it before I changed homebridge in .homebridge.
As I run .homebridge I get a long list of code, part of it is an error:
`/usr/lib/node_modules/homebridge/lib/api.js:64
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^

Error: The requested accessory 'WeMo' was not registered by any plugin.
at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.`

Is this ok?

Sibelle65 commented May 27, 2018

Well.... My homebridge now is not visible anymore, it is .homebridge now which is hidden I guess.
The config.json is in it, as I did it before I changed homebridge in .homebridge.
As I run .homebridge I get a long list of code, part of it is an error:
`/usr/lib/node_modules/homebridge/lib/api.js:64
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^

Error: The requested accessory 'WeMo' was not registered by any plugin.
at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.`

Is this ok?

@ebaauw

This comment has been minimized.

Show comment
Hide comment
@ebaauw

ebaauw May 27, 2018

Contributor

Yes, files and directories starting with a dot are hidden. Use ls -a to see them.

Error: The requested accessory 'WeMo' was not registered by any plugin.

So you’ve specified the WeMo plugin in your config.json, but you haven’t installed the plugin (in the right directory). Make sure to install plugins with sudo npm -g i homebridge-plugin.

Contributor

ebaauw commented May 27, 2018

Yes, files and directories starting with a dot are hidden. Use ls -a to see them.

Error: The requested accessory 'WeMo' was not registered by any plugin.

So you’ve specified the WeMo plugin in your config.json, but you haven’t installed the plugin (in the right directory). Make sure to install plugins with sudo npm -g i homebridge-plugin.

@Sibelle65

This comment has been minimized.

Show comment
Hide comment
@Sibelle65

Sibelle65 May 27, 2018

Wowwww!! Til this step it works.
I deleted the 'WeMo' what ever that accessory may be, out of the config.json file.
After starting all over again with .homebridge, because my Home app said nest thermost. was already added, but it was not visible for me in the Home app it is now going to work.
solution:
I made a new file .homebridge in ~home/pi and renewed the homekit app (deleting .homebridge, making new OAuth on the NEST devel. page, and changing the config.json, restart iphone, resetting Nest, adding Nest to Nest app).
Now I was able to find the thermostat in my Home app. (HomeKit).

But there are still some questions:

The Home app finds that Homebridge is not certified and will probably not work ok with HomeKit. Is this a problem I can or have to solve?

Sibelle65 commented May 27, 2018

Wowwww!! Til this step it works.
I deleted the 'WeMo' what ever that accessory may be, out of the config.json file.
After starting all over again with .homebridge, because my Home app said nest thermost. was already added, but it was not visible for me in the Home app it is now going to work.
solution:
I made a new file .homebridge in ~home/pi and renewed the homekit app (deleting .homebridge, making new OAuth on the NEST devel. page, and changing the config.json, restart iphone, resetting Nest, adding Nest to Nest app).
Now I was able to find the thermostat in my Home app. (HomeKit).

But there are still some questions:

The Home app finds that Homebridge is not certified and will probably not work ok with HomeKit. Is this a problem I can or have to solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment