Repository: Homebridge add-on

Adding "default_visibility": "visible" to the /config/homebridge/config.json file and restarting the add-on did the trick for me (but I had to reconfigure the rooms, favorites and so on…).

Please note that support for the add-on is now on GitHub or on this thread.

@frenck @Schneider Guest what I managed to get everything working again. Had a look at the documentation and under My iOS App Cannot Find Homebridge/Home Assistant I found the following which I wasn’t aware of.

iOS device has gotten your Homebridge username (looks like a MAC address) "stuck" somehow, where it is in the database but inactive. Fix: change your username in the "bridge" section of /config/homebridge/config.json to be some new value and restart the add-on.

Changed a single digit in the username and bang now shows up in iOS Home app. Happy again :smiley:

2 Likes

Use this to validate your JSON: json formatter https://jsonformatter-online.com
Hope this help!

Hi,

was the mdns (avahi) fixed on the 1.1.0 release? if so when will that happen?
cant discover my homebridge via homekit :frowning:

1.1.0 is not released yet.
Currently working on some pretty big stuff. I expect to be migrating the addon in the next week.

3 Likes

Did we ever figure out the ultimate cause for this? I’m running into the same problem after a new installation. I am using Let’s Encrypt and DuckDNS for remote access, seems like @andrew-curtis was having the same problem in a similar situation. Per the homebridge-homeassistant documentation, I’ve set "verify_ssl": false in the homebridge config.json (within the HomeAssistant platform), and I’m still experiencing the same problem.

Any other suggestions?

I was getting the same error at first; my Hassio setup is SSL with a Let’s Encrypt cert for the public hostname (but not the private IP obviously).

To resolve the “Socket hang up” issue, I made the following changes to Homebridge’s config.json:

Made sure that the "host" address used https://, not just http:// as was there by default:

"host": "https://172.17.0.1:8123"

Added my password to the "password" parameter.

And, added "verify_ssl": false.

After those changes, on the next restart Homebridge connected and listed all of my accessories.

3 Likes

Thanks, following these steps fixed the problem. For me, it was switching host to use https that did the trick.

Hello everyone!

I have a couple of template covers set up that are unable to work. Here is the error from log:

2017-09-13 13:05:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 173, in async_handle_cover_service
    yield from getattr(cover, method['method'])(**params)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/cover/template.py", line 297, in async_set_cover_position
    yield from self._position_script.async_run(
AttributeError: 'NoneType' object has no attribute 'async_run'

When activated from Homebridge (Home app) I get this error. The state is changed but no command is sent (script). I am using it with optimistic mode on to set the state (working great with HA UI)

Here is my configuration:

cover:
  - platform: template
    covers:
      persiana_suite:
        optimistic: true
        friendly_name: "Persiana da suíte"
        open_cover:
          service: script.persiana_suite_abrir
        close_cover:
          service: script.persiana_suite_fechar
        stop_cover:
          service: script.persiana_suite_parar

After update to 0.53 it started to work but after a Hass.io restart, it broke again…

Does anyone have this issue too?

Thanks a lot!

Hello @marthocoo! How are you?

I believe that I have the same setup as you and after reading your post, tried to change my host to “https://172.17.0.1:8123” instead of my DynDNS public host. Homebridge starts just fine but if I switch a light (for ie) using Home Assistant UI the change doesn’t update on Home App. If I switch it using Home app, HA UI updates.

I am trying to reduce the lag when using Home App. Sometimes, even on LAN, after I open the Home app, devices takes seconds to update the state. You can imagina how bad it is using 3G, most of time takes as much as a half a minute to update.

I am using an iPad Mini 2 as Homekit bridge.

Thank you!

Hi @Schneider! You are right it does sound like we have a similar set up. I will tell you my experience.

First, I think you should definitely absolutely use the https://172.17.0.1:8123 address in homebridge’s config.json instead of your dyndns public address: using the dyndns address means that homebridge has to go out to the internet to get your device states, which adds lag for no benefit! With the local (172…) address, homebridge is accessing Home Assistant directly through Docker’s networking stack, which should be much much faster.

Second, I’m not sure why you are experiencing the issue with Home not updating states correctly if a light is switched in HA. This may be a question for @frenck or even the author of Homebridge. This does not happen for me - changes in HA update in Home and buttons pressed in Home affect the device and are reflected in the HA GUI.

Third, I can’t speak directly to your issue accessing Home outside your wifi network since I am using an Apple TV 3 and not an iPad Mini. However, I will say that my Home app takes only approximately 3-5 seconds to update the state of my devices when I open the app. I have followed suggestions online and set the Apple TV 3 to not go into “sleep” mode, which may have something to do with it, and connected it to my network via Ethernet. In fact, this could be your problem with the iPad, since it’s a fact that idevices disconnect from wifi when idle. So it could be that you open your Home app, then it takes some seconds for the iPad to wake up, etc.

I am very happy with my Apple TV 3 setup for accessing Home remotely. I am not sure about what the market for used Apple TV 3’s is like in your country (I assume you are in Europe?) but in Canada, where I am, one can be had for approx 50 CAD (which is about 35 euro). It might be worth trying the ATV3 as your HomeKit bridge (even if you never use it to watch TV services, you could set it up just to use as a bridge). Just my two cents!

1 Like

Hello again @marthocoo!

Thank you so much for your time, I really appreciate!

I’ve set my config file to use the local host but still not able to receive the changes from the HA GUI :frowning:

Here is a video: https://photos.app.goo.gl/6EOHfY1Em0WDc9Yd2

I will look further into that. Here is my config:

{
  "bridge": {
    "name": "Home Assistant",
    "username": "B8:27:EB:B8:C2:6C",
    "port": 51826,
    "pin": "123-45-678"
  },
  "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",
        "cover",
        "input_boolean",
        "light",
        "alarm_control_panel",
        "lock",
        "scene",
        "sensor",
        "switch"
      ],
      "logging": false,
      "verify_ssl": false
    }
  ]
}

I absolutely agree with you about the iPad/ATV statement: I’ve decided to buy an used iPad so I can use it to control all accessories on the wall of my living room, on the other hand ethernet would be more effective with the ATV. Now I am starting to regret this decision hahaha

Thanks a lot for you help!

By the way, I’m from Brazil so that explains the bad english! hahaha

For the issue regarding changes not showing in the GUI, I think what I would do is delete the homebridge from Home and re-add, maybe even remove the homebridge adding and reinstall. This would obviously have the disadvantage of forcing you to rearrange your accessories in the Home app but the app is famous for getting “stuck” on old configs etc and it may be the case that starting fresh will help.

I totally understand about the iPad choice and I’ve been looking to do the same (mount an iPad for control of all my devices). You could always ALSO have an ATV3 and use that as the bridge instead of the iPad, but it may come down to a trade off of how much you want to spend on this versus how much delay/lag you are willing to live with. I personally would find a 30 second lag very difficult to tolerate.

And your English is very good! I only assumed you are in Europe (maybe Portugal) because of the naming of your accessories in Portuguese, but of course forgetting that Brazil is the largest Portuguese-speaking country in the world…

1 Like

Hello again!

Thanks for your advice! I had my home deleted from my home app. Also had deleted the persist folder and set another username on config file. Too bad it did not do the trick, still not updating the state from HA to Home app. :frowning:

The only way it works for me is if I use my DynDNS public domain… I will investigate what is going on.

Also thanks for your complement, I’m glad you could understand my problem.

Was trying clean reinstall and etc… nothing was helping. Tried on different iphones with ios 10. nothing…
But suddenly after upgrading to ios 11 it just started working :\

I use https://jsonformatter.org for JSON formatter and Validator

Hello sir! How are you today?

I was wondering: does your Apple TV 3 works fine now with devices using iOS 11? I’ve read that ATV3 is not compatible with the tvOS 11 version.

Since there are a few new features introduced on iOS 11 I was worried that it might be not possible to set ATV3 as a home bridge to access the Home app outside my house, using 3G.

I am still facing a lot a problems with stability and waiting time for my devices to be refreshed and available to use on 3G and now used ATV3 are affordable here in Brazil, so I can plug an Ethernet cable to maybe fix those problems.

Here is my iPad disconnecting from my WiFi at night (NMAP tracker), when I had the device’s screen turned off (locked):

image

Thanks mate!

Sorry @Schneider for the delayed reply. Unfortunately for your question I purchased an Apple TV 4K on its release and so it has now replaced my Apple TV 3 as the HomeKit bridge (it does this automatically, even though the Apple TV 3 is still installed in my house). So I can’t speak directly to your question.

But according to Apple, the Apple TV 3 will still work for remote access to your devices; see here: https://support.apple.com/en-ca/HT207057. Without an Apple TV 4 or 4K, or an iPad running iOS 11 to act as the HomeKit bridge, you won’t be able to set up Automations in the Home app (the Apple TV 3 does not support this, and it hasn’t since, I think, iOS 10). But since you are using HASS then you probably don’t use the Home app at all for Automation (I don’t) and only for remote control (like I do).

Hope this helps!

1 Like

Hey all! I was wondering if anyone knew how to get an ip camera to flow into homebridge with Hassio? I would love to have this integration, but don’t know where to start. I know that ffmpeg may be involved? But like I said, no idea how to even begin :slight_smile:

1 Like

Thank you very much for your answer! I will investigate further to possibly buy and ATV3 just for remote access. Have a great day my friend!