kevinbungeneers / nhc-homekit

Niko Home Control HomeKit bridge
MIT License
22 stars 3 forks source link

libavahi-compat-libdnssd-dev doesn't exist anymore? #5

Closed ghost closed 6 years ago

ghost commented 6 years ago

When installing libavahi-compat-libdnssd-dev I got this error:

npm ERR! code E404
npm ERR! 404 Not Found: libavahi-compat-libdnssd-dev@latest

starting nhc-homehit gives this error:

module.js:327
    throw err;
    ^
Error: Cannot find module '../build/Release/dns_sd_bindings'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/nhc-homekit/node_modules/mdns/lib/dns_sd.js:32:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)

Could it be that this lib doesn't exist anymore?

kevinbungeneers commented 6 years ago

You need to install those libs manually using your package manager (apt if you’re using a Debian derived distro). Once you’ve done that the npm install should run just fine.

Sent from my iPhone

On 22 Oct 2017, at 12:40, StevenGrow notifications@github.com wrote:

When installing libavahi-compat-libdnssd-dev I got this error:

npm ERR! code E404 npm ERR! 404 Not Found: libavahi-compat-libdnssd-dev@latest Could it be that this lib doesn't exist anymore?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost commented 6 years ago

I thought npm was my package manager? I just typed

npm install -g libavahi-compat-libdnssd-dev

and got

npm ERR! code E404
npm ERR! 404 Not Found: libavahi-compat-libdnssd-dev@latest

I'm on Synology and node v4.8.4 btw...

kevinbungeneers commented 6 years ago

Well, NPM is the package manager for NodeJS. The avahi libs are not npm packages and need to be installed via apt-get or yum, for example. You’ll need to google how to get those packages installed on your synology.

Sent from my iPhone

On 22 Oct 2017, at 16:37, StevenGrow notifications@github.com wrote:

I thought npm was my package manager? I just typed

npm install -g libavahi-compat-libdnssd-dev

and got

npm ERR! code E404 npm ERR! 404 Not Found: libavahi-compat-libdnssd-dev@latest I'm on Synology and node v4.8.4 btw...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

extric99 commented 6 years ago

@StevenGrow

Steven take a look at the below to install Debian Chroot on your synology https://discourse.pi-hole.net/t/how-do-i-install-pi-hole-on-a-synology-nas/289 https://www.npmjs.com/package/synology/tutorial and than the libavahi-compat-libdnssd-dev package http://www.ax10m.de/2016/05/homebridge-on-synology/

I will also try to get this working on synology and possibly turn it into a docker container.

extric99 commented 6 years ago

Seems there is an issue due to version incompatibility with the above. Seems it is missing "make" for which you need the developer tools from build-essential also mentioned in the homebridge link above

To get to the right version and start it: curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - sudo apt-get install -y nodejs sudo apt-get install build-essential git sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev sudo npm install nhc-homekit --unsafe-perm sudo /etc/init.d/avahi-daemon start sudo /etc/init.d/dbus start sudo systemctl restart nhc-homekit.service (to run it as service and exit to prompt)

smiesko99 commented 6 years ago

Hi Extric99

maybe you can help me. i will try to install this on raspberry PI and everything is working till i run nhc-homekit i got this error and i cant find nothing to resolve this issue

/usr/lib/node_modules/nhc-homekit/node_modules/nhc-client/lib/HomeControlClient.js:90 locations.data.forEach(function(location) { ^

TypeError: locations.data.forEach is not a function at JsonSocket.onMessage (/usr/lib/node_modules/nhc-homekit/node_modules/nhc-client/lib/HomeControlClient.js:90:20) at emitTwo (events.js:126:13) at JsonSocket.emit (events.js:214:7) at JsonSocket.onData (/usr/lib/node_modules/nhc-homekit/node_modules/nhc-client/lib/JsonSocket.js:42:12) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:594:20)

extric99 commented 6 years ago

I stoppped using this and moved to OpenHab where I have my Homekit running rock solid. I can also use it to connect to hue and other things which is great.

https://community.openhab.org/t/niko-home-control/3482/116

When using a PI you can install openhabian. At first it is a little challenging but feel free to contact me for pointers on setting up your homecontrol on it. I even have multiple users and geofencing working rock solid with full automation.

smiesko99 commented 6 years ago

Wow

thanks for your advice. i will try it today :) 👍 good to hear that somebody is running this without problem ....

thanks i will write you

smiesko99 commented 6 years ago

I will start with basic installation today is there any hints ? how to begin with niko ?

smiesko99 commented 6 years ago

To extric99 Uf i am stacking on installing NHC bundle i am putting the NHC to addons folder but after restart i am not able to see in bundle:list

smiesko99 commented 6 years ago

so finaly i have NIKO installed via PAPER UI. i have my bridge discoverd. i have all my actions in things but what next ? i am totaly lost ....

where can i write you ?

Tonio1180 commented 6 years ago

Hi, I see my Niko items on openHab, but when I add openHab accessory on Homekit, it says that the openHab is "not supported". Do you know how to resolve that ? Thanks.

smiesko99 commented 6 years ago

Hi

i had the same problem. but after configuring home.items in /etc/openhab2/items my hub is conected you can check this link https://www.youtube.com/watch?v=zUudW7ajQQ8

my problem now is that i have my switch light in homekit but when i switch on and switch off nothing happened. i think problem is that i have on my niko installation names of switch with "space" (kitchen light) i change in paper UI the name of my niko switch to name withou space "kitchenlight" as you need to have in home.items things like this Switch Light_Test "Light Livingroom" [ "Lighting" ] but not in my niko installaiton extric99 am i right ? do i need also in my niko installaion change the name of switch to name without space ?

thanks

extric99 commented 6 years ago

I am currently traveling for work so I will post my configuration later this week. I suggest having this discussion on the openHAB community forum. Happy to help anywhere I can. Just send me the forum link

smiesko99 commented 6 years ago

Hi

i asked on openhab web you advice me https://community.openhab.org/t/niko-home-control/3482/118 i have my NIKO working with homekit right now :) i only need som configuration and little help wit rollershuter and som rules

extric99 commented 6 years ago

Great. For me adding a Hue hub which is a certified device made it rock stable. You can also than invite other people (wife, kids) and do rules with geofencing.I have rules that when I or my girlfriend come home the lights go on automatically in the hall and kitchen. When both of us leave the house everything is shut down automatically. It is a small investment of 100 euro but was worth it for me. Without a certified hub the invitations will not go out to other iCloud accounts.

Below is my a part of my items file. There is a beta version of the homekit to control roller shutter but have not tried it. I will now try the Habpanel coding to create my own dashboards.

Small tip backup your config files and sd card. Easy to break stuff.

// Niko Home Control .items

Dimmer Dimmer_Living_TV "Dimmer Living TV" ["Lighting"] {channel="nikohomecontrol:dimmer:nhc:0:brightness"} Switch Kinderkamer "Kinderkamer" ["Lighting"] {channel="nikohomecontrol:onOff:nhc:18:switch"} Rollershutter Slaapkamer_Gordijn "Slaapkamer Gordijn" {channel="nikohomecontrol:blind:nhc:40:rollershutter"}

kevinbungeneers commented 6 years ago

Although I think it's great that you guys found a better alternative, I don't think this is the place to discuss this. More importantly, this is not related to the this issue so I'm closing this.

smiesko99 commented 6 years ago

Thanks for your time with this project Kevin

extric99 can i wrote you email ? my is serrrano at gmail.com