Closed Uzzi closed 7 months ago
Hi,
It looks like there might be something weird with your network config - can you post a screenshot of the IPv4 page from the setup?
Settings → Devices and Services → uhppoted → CONFIGURE → Network settings
It should look something like this:
Yes, In my settings there is bind address = Home assistean server ip , Listen address = Home assistean server ip :60001, broadcast = HAOS subnet.255:60000
The specific error is related to binding to the bind address which suggests that there is something odd with the bind address:
https://github.com/uhppoted/uhppoted-python/blob/main/src/uhppoted/udp.py#L64
...
try:
sock.bind(self._bind)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
...
Just to check - you are using a numeric IPv4 address? Because it sounds like it might be trying to resolve a hostname..
Also, do you get the same error if you configure it with:
0.0.0.0
255.255.255.255
0.0.0.0:60001
Something else to try - download the CLI from https://github.com/uhppoted/uhppote-cli/releases and run the following command:
./uhppote-cli --debug get-devices
If that works then we can go from there - if that doesn't work then it might be something to do with the way your network is set up.
In HAOS vm I've to download only uhppoted-app-home-assistant or also other uhppoted tools? In other vm,same network, I've uhppote-cli and it find my 2 controllers
setting 0.0.0.0 works fine
Ah! That explains it - the network inside a VM is not the same as the network on the host machine so it cannot resolve the host machine IP because it's not on the VM's internal network.
You'll have to use the 0.0.0.0
etc addresses - but TBH I don't think it's going to work because the current iteration of _uhppoted-app-homeassistant only supports controllers reachable by UDP broadcast and AFAIK UDP broadcasts are going to be restricted the VM network only.
Your best bet is probably to wait for support for non-local controllers - it's only planned for the next iteration though and that's only going to be in a couple of months.
Otherwise:
- There may be a way to configure the VM to forward UDP broadcast packets - it gets very complicated very quickly though
- You could use uhppoted-tunnel to set up a UDP tunnel between the VM and the host machine. That will probably work but again it's a little complicated..
Just seen your edit - that's good news!
Just for reference n case other people run into the same issue - what operating system are you running on and what VM are you using (VMWare/Virtulbox/Docker//etc) ?
Proxmox
Thanks ... going to close this. Feel free to reopen if you need to.
Hi, Coan you help me to fix it?
mar 13 07:40:00 haos homeassistant[526]: 2024-03-13 07:40:00.121 ERROR (MainThread) [custom_components.uhppoted.config] error retrieving list of controllers ([Errno -2] Name does not resolve) mar 13 07:40:00 haos homeassistant[526]: Traceback (most recent call last): mar 13 07:40:00 haos homeassistant[526]: File "/config/custom_components/uhppoted/config.py", line 163, in get_all_controllers mar 13 07:40:00 haos homeassistant[526]: response = u.get_all_controllers() mar 13 07:40:00 haos homeassistant[526]: ^^^^^^^^^^^^^^^^^^^^^^^ mar 13 07:40:00 haos homeassistant[526]: File "/usr/local/lib/python3.12/site-packages/uhppoted/uhppote.py", line 44, in get_all_controllers mar 13 07:40:00 haos homeassistant[526]: replies = self._udp.broadcast(request) mar 13 07:40:00 haos homeassistant[526]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mar 13 07:40:00 haos homeassistant[526]: File "/usr/local/lib/python3.12/site-packages/uhppoted/udp.py", line 64, in broadcast mar 13 07:40:00 haos homeassistant[526]: sock.bind(self._bind) mar 13 07:40:00 haos homeassistant[526]: socket.gaierror: [Errno -2] Name does not resolve