michbeck100 / pimatic-hap

Pimatic homekit bridge
GNU General Public License v2.0
30 stars 10 forks source link

dockerized pimatic #79

Closed delta2308151984 closed 5 years ago

delta2308151984 commented 5 years ago

Hi, my pimatic is running in a docker image on a Synology DS218+. After installing hap plugin in pimatic i get this error on startup:

An uncaught exception occurred: Error: dns service error: unknown 22:03:25.835 [pimatic]> at new Advertisement (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10) 22:03:25.835 [pimatic]> at Object.create [as createAdvertisement] (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10) 22:03:25.835 [pimatic]> at Advertiser.startAdvertising (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Advertiser.js:43:30) 22:03:25.835 [pimatic]> at Bridge.Accessory._onListening (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:611:20) 22:03:25.835 [pimatic]> at emitOne (events.js:96:13) 22:03:25.835 [pimatic]> at HAPServer.emit (events.js:189:7) 22:03:25.835 [pimatic]> at HAPServer._onListening (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:190:8) 22:03:25.835 [pimatic]> at emitOne (events.js:96:13) 22:03:25.835 [pimatic]> at EventedHTTPServer.emit (events.js:189:7) 22:03:25.835 [pimatic]> at EventedHTTPServer. (/home/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10) 22:03:25.835 [pimatic]> at emitNone (events.js:86:13) 22:03:25.835 [pimatic]> at Server.emit (events.js:186:7) 22:03:25.835 [pimatic]> at emitListeningNT (net.js:1287:10) 22:03:25.835 [pimatic]> at _combinedTickCallback (internal/process/next_tick.js:71:11) 22:03:25.835 [pimatic]> at process._tickDomainCallback (internal/process/next_tick.js:122:9) 22:03:25.835 [pimatic]> This is most probably a bug in pimatic or in a module, please report it!

Calprainn commented 5 years ago

I had the same issue and have the solution. But first: did you create your own Dockerfile or pull an existing container?

delta2308151984 commented 5 years ago

I use the petschni/pimatic docker image: https://hub.docker.com/r/petschni/pimatic/

Calprainn commented 5 years ago

Ok, this Image seems not be up-to-date but there a two reasons for the error you got:

  1. Avahi-Daemon must be installed
  2. the service daemons for dbus and avahi must be running

My advice: create your own Dockerfile and add the follow lines:

RUN apt-get -y install avahi-daemon avahi-discover libnss-mdns
RUN apt-get -y install libavahi-compat-libdnssd-dev

CMD service dbus start && service avahi-daemon start

delta2308151984 commented 5 years ago

Thanks a lot. I already had it installed in the container, but not startet the services. Now it works!