Closed tzickel closed 10 months ago
Just checked the if my hypostasis is correct, seems so, here is the Python code:
>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.connect(("192.168.0.211", 9957))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 113] No route to host
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.setsockopt(socket.SOL_SOCKET, 25, b'wlan0')
>>> s.connect(("192.168.0.211", 9957))
>>>
Found a manual temporary workaround, which works :/ (adding static IP to the Switcher)
ip route add 192.168.0.211/32 dev wlan0
Anyhow, even if you don't fix this bug, it shouldn't crash HomeBridge.
how did you solve it? add ip route on the docker?
I solved it by disabling all the other network adapters for homebridge
I'm not using docker, installed directly on RPi. The current solution I've written above, manual IP routing rules.
So I had to change my network setup, and now my RPi running Homebridge is connected to the router via 2 connections (One via Ethernet to the home network, and one via Wifi to the guest network, which the Boiler Switcher).
The plugin manages to update the state of the switch if triggered from outside, but it trying to do it via HomeBridge, it crashes HomeBridge and does not work.
If I has to guess why, it's because the new stupid router, connects the RPi on the same subnet twice (Although the guest network devices can't talk to the home network).
I think that this plugin is sending the commands via the wrong NIC which causes it to crash. Can you add an option in config, to set from which interface (or IP) to send the commands from ? Here is the crash log: