Repository: Homebridge add-on

homebridge is not starting after restart the addon. I see this in the Log.

I googled this error at the end of the log. A possible fix is to reinstall sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev
But how is this possible on hass.io? I reinstalled the homebridge addon with no success. Homebridge worked perfectly fine before the addon restart (because I added a new sensor)

starting version 3.2.2
[ADD-ON] Ensuring old PID files are absent
[ADD-ON] Ensuring D-Bus unique ID exists
[ADD-ON] Starting D-Bus daemon
[ADD-ON] Starting Avahi daemon
Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
Successfully dropped root privileges.
write(): No space left on device
Failed to create PID file: No space left on device
[ADD-ON] Applying HAP NodeJS IPV6 HOTFIX
patching file /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js
[ADD-ON] Starting 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>
[10/20/2017, 11:03:39 AM] Loaded plugin: homebridge-homeassistant
[10/20/2017, 11:03:39 AM] Registering platform 'homebridge-homeassistant.HomeAssistant'
[10/20/2017, 11:03:39 AM] ---
[10/20/2017, 11:03:39 AM] Loaded config.json with 0 accessories and 1 platforms.
[10/20/2017, 11:03:39 AM] ---
[10/20/2017, 11:03:39 AM] Loading 1 platforms...
[10/20/2017, 11:03:39 AM] [HomeAssistant] Initializing HomeAssistant platform...
[10/20/2017, 11:03:39 AM] [HomeAssistant] Fetching HomeAssistant devices.
[10/20/2017, 11:03:39 AM] Loading 0 accessories...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'deaktiviere Alarmanlage'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'aktiviere Alarmanlage'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Ad Blocker'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Jalousie_Wohnzimmer'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Weihnachtsstern'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Alarm ausgeloest'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Drucker'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Ambilight'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Jalousie_Esszimmer'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Lichterkette_draussen'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Lichterkette'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Venta'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Jalousie_Kueche'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Luftbefeuchter Schlafzimmer'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Luftbefeuchter Kira'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Mobil Sonos'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Wohnzimmer Sonos'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Stehlampe'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Flurlampe'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Jalousie HWR'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Küchen Lampe'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Temperatursensor_Kueche'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Helligskeitssensor_Kueche'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Wohnzimmerlampe'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Jalousie Schiebetür'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Brunnenpumpe'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Ladestation'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Kompressor'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Carport Steckdose'...
[10/20/2017, 11:03:41 AM] [HomeAssistant] Initializing platform accessory 'Temperatur Wohnzimmer'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                   
┌────────────┐     
│ 853-81-325 │     
└────────────┘     
                   
/usr/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 new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:575:20)
at emitOne (events.js:96:13)
at HAPServer.emit (events.js:191:7)
at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:190:8)
at emitOne (events.js:96:13)
at EventedHTTPServer.emit (events.js:191:7)
at EventedHTTPServer.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)

Seems like you have a totally different issue going on there. Maybe you’ve missed it.

write(): No space left on device
Failed to create PID file: No space left on device
1 Like

Oh shit :joy:
I totally missed this. My recorder Database used a lot of space because of a new componete.
Now its working again. Thx a lot

1 Like

I had Homebridge set up in Hass.io and everything was working correctly. I recently added the duckdns add on and Homebridge no longer works on my iPhone. The component loads correctly and i get the Homebridge is running on port message. Below is a sample of my config. Any help would be appreciated.

  "description": "Homebridge for Home Assistant",
  "accessories": [],
  "platforms": [
    {
      "platform": "HomeAssistant",
      "name": "HomeAssistant",
      "host": "https://172.17.0.1:8123",
      "password": "password",
      "default_visibility": "visible",
      "supported_types": ["binary_sensor", "climate", "cover", "device_tracker", "fan", "group", "input_boolean", "light", "lock", "media_player", "scene", "sensor", "switch"],
      "logging": true,
      "verify_ssl": false
    }
  ]
}

Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
[10/20/2017, 10:26:50 AM] Homebridge is running on port 51826.

Since a lot of people still hang around on this topic:

V2.0.0 of the Homebridge add-on is released.
Read more about it here:

https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705/73?u=frenck

Hello @frenck! How are you my friend?

It just arrived: https://github.com/home-assistant/homebridge-homeassistant/releases/tag/3.0.0

Is this an update for the Homebridge addon just for non-hassio users?

Thanks as always!

1 Like

This topic is related to old add-on which has been abandoned by the author.

Please use this topic for the discussion regarding the add-on:
https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705/73

1 Like

Sorry! My mistake. Thanks!

