Community Hass.io Add-on: Homebridge

ok cool, amazing stuff you make. ill hop back over again to the Github

1 Like

This add-on is so great. Thank you thank you! This is what Iā€™ve been hoping to do since starting home assistant.

One minor annoyance is that there is such limited control over what components are added to HomeKit from home assistant. I have many groups and automations that i donā€™t want showing up, but in order to add a few i have to add all of them. I wish i could pick exactly which components were added.

Like i said itā€™s a minor annoyance. Everything else is great!

1 Like

@themanieldaniel, there actually is very good control over what you make visible within HomeKit. You can use one of two methods to manage this as described in the documentation. Within the ā€œconfig.jsonā€ config file, which is in the ā€œHomeBridgeā€ folder you can either:

  1. Set ā€œdefault_visibilityā€ to ā€œhiddenā€, and then individually customise which entities are visible in your ā€œcustomize.yamlā€ file using ā€œhomebridge_visible: trueā€

or

  1. Set ā€œdefault_visibilityā€ to ā€œvisibleā€ (note this is default in HASS.io) and then individually customise which entities are hidden in your ā€œcustomize.yamlā€ file using ā€œhomebridge_hidden: trueā€

I use the first option. It can be used for devices, groups, scenes and automations.

3 Likes

Oh, thank you so much for the clarification. I thought I had read all the documentation. I must not have. That is great. I will implement option 1 since I have only a few items that I want HomeBridge to communicate with.

1 Like

contribution entered. Hope its the right thread: Home couldn't connect to this accessory. Ā· Issue #216 Ā· home-assistant/homebridge-homeassistant Ā· GitHub
Please have another look @frenck.

Thanks for any suggestions you might have,
Marius

Hello. Iā€™ve installed this app, and connected to it using the default code and the iOS Home app. I ahvenā€™t changed anything at all in the config.json.

Homebridge sees devices (in the log), and the Home app sees them too, but the Home app cannot connect to any of them.

Any advice/something obvious Iā€™ve missed?

Thanks,

James

EDIT - this fixed itself! :slight_smile:

Hi! Home App sees ā€˜Home Assistantā€™, but cannot connect to Home App, any suggestions?

This is what happened to me, but it eventually rsolved itself after a few hours.

Iā€™ve had a couple instances where HomeKit took a while to catch up to significant changes I was making in devices. Iā€™m using my phone, and Apple TV and share access with a couple people with one or more devices each, and I think it just took a little while to sync all the changes around through that ecosystem. Not sure if thatā€™s your issue, but just a thought.

Hi all, Iā€™ve tried the troubleshooting instructions on Github, but HA isnā€™t showing up in the iOS Home app and the Homebridge logs keeps throwing errors. Process is:

  1. Start Homebridge, looks good, logs end with Server startup complete. Host name is hassio.local. Local service cookie is 1949741333.
  2. Some seconds later, the error below begins repeating:
Error: Not a valid username: 02:23:45:67:89:ab. Must be 6 pairs of colon-separated hexadecimal chars (A-F 0-9), like a MAC address.
    at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:215:13)
    at new Server (/usr/lib/node_modules/homebridge/lib/server.js:57:38)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)

Iā€™ve tried several different usernames, all giving the same error. My config file:

{
  "bridge": {
    "name": "Home Assistant",
    "username": "02:23:45:67:89:ab",
    "port": 51826,
    "pin": "123-45-678"
  },
  "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
    }
  ]
}

I had this working about 6 months back when I tried then, not sure why Iā€™m unable now. Any advice appreciated!

Uppercase your username: 02:23:45:67:89:AB

Brilliant solved :grinning:
Cheers

1 Like

Hi!

All of a sudden, over night, Homebridge stopped working on my hassio installation. I used it before I got to bed, an din the morning it was dead. Checking the logs, I found this:

[2017-12-26 11:12:21] Loading 0 accessories...
undefined:1
502: Bad Gateway
   ^
SyntaxError: Unexpected token : in JSON at position 3
    at JSON.parse (<anonymous>)
    at Request.request [as _callback] (/usr/lib/node_modules/homebridge-homeassistant/index.js:101:38)
    at Request.self.callback (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:313:30)

I havenā€™t done any updates or reinstallation recently. I now tried to uninstall Homebridge, remove Homebridge folder and then reinstall it. Same issue when starting fresh.

Any ideas what the error might be?

Hassio 1.1
Supervisor 0.77
Hass: 0.60
Homebridge: 2.2.0

Interesting, since Supervisor 0.77 came out last night.
What URL are you using to access your Home Assistant in the /config/homebridge/config.json file?

Last night? I did a restart of host yesterday, but Homebridge worked after that. Supervisor might have been updated in the restart.

Anyway, host config is "host": "http://hassio/homeassistant" .

I did find some logs now for Supervisor where it does not seem to pleased that the internal IP does not match the one of the certificate. Remote access to hass work though.

17-12-26 10:47:26 ERROR (MainThread) [asyncio] Unhandled exception in event loop
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 784, in uvloop.loop.__uv_stream_on_read_impl
  File "uvloop/handles/stream.pyx", line 563, in uvloop.loop.UVStream._on_read
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 503, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 694, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/usr/lib/python3.6/ssl.py", line 331, in match_hostname
    % (hostname, dnsnames[0]))
ssl.CertificateError: hostname '172.30.32.1' doesn't match 'hass.perbjorn.com'
17-12-26 10:47:26 ERROR (MainThread) [hassio.api.proxy] Client error on API states request Cannot connect to host 172.30.32.1:8123 ssl:True [CertificateError: ("hostname '172.30.32.1' doesn't match 'hass.perbjorn.com'",)].

Hmmm ok, I might check this with @pvizeli, apparently, your Home Assistant is running in SSL mode, which causes the proxy function (introduced in Supervisor 0.77) of Hassio to flip. (Certificates donā€™t match).

You might be able to work around this issue for now, by setting the external URL of your Home Assistant in the configuration.

Using external address worked fine! Will use in the mean time. Thanks for help!

No problem!

The issue has been identified and fixed. A new Supervisor will roll out as soon as possible.

Thanks to @pvizeli for the quick help and fix!

The issue has been fixed and an update for the Supervisor was released; v0.78.

To update to the latest Supervisor, go into the Hass.io panel, go to the Advanced section, and reload the Supervisor. An update button will appear after a couple of seconds.

After the upgrade, you should be able to restore the URL to the original one (recommended).

HI all,

Hope I have a related issue, if not please point me to the correct place:
my homebridge install does it all, except for being connected to the appā€¦ The app sees HomeAssistant but just wonā€™t connect.

Iā€™ve been able to see all events happen in the Homebridge log, and am connecting to ā€œhttps://domain.duckdns.org:8123ā€, ssl enabled. As a matter of fact, this has been about the only setting for HomeBridge to succeed in installing without errors

[2017-12-26 12:45:53] Homebridge is running on port 51826.

(aside from the ever appearing :

** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***

Havenā€™t forwarded the port 58126, which is as it is supposed to? Or should I forward?

Cheers,
Marius
.