Repository: Homebridge add-on

awesome thanks!

I posted an issue on the github but haven’t head anything back.

Has anyone had this problem? https://github.com/olivierguerriat/hassio-addons/issues/1

I’ve not been able to get it to connect…

I just answered on GitHub, sorry for the delay.

ZOMG! THANK YOU!

After tinkering with HASS on my RPi3 for many months and seeing what I could do with it, I never could get Homebridge working.

I decided to start fresh and just installed hass.io last night and installed the homebridge add on just now and within minutes i was able to turn my lights off/on with Siri! You have made this so easy and accessible!

Now the hard part. Fine tune HomeBridge settings to get stuff to work like I want. :slight_smile:

1 Like

How do you install hass.io?? Is that different to Home Assistant?

it’s still Home Assistant, Its just a more modular and easily customised approach.

See here. Introducing Hass.io

In the Home app on my iPhone, Add Accessory is not showing anything at all to add. I noticed that in homebridge/config.json the host IP (starts 172.17 etc) which does not match my Home-assistant IP (192.168 etc).
Log below. Any advice?

starting version 3.2.1
Launching DBUS daemon…
Launching avahi daemon…
Process 24 died: No such process; trying to remove PID file. (/var/run/avahi-daemon//pid)
Launching 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>
[6/17/2017, 6:26:04 AM] Loaded plugin: homebridge-homeassistant
[6/17/2017, 6:26:05 AM] Registering platform 'homebridge-homeassistant.HomeAssistant'
[6/17/2017, 6:26:05 AM] ---
[6/17/2017, 6:26:05 AM] Loaded config.json with 0 accessories and 1 platforms.
[6/17/2017, 6:26:05 AM] ---
[6/17/2017, 6:26:05 AM] Loading 1 platforms...
[6/17/2017, 6:26:05 AM] [HomeAssistant] Initializing HomeAssistant platform...
[6/17/2017, 6:26:05 AM] [HomeAssistant] Fetching HomeAssistant devices.
[6/17/2017, 6:26:05 AM] Loading 0 accessories...
[6/17/2017, 6:26:05 AM] [HomeAssistant] Received event: ping
[6/17/2017, 6:26:05 AM] [HomeAssistant] Initializing platform accessory 'TV'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

Etc

The IP thing is normal, Homebridge communicates with Home Assistant via the local Docker network. Your logs show that the communication between Homebridge and Home Assistant is working correctly.

If you have […] Homebridge is running on port 51826. in your logs (just after the code), chances are that Homebridge is launched correctly as well.

I would then fallback to the Homebridge documentation, which has two handy manipulations to solve your problem (under “My iOS App Can’t Find Homebridge”) (don’t forget to restart the add-on each time you change the config). I hope it’ll do the trick for you.

1 Like

Is it possible to know what version of home bridge is running? I see in the logs 3.2.1 (0.3.2.1?) but just checked https://github.com/nfarina/homebridge/releases and they’re on 0.4.10. If it’s not updated is it possible to do it?

Thanks!

The Homebridge version is 0.4.20. I think the “starting version 3.2.1” comes from hass.io.

1 Like

I was having a similar issue if I restarted my RPi. But if I just restarted the HomeBridge add-on without restarting HASS if found everything just fine.

Thanks @olivierg and @andrew-curtis, a reboot of the PI did the trick!

1 Like

Well done, soon I don’t have any excuses not to try hass.io!

Hello I’m wondering how do I install this plugin? Because it seems I need npm to install it and I can’t find any npm tool,

I know home assistant has it’s own plugin for it but I want to use it on Homebridge instead

@nachiarg, My HB add-on is now reporting the same errors as you since yesterday after getting Lets Encrypt and my SSL certs working.

I have verified that its SSL for me. Commenting out base_url:, ssl_certificate: and ssl_key: gets HB working again.

What did you tweak exactly?

As explained in the documentation, you can simply list the plugins you want in the config field of the UI and they’ll be installed for you:

{
  "plugins": [
    "homebridge-tradfri"
  ]
}

You then need to configure them in your Homebridge’s config file, as usual (/config/homebridge/config.json).

I hasa problem white config.json I get error
[6/30/2017, 8:37:52 PM] Loaded plugin: homebridge-tradfri
[6/30/2017, 8:37:52 PM] Registering platform ‘homebridge-tradfri.Tradfri’
[6/30/2017, 8:37:52 PM] —
[6/30/2017, 8:37:52 PM] There was a problem reading your config.json file.
[6/30/2017, 8:37:52 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com
[6/30/2017, 8:37:52 PM]
/usr/lib/node_modules/homebridge/lib/server.js:197
throw err;
^
SyntaxError: Unexpected string in JSON at position 579
at Object.parse (native)
at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:191:19)
at new Server (/usr/lib/node_modules/homebridge/lib/server.js:52:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

and it won’t start up, can anybody help me white the config file I have for sure mist something

Yeah, your config.json is quite malformed. I like using this site for validating my JSON syntax…

First bit, you cannot put comments in a json file, so…
# "coapClientPath": "/usr/local/bin/coap-client" // OPTIONAL: See above
is out.

Next the errors just seem to be missing closing brackets and commas. Here is your config.json fixed…

{
  "bridge": {
    "name": "Home Assistant",
    "username": "CC:22:3D:E3:CE:38",
    "port": 51826,
    "pin": "031-45-154"
  },
  "description": "Homebridge for Home Assistant",
  "accessories": [],
  "platforms": [
    {
      "platform": "HomeAssistant",
      "name": "HomeAssistant",
      "host": "http://192.168.1.123:8123",
      "password": "XXXXXXX",
      "supported_types": ["binary_sensor", "climate", "cover", "device_tracker", "fan", "group", "input_boolean", "light", "lock", "media_player", "scene", "sensor", "switch"],
      "logging": true
    },
     {"platform" : "Tradfri",
     "name" : "Tradfri",
     "psk" : "XXXXXX"}
 ]
}

I too am having problems getting this to work. I have a few devices made by Incipio. They recognized and working on my ipad, I have homebridge link also with my ipad, but Im not getting anything. I think I read this works out of the box without configuration to any of the files withing HA, this right?

Really nice idea. Unfortunately it doesn’t work for me either. It does seem to start, but my phone doesn’t see it.

starting version 3.2.1
Linking the homebridge config directory
Ensuring homebridge-dummy is installed…
/usr/lib
└── [email protected] 
Launching DBUS daemon…
Launching avahi daemon…
Launching 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>
[7/28/2017, 8:33:39 AM] Loaded plugin: homebridge-dummy
[7/28/2017, 8:33:39 AM] Registering accessory 'homebridge-dummy.DummySwitch'
[7/28/2017, 8:33:39 AM] ---
[7/28/2017, 8:33:40 AM] Loaded plugin: homebridge-homeassistant
[7/28/2017, 8:33:40 AM] Registering platform 'homebridge-homeassistant.HomeAssistant'
[7/28/2017, 8:33:40 AM] ---
[7/28/2017, 8:33:40 AM] Loaded config.json with 1 accessories and 1 platforms.
[7/28/2017, 8:33:40 AM] ---
[7/28/2017, 8:33:40 AM] Loading 1 platforms...
[7/28/2017, 8:33:40 AM] [HomeAssistant] Initializing HomeAssistant platform...
[7/28/2017, 8:33:40 AM] [HomeAssistant] Fetching HomeAssistant devices.
[7/28/2017, 8:33:41 AM] Loading 1 accessories...
[7/28/2017, 8:33:41 AM] [My Stateful Switch 1] Initializing DummySwitch accessory...

I tried instructions here on the topic and the ones from the link posted by @olivierg with no luck. I added the “Dummy” just to see if it made any change .

My setup:

  • Home Assistant exposed on 443 via duckdns and letsencrypt valid certs
  • All ports on duckdns.org dns are closed except 443 (port forwarding)
  • Port 8123 is only available on local network
  • I tried telnet on 51826 on the local network (RPI3 IP from the router) and it refuses connection

Some suggestions:

  • Make Homebridge show version on startup
  • Allow setting of “URL” of home assistant in Plugin JSON
  • Update settings so it doesn’t show anymore “unknown” fields (like Maintainer: unknown) - helps with trust :slight_smile: