Inspired by Home Assistant Add-on: ADS-B Multi-Portal Feeder (Flightradar24 and FlightAware), I’ve put together a basic add-on that wraps Homebridge in the same fashion, leveraging the preexisting Docker Homebridge image.
Good job!
No homebridge knowledge here, but just by looking at the code I have 2 mentions:
-
should you provide a space for persistent storage? Original Dockerfiile creator mentioned to use
/homebridge
as a volume mount.
You could archive this easily via simlinking/homebridge -> /data
, see https://github.com/MaxWinterstein/homeassistant-addons/blob/f3c26a4a5413084c6081f44a9e0f5eb4699d76b0/eufy-ha-mqtt-bridge/run.sh#L6 for more -
does this really work without the
host_network
parameter?
Thanks! Good call on the persistent storage, I think I definitely need to add it to make the add-on survive upgrades. Regarding host_network
, it works fine here without it, but I’m also only really using Homebridge for the nest and nest-cam plugins, which are all cloud based. It’s possible that other plugins/devices might need it, but I don’t have any actual Apple device to test with and confirm.
Ok this turned out to be harder than expected as docker-homebridge
does quite a bit of setup on startup that hardcodes the original path all over, and I couldn’t just replace /homebridge
with a symlink due to it being declared as a volume. Some judicious sed
in the Dockerfile
seems to have done the trick though, and persistent storage should now work fine as of 0.1.2.
You should probably move this topic to the Homebridge category.
Unfortunately it appears this add-on has been abandoned. @davide125 if you’re still around, there’s a new version of Homebridge out that needs a newer version of NodeJS, which currently doesn’t survive the container being restarted.
I’m very grateful that you released this add-on in the first place. I hope you can find some time to update it. I’m currently traveling, but after I return, I will probably look into forking this - but I’m far less knowledgeable than you are about HASS add-ons
Not abandoned, I just haven’t had a chance to learn the new vscode-based addon development stuff and setup a system to get this updated and tested. Happy to take a PR if you had a chance to look into this already, otherwise I will try and find some time in coming weeks.
I’ve just published a new version of this that updates it to the latest Homebridge.
At GitHub - tronikos/home-assistant-addons: tronikos' Home Assistant add-ons repository I’ve published a Homebridge addon.
- It uses the official unmodified docker image of Homebridge
- It leverages an undocumented yet supervisor feature to map
addon_config
to/homebridge
, see home-assistant-addons/homebridge/config.yaml at 930fad4850815e0de12add24e613c387def2f424 · tronikos/home-assistant-addons · GitHub - It excludes the
node_modules
directory to reduce the size of the backups - Since it’s the official docker image, it includes the official logo
- The version of the addon matches the official version so you can easily tell which version you are running
- To get the latest version, just a single line needs to be changed and no need to build and publish a new docker image
This is working great for me except I can’t figure out how to update it. When I run the update from within homebridge after rebooting it just comes back up with the old version. Also it says node.js is out of date.
If you’re using my version available at GitHub - tronikos/home-assistant-addons: tronikos' Home Assistant add-ons repository I just updated it to 2024-10-02. It’s just one line of change in the repo and no need to rebuild and publish a new docker image since it’s using the official docker image. When there is a new version it would be better to create a github issue or just send me a PR. Ideally I’d like to automate this.