sydspost / Domoticz-WiZ-connected-plugin

Domoticz WiZ connected plugin
MIT License
5 stars 6 forks source link

getaddrinfo failed line 256 #9

Closed LarsThunberg closed 2 years ago

LarsThunberg commented 2 years ago

Hi, I get this error now, with the result that the WiZ-lights does not update with correct status. Any idea what the problem can be?

2021-11-03 18:37:34.988 WiZ : (WiZ ) Endpoint 'wiz5034c7.lan' found.
2021-11-03 18:37:35.015 (WiZLampa1) Updating device from 1:'10' to have values 1:'10'.
2021-11-03 18:37:35.034 (WiZLampa2) Updating device from 1:'10' to have values 1:'10'.
2021-11-03 18:37:35.045 Error: WiZ : (WiZ ) handleThread: [Errno 11001] getaddrinfo failed line 256
sydspost commented 2 years ago

Lars, looks like this is DNS related. At this website you can find some more information: http://coddingbuddy.com/article/10476753/11001-returned-on-all-calls-to-getaddrinfo

Can you perform a nslookup of wiz5034c7.lan ? And after determing the ip-address of the device, can you do a recursive lookup with nslookup ?

LarsThunberg commented 2 years ago

The problem was that one of my lights was not online (AC power off). During debugging I noticed that the DNS lookup in handleThread was very slow, so I have actually removed that part and only updating the devices in loop "for Device in Devices:". So now the update/refresh of the lights goes much faster.

If I want to add a new light I just restart Domoticz and let the onStart() add the new lights.

I'm also looking at handle the error 11001 if any of the lights goes offline (AC power off). //Lars