Did you ever fix this? I had a similar issue when I setup DuckDNS/LetsEncrypt. If I used the docker IP address, it wouldn’t work (HomeBridge wouldn’t even actually fully load, kept getting this error:

Failed getting devices: Error: connect ECONNREFUSE

However, if I changed the host to my DuckDNS address, it worked but now my Home app had a significsnt delay in updating every time I opened it. Does anyone have HomeBridge working using the docker IP address with DuckDNS/LetsEncrypt setup?

@shred

Please use the URL as described in the documentation: GitHub - hassio-addons/addon-homebridge:  Homebridge - Community Hass.io Add-on for Home Assistant

Furthermore, please use this topic regarding the Homebridge add-on:

I don’t know how I missed that… spent so many hours trying to figure this out too, lol. Thanks. For anyone else running into the same issue, reference the link @frenck mentioned above. It specifically states:

We recommend using http://hassio/homeassistant as the host with an empty password, which allows Homebridge to talk to Home Assistant directly.

Edit: Unfortunately, HomeKit is still slower even with the config.json as mentioned above. When I didn’t have DuckDNS/LetsEncrypt installed, the Home app updated almost immediately after opening it. Now it takes anywhere from 2-4 seconds.

For new installations, it is actually the default. It was changed recently.

I can’t seem to get homebridge to accept the PIN … each time I try, I only get the message “Couldn’t add Home Assistant.”
Running iOS 11.1 and hassio 0.57.2 and trying to install homebridge v2.1.1. I have had homebridge installed before using the AIO version of Home Assistant, but cleared all settings before starting. For this install:

  • I left all options default (default host and blank password, per docs)
  • started homebridge after installing from the hassio repo
  • located PIN in the generated config file
  • add using my iPhone “home” app and entering PIN

After failure, I have tried both changing the MAC “user ID” as well as deleting the persist folder, each time with the same result.

  • My hassio is running on a wired network while my iPhone is on WiFi … but communication is allowed and does not appear to be an issue.

  • I am using Let’s Encrypt for SSL

I tried uninstalling the add on and re-installing. On the initial install and upon re-installation, the “Logs” section of the add on did not appear to work, as nothing appears when “Refresh” is clicked. I’m not sure where to manually look for the logs or if this is a known issue in the hassio UI with this version.

Any ideas beyond this?

Default config, but here it is:

{
  "bridge": {
    "name": "Home Assistant",
    "username": "E2:52:44:8E:7F:9A",
    "port": 51826,
    "pin": "916-80-420"
  },
  "description": "Homebridge for Home Assistant",
  "accessories": [],
  "platforms": [
    {
      "platform": "HomeAssistant",
      "name": "HomeAssistant",
      "host": "http://hassio/homeassistant",
      "password": "",
      "default_visibility": "visible",
      "supported_types": [
        "automation",
        "binary_sensor",
        "climate",
        "cover",
        "device_tracker",
        "fan",
        "group",
        "input_boolean",
        "light",
        "lock",
        "media_player",
        "remote",
        "scene",
        "script",
        "sensor",
        "switch",
        "vacuum"
      ],
      "logging": true,
      "verify_ssl": true
    }
  ]
}

Maybe share your config.json? Keep in mind, you’ll likely get more support on the Homebridge forums than here, as this is just a way to get homebridge on Home Assistant so the focus is on that, not on Homebridge itself…

Thanks for the reply!
I’m basically using the default config, included in my post above…I have used homebridge before and am competent in setting it up. My issue is related to the homebridge add-on in hassio. I’ve tried with the recommended blank password and default path as well as adding the full url/port and password but each time it fails to add home assistant to the iOS home app.

In my case, I have “verify_ssl”: false in support of my encryption setup. (and I used httpS://{ip address}:8123)

Otherwise I agree, looks pretty standard. Not sure why else Home app would not recognize/connect to it.

Anyone have any experience or know if / how to edit these options?:

{
  "log_level": "info",
  "avahi_interfaces": "",
  "avahi_hostname": "",
  "avahi_domainname": "local",
  "enable_ipv6": false,
  "packages": [],
  "init_commands": [],
  "plugins": []
}

The docs are sparse on these …

KEEP IN MIND, THIS THREAD WHERE YOU POSTED IS FOR AN OBSOLETE ADD-ON.

New thread for the replacement Homebridge Add-on:
https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705/73

Configuration info:

With that out of the way, it took me a few minutes to remember the context of the options you referenced since I haven’t revisited mine in some time. Here’s my Homebridge Add-on Options section:

{
  "log_level": "info",
  "avahi_interfaces": "",
  "avahi_hostname": "",
  "avahi_domainname": "local",
  "enable_ipv6": false,
  "packages": [
    "git"
  ],
  "init_commands": [],
  "plugins": [
    "homebridge-harmonyhub",
    "homebridge-alarmdotcom",
    "homebridge-platform-wemo",
    "homebridge-suncalc"
  ]
}

I can’t remember why I put “git” in packages unless I needed it for one of my plugins. The plugins you will want to include are for devices or platforms you want to control in HomeKit directly. From above, I’m using HarmonyHub, Alarm.com, Wemo, and Suncalc. If you are simply trying to surface items configured and controlled by HA in your HomeKit environment you don’t need these additional Homebridge plugins. I prefer to, in the cases above, to control the devices directly from HomeKit for various reasons. Hope this helps some.

Like stated many times, this project/repository/add-on is no longer maintained.

Please check out this topic for the replacement:

Locking down this topic.