homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

TrueNAS Scale documentation improvement #522

Closed half2me closed 5 months ago

half2me commented 8 months ago

Describe The Bug

I was following along with the guide here: https://github.com/homebridge/docker-homebridge/wiki/Homebridge-on-TrueNAS-Scale

I have a few suggestions to make this guide better. First of all the guide offers a hacky way to get things to work by creating a 2nd NIC, then adding a startup script to remove the default one, including having to use enable CAP_NET_ADMIN.

The biggest problem with this approach is that homebridge is not able to communicate with other services running in the kubernetes cluster. In my particular case I use zigbee2mqtt, and I have mosquitto running in the cluster, but homebridge is unable to access it.

Instead, I recommend to just leave both interfaces active, make sure to enable Kubernetes DNS instead of ignoring it, and simply telling homebridge to only advertise on net1 and not eth0. You also need to pick an mDNS Advertiser other than bonjour HAP, such as avahi which can actually support specifying the interface to advertise on instead of just automatically picking the first one it sees.

This way homebridge is properly advertised on the secondary NIC, but you also get the first NIC to access k8s, and it is setup with your default gw etc.

This is how I have it setup and its working very well.

Docker Config

n/a

Logs

n/a

Host Operating System

Other (specify in description)

Host Architecture

x86_64 / amd64

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

half2me commented 7 months ago

ping

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

maximvoven commented 6 months ago

I second this change recommendation. Also I discovered this issue due to the startup script changes failing to disable eth0 even though instructions were followed to the letter. This led me to be unable to connect iOS device to the bridge.

Truenas: TrueNAS-SCALE-23.10.0.1 Homebridge: 2308.0.1

The configurations that @half2me apparently changed are in the photo bellow. image

I think we should make a pull request to replace Step 3. Replacing "We must remove that interface on container startup, through Homebridge's startup script configuration (this is why we need the CAP_NET_ADMIN capability)." with "We must configure the advertising interface to to be net1 and change the mDNS advertiser to Avahi to honor the configuration override" The remainder of the instructions should be modified to include the above image as well as to direct the user to change the settings using the gui.

half2me commented 6 months ago

Since I wrote this, I have things running perfectly with this setup at home.

Suncuss commented 6 months ago

I second this change recommendation. Also I discovered this issue due to the startup script changes failing to disable eth0 even though instructions were followed to the letter. This led me to be unable to connect iOS device to the bridge.

Truenas: TrueNAS-SCALE-23.10.0.1 Homebridge: 2308.0.1

The configurations that @half2me apparently changed are in the photo bellow. image

I think we should make a pull request to replace Step 3. Replacing "We must remove that interface on container startup, through Homebridge's startup script configuration (this is why we need the CAP_NET_ADMIN capability)." with "We must configure the advertising interface to to be net1 and change the mDNS advertiser to Avahi to honor the configuration override" The remainder of the instructions should be modified to include the above image as well as to direct the user to change the settings using the gui.

Take a look at the log, in my case, i found that it try to run those command, but the operation failed becuase of permission, it shows in the logs. I change the Capability to NET_ADMIN, that did the work. Now i successfully added the hub to homeKit, but none of the accesories are shwoing up even though i can see and control themin the homebridge WebUI.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

half2me commented 5 months ago

Is there anything I can do to add this?

NorthernMan54 commented 5 months ago

@half2me The wiki pages should editable by everyone. If not pls let me know

donavanbecker commented 5 months ago

@half2me Feel free to update the wiki you are wanting to change and let us know when you are done.

half2me commented 5 months ago

@half2me Feel free to update the wiki you are wanting to change and let us know when you are done.

thanks @donavanbecker, I've made the changes to the wiki.