NRCHKB / node-red-contrib-homekit-bridged

Node-RED Contribution - HomeKit Bridged : Node-RED nodes to simulate Apple HomeKit devices.
https://nrchkb.github.io
MIT License
412 stars 52 forks source link

[Help needed]: bind EADDRINUSE <someIP>:5353 on macOS #504

Open Tazintosh opened 1 year ago

Tazintosh commented 1 year ago

Your Current NRCHKB Plugin Version

1.4.3

Operating System

macOS Big Sur

How can we help?

Hello everyone.

Here's the situation:

When setting up the custom mDNS fields of NRCHKB, Node-RED complains about Error: bind EADDRINUSE 10.80.10.2:5353. I guess the reason is that macOS is running is own instance of mDns. Anyway to workaround this?

Here are more informations about the setting:

With this setting, my issue is that all NRCHKB created HomeKit devices are in "no response" mode. Whatever the priority order I set for the interfaces (even if I place the Services VLAN topmost), the broadcast won't work.

I found two solutions to my problem, none are very good for me:

So, I digg around and found this topic and the NRCHKB option to specify the mDNS info. I did the following settings: (10.80.10.2 is my server IP set on the Services VLAN interface). For the test I obviously enabled back the native interface. Saving such a setting will prevent Node-RED to start with error: Error: bind EADDRINUSE 10.80.10.2:5353 I guess the reason is that macOS is running is own instance of mDns. Capture d’écran 2022-10-17 à 10 13 59

I'm not super tech in network thingy, so if ever you would have ideas on how to make Node-RED up and running when my native ethernet is enabled and still broadcast to the Services VLAN, I would immensely appreciate. I'm of course opened to other suggestions.

Thanks a lot in advance.

Any more details?

If this is specific to some hardware or specific software version, please explain here.

Any code or functions to add?

No response

Shaquu commented 1 year ago

First of all, are you using any different apps for HomeKit on the same server?

Tazintosh commented 1 year ago

Hi @Shaquu and thanks for the answer. No, I'm not using any other apps for HomeKit. The server is running standard macOS Big Sur + Node-RED + NRCHKB. It's also running Mosquito, a webserver, a database, etc., but nothing related to HomeKit directly as far as I know.

Shaquu commented 1 year ago

It will be tough since I do not know many people using vlan.

You could try to look for solution for HapNodeJS or homebridge. If it works there it should also work for us (both we and homebridge are based on HapNodeJS).

Also, have a look here https://medium.com/@gepeto42/using-homekit-devices-across-vlans-and-subnets-aa5ae1024939

caitken-com commented 10 months ago

Hi @Tazintosh where did you get with this?

Tazintosh commented 9 months ago

@caitken-com Nowhere, my native ethernet interface is maintain as inactive. settings.js is set with uiHost: "10.80.10.2"

caitken-com commented 9 months ago

Did the article Shaquu posted help any? https://recyclebin.zip/posts/medium-posts-homekit-vlans/

Tazintosh commented 9 months ago

Well, this article seems only about setting up the right firewall rules on your router. In my case, my Management network has access to all my RFC 1918 so I don't see why it would be blocked. Also, all my Local Network devices can access HomeKit (sitting on Service Network). Based on this two points, I don't yet understand why I get "no response" if I set the mDNS of Node-RED to my service network while my native ethernet interface with Management is enable.

Capture d’écran 2023-09-26 à 08 44 01

Shaquu commented 3 weeks ago

@Tazintosh any luck?