MDNS failure - Homebridge
Closed this issue · 5 comments
Running Homebrige in a Freenas Jail for the past two days.
Installation instructions found here..
https://github.com/nfarina/homebridge/wiki/FreeNAS-9.3-and-9.10-Jail-Installation
Running the Homebridge-Wink and Homebridge-Nest plugins.
I installed into the jail successfully got wink running by using this wink fork...
npm install -g https://github.com/tekuonline/homebridge-wink.git
Two days go by and I started getting a "no response" in the home app on all of the devices.
I tried the common fix of deleting the persist & accessories folder, deleting devices from the home app and then restarting homebridge.
When I tried to restart homebridge this is what I got..
`root@homekitjail:/ # homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
[11/25/2016, 11:07:23 PM] Loaded plugin: homebridge-nest
[11/25/2016, 11:07:23 PM] Registering platform 'homebridge-nest.Nest'
[11/25/2016, 11:07:23 PM] ---
[11/25/2016, 11:07:23 PM] Loaded plugin: homebridge-wink
[11/25/2016, 11:07:23 PM] Registering platform 'homebridge-wink.Wink'
[11/25/2016, 11:07:23 PM] ---
[11/25/2016, 11:07:23 PM] Loaded config.json with 0 accessories and 2 platforms.
[11/25/2016, 11:07:23 PM] ---
[11/25/2016, 11:07:23 PM] Loading 2 platforms...
[11/25/2016, 11:07:23 PM] [Wink] Initializing Wink platform...
[11/25/2016, 11:07:23 PM] [Wink] Fetching Wink devices.
[11/25/2016, 11:07:23 PM] Initializing Nest platform...
[11/25/2016, 11:07:23 PM] Fetching Nest devices.
[11/25/2016, 11:07:24 PM] [Wink] Device Ignored Not In HomeKit - Group hubs, ID 521782, Name Hub
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146095, Name Master Bedroom Lamp
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146099, Name Front Porch Light
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146104, Name Living Room Lamp
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146109, Name Bryce's Lamp
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146163, Name Kitchen Can Lights
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146186, Name Hallway Can Light
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2146275, Name Kitchen Sink Light
[11/25/2016, 11:07:24 PM] [Wink] Device Ignored Not In HomeKit - Group hubs, ID 521893, Name Wink Relay
[11/25/2016, 11:07:24 PM] [Wink] Device Ignored Not In HomeKit - Group hubs, ID 521893, Name Gang
[11/25/2016, 11:07:24 PM] [Wink] Device Ignored Not In HomeKit - Group hubs, ID 521893, Name Wink Relay's Bottom Button
[11/25/2016, 11:07:24 PM] [Wink] Device Ignored Not In HomeKit - Group hubs, ID 521893, Name Wink Relay's Top Button
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group binary_switches, ID 296550, Name Top Light Load
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group binary_switches, ID 296549, Name Bookshelf
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2185632, Name Christmas Tree
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group binary_switches, ID 310802, Name TV
[11/25/2016, 11:07:24 PM] [Wink] Device Added - Group light_bulbs, ID 2195859, Name Kitchen Table Light
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Master Bedroom Lamp'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Front Porch Light'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Living Room Lamp'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Bryce's Lamp'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Kitchen Can Lights'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Hallway Can Light'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Kitchen Sink Light'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Top Light Load'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Bookshelf'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Christmas Tree'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'TV'...
[11/25/2016, 11:07:24 PM] [Wink] Initializing platform accessory 'Kitchen Table Light'...
[11/25/2016, 11:07:24 PM] Software version for Hallway Thermostat (Home) is: 5.6-7
[11/25/2016, 11:07:24 PM] Temperature unit for Hallway Thermostat (Home) is: Fahrenheit
[11/25/2016, 11:07:24 PM] Current temperature for Hallway Thermostat (Home) is: 74 F
[11/25/2016, 11:07:24 PM] Current humidity for Hallway Thermostat (Home) is: 40%
[11/25/2016, 11:07:24 PM] Target temperature for Hallway Thermostat (Home) is: 72 F
[11/25/2016, 11:07:24 PM] Target heating for Hallway Thermostat (Home) is: Heating/Cooling
[11/25/2016, 11:07:24 PM] Away for Hallway Thermostat (Home) is: 0
[11/25/2016, 11:07:24 PM] Initializing platform accessory 'Hallway Thermostat (Home)'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:┌────────────┐
│ 031-45-154 │
└────────────┘
**/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
^Error: dns service error: unknown
at Error (native)
at new Advertisement (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:526:20)
at emitOne (events.js:96:13)
at HAPServer.emit (events.js:188:7)
at HAPServer._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:185:8)
at emitOne (events.js:96:13)
at EventedHTTPServer.emit (events.js:188:7)
at EventedHTTPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)
at emitNone (events.js:86:13)
at Server.emit (events.js:185:7)
at emitListeningNT (net.js:1283:10)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)**
After doing some research I decided to reinstall avahi, enable dbus and the avahi daemon, then start both of those services.
Here is what I get...
root@homekitjail:/ # sysrc dbus_enable="YES"
dbus_enable: YES -> YES
root@homekitjail:/ # sysrc avahi_daemon_enable="YES"
avahi_daemon_enable: YES -> YES
root@homekitjail:/ # ln -s /usr/local/include/avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
ln: /usr/include/dns_sd.h: File exists
root@homekitjail:/ # service dbus start
Starting dbus.
Shared object "libexpat.so.1" not found, required by "dbus-daemon"
/usr/local/etc/rc.d/dbus: WARNING: failed to start dbus
root@homekitjail:/ # service avahi-daemon start
Starting avahi-daemon.
So I dug into this file to look at line 56
/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
@KhaosT suggested I open an issue here.
@agnat , any help would be appreciated.
Seems as if this is my issue?
**Shared object "libexpat.so.1" not found, required by "dbus-daemon"**
Thanks guys, hopefully I can get it sorted out!
Ok. This is not really an mdns issue. It's more about FreeBSD but lets' see...
Like you said, it looks like a broken dbus install. Try pkg install -y expat
or libexpat
or what have you.
I'm not sure about the mdnsd executable. It must be a freebsd service. In any case you should only run one mdns daemon or there will be chaos.
Last, I don't know homebridge or the other apps you mention. So, I don't know if the instructions are sound or if any of this resolves your initial issue (stopped working after two days).
HTH
The thing is: I'm not really clueful about FreeBSD. I have no idea how pkg
works and what to expect. All I can say is that dbus does not work because it fails to load the expat library. Without dbus there is no avahi and mdns will not work.
I'm going to close this since it is not an mdns issue. Consider reaching out to the FreeBSD guys on IRC and read about fixing packages on FreeBSD. Also, try contacting the guy who wrote the installation instructions.
Reopen the issue if the problem persists after fixing dbus and avahi.
No worries. I appreciate your help!