sydspost / Domoticz-WiZ-connected-plugin

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

Plugin don't detect device (lamp) #19

Closed pouilld closed 1 year ago

pouilld commented 1 year ago

WIZ lamp detected and managed by WIZ application. Plugin starts without problem. Domoticz version BUSTER 2022.2 WIZ hardware defined as: Hostname Prefix: wiz_ Subnet: 192.168.7.0/254 lamp is on wifi 2.4 Ghz network (192.168.7.44) id wiz142a9a Domoticz is on eth0 network (network card permanent in promiscious mode) plugin entered periodically without detecting WIZ lamp see log: 022-11-29 18:57:01.395 WIZ: WiZ connected plugin started 2022-11-29 18:57:01.395 WIZ: Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE 2022-11-29 18:57:01.395 WIZ: 'HardwareID':'25' 2022-11-29 18:57:01.395 WIZ: 'HomeFolder':'/home/pi/domoticz/plugins/Domoticz-WiZ-connected-plugin/' 2022-11-29 18:57:01.395 WIZ: 'StartupFolder':'/home/pi/domoticz/' 2022-11-29 18:57:01.395 WIZ: 'UserDataFolder':'/home/pi/domoticz/' 2022-11-29 18:57:01.395 WIZ: 'Database':'/home/pi/domoticz/domoticz.db' 2022-11-29 18:57:01.395 WIZ: 'Language':'fr' 2022-11-29 18:57:01.395 WIZ: 'Version':'1.0.0' 2022-11-29 18:57:01.395 WIZ: 'Author':'Syds Post' 2022-11-29 18:57:01.396 WIZ: 'Name':'WIZ' 2022-11-29 18:57:01.396 WIZ: 'Port':'0' 2022-11-29 18:57:01.396 WIZ: 'Key':'wiz' 2022-11-29 18:57:01.396 WIZ: 'Mode1':'wiz' 2022-11-29 18:57:01.396 WIZ: 'Mode2':'192.168.7.0/254' 2022-11-29 18:57:01.396 WIZ: 'Mode6':'-1' 2022-11-29 18:57:01.396 WIZ: 'DomoticzVersion':'2022.2' 2022-11-29 18:57:01.396 WIZ: 'DomoticzHash':'eea9db734' 2022-11-29 18:57:01.396 WIZ: 'DomoticzBuildTime':'2022-11-05 13:05:35' 2022-11-29 18:57:01.396 WIZ: Device count: 0 2022-11-29 18:57:03.516 WIZ: in handlethread 2022-11-29 18:57:03.518 WIZ: Acquiring GIL for 'onStartCallback' 2022-11-29 18:57:04.019 WIZ: Pushing 'onHeartbeatCallback' on to queue 2022-11-29 18:57:04.077 WIZ: Processing 'onHeartbeatCallback' message 2022-11-29 18:57:04.077 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:04.087 WIZ: Calling message handler 'onHeartbeat' on 'module' type object. 2022-11-29 18:57:04.087 WIZ: onHeartbeat called time=1669744624.087641 2022-11-29 18:57:04.087 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:04.201 RFXCOM: Temp + Humidity (St Bernard T° Entrée) 2022-11-29 18:57:04.548 Status: AEOTEC ZW090: Received timeout notification from HomeID: 3392531655, NodeID: 7 (0x07) 2022-11-29 18:57:04.710 Status: AEOTEC ZW090: Awake Nodes queried 2022-11-29 18:57:07.726 Availles: General/kWh (Availles kwh HC) 2022-11-29 18:57:07.754 Availles: General/kWh (Availles kwh HP) 2022-11-29 18:57:07.766 Availles: P1 Smart Meter (Availles kWh Total) 2022-11-29 18:57:07.774 Availles: Current (Availles courant) 2022-11-29 18:57:07.781 Availles: General/Percentage (Availles % charge) 2022-11-29 18:57:07.810 Availles: Temp + Humidity (Availles T° séjour) 2022-11-29 18:57:09.218 DOMOEDF: General/kWh (St Bernard HC) 2022-11-29 18:57:09.233 DOMOEDF: General/kWh (St Bernard HP) 2022-11-29 18:57:09.248 DOMOEDF: P1 Smart Meter (St Bernard kWh total) 2022-11-29 18:57:09.263 DOMOEDF: Current (St Bernard courant) 2022-11-29 18:57:09.275 DOMOEDF: General/Percentage (St Bernard charge phase 1) 2022-11-29 18:57:09.287 DOMOEDF: General/Percentage (St Bernard charge phase 2) 2022-11-29 18:57:09.300 DOMOEDF: General/Percentage (St Bernard charge phase 3) 2022-11-29 18:57:14.036 WIZ: Pushing 'onHeartbeatCallback' on to queue 2022-11-29 18:57:14.087 WIZ: Processing 'onHeartbeatCallback' message 2022-11-29 18:57:14.087 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:14.089 WIZ: Calling message handler 'onHeartbeat' on 'module' type object. 2022-11-29 18:57:14.089 WIZ: onHeartbeat called time=1669744634.0895653 2022-11-29 18:57:14.089 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:15.292 DOMOADRETS: Temp + Humidity (Adrets T° séjour) 2022-11-29 18:57:16.736 Status: Incoming connection from: 192.168.7.82 2022-11-29 18:57:17.208 RFXCOM: Temp (St Bernard T°. WC) 2022-11-29 18:57:17.668 EAU SUEZ: https://www.toutsurmoneau.fr/mon-compte-en-ligne/statJData//2022/11/2159778284 2022-11-29 18:57:18.620 EAU SUEZ: Parsing data for year: 2022 and month: 11 2022-11-29 18:57:18.620 EAU SUEZ: days left 7 2022-11-29 18:57:18.833 EAU SUEZ: Got data for year: 2022 and month: 11 2022-11-29 18:57:18.833 EAU SUEZ: Done 2022-11-29 18:57:18.834 EAU SUEZ: Next connection: 2022-11-30 09:06:14 2022-11-29 18:57:23.646 Status: User: Admin (IP: 192.168.7.71) initiated a switch command (351/St Bernard présence bureau/Off) 2022-11-29 18:57:23.652 Virtual devices: Light/Switch (St Bernard présence bureau) 2022-11-29 18:57:23.655 Status: Incoming connection from: 192.168.7.71 2022-11-29 18:57:24.006 WIZ: Pushing 'onHeartbeatCallback' on to queue 2022-11-29 18:57:24.056 WIZ: Processing 'onHeartbeatCallback' message 2022-11-29 18:57:24.056 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:24.056 WIZ: Calling message handler 'onHeartbeat' on 'module' type object. 2022-11-29 18:57:24.056 WIZ: onHeartbeat called time=1669744644.0565162 2022-11-29 18:57:24.056 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:27.307 Status: Incoming connection from: 86.217.157.205 2022-11-29 18:57:29.068 RFXCOM: Temp + Humidity (St Bernard T° Salle de bain) 2022-11-29 18:57:34.022 WIZ: Pushing 'onHeartbeatCallback' on to queue 2022-11-29 18:57:34.072 WIZ: Processing 'onHeartbeatCallback' message 2022-11-29 18:57:34.073 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:34.073 WIZ: Calling message handler 'onHeartbeat' on 'module' type object. 2022-11-29 18:57:34.073 WIZ: onHeartbeat called time=1669744654.0732188 2022-11-29 18:57:34.073 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:35.218 RFXCOM: Temp + Humidity (St B T° sonde humidité sud) 2022-11-29 18:57:38.585 Availles: Temp + Humidity (Availles T° ext.) 2022-11-29 18:57:39.078 DOMOADRETS: Temp (Adrets T° ext.) 2022-11-29 18:57:39.484 Availles: General/kWh (Availles kwh HC) 2022-11-29 18:57:39.509 Availles: General/kWh (Availles kwh HP) 2022-11-29 18:57:39.526 Availles: P1 Smart Meter (Availles kWh Total) 2022-11-29 18:57:39.540 Availles: Current (Availles courant) 2022-11-29 18:57:39.549 Availles: General/Percentage (Availles % charge) 2022-11-29 18:57:39.894 DOMOADRETS: Temp + Humidity (Adrets T° cave) 2022-11-29 18:57:41.687 RFXCOM: Temp + Rain (St Bernard pluviomètre) 2022-11-29 18:57:42.822 Availles: Temp + Humidity (Availles T° séjour) 2022-11-29 18:57:43.452 DOMOEDF: General/kWh (St Bernard HC) 2022-11-29 18:57:43.669 DOMOEDF: General/kWh (St Bernard HP) 2022-11-29 18:57:43.691 DOMOEDF: P1 Smart Meter (St Bernard kWh total) 2022-11-29 18:57:43.707 DOMOEDF: Current (St Bernard courant) 2022-11-29 18:57:43.720 DOMOEDF: General/Percentage (St Bernard charge phase 1) 2022-11-29 18:57:43.733 DOMOEDF: General/Percentage (St Bernard charge phase 2) 2022-11-29 18:57:43.746 DOMOEDF: General/Percentage (St Bernard charge phase 3) 2022-11-29 18:57:43.971 RFXCOM: Temp + Humidity (St Bernard T° Extérieure) 2022-11-29 18:57:44.039 WIZ: Pushing 'onHeartbeatCallback' on to queue 2022-11-29 18:57:44.089 WIZ: Processing 'onHeartbeatCallback' message 2022-11-29 18:57:44.089 WIZ: Acquiring GIL for 'onHeartbeatCallback' 2022-11-29 18:57:44.090 WIZ: Calling message handler 'onHeartbeat' on 'module' type object. 2022-11-29 18:57:44.090 WIZ: onHeartbeat called time=1669744664.090367 2022-11-29 18:57:44.090 WIZ: Acquiring GIL for 'onHeartbeatCallback'

Please help, Daniel

sydspost commented 1 year ago

Daniel, when wiz-connected devices are not detected by the plugin is most of the time related to DNS or resolving problems. Determ the FQDN (full qualified domain name) of your wiz-connected device on your router or DNS server and the related ip-adres. Check if the FQDN-hostname of your device starts with the prefix wiz_. Check if the resolving of the ip-adress works on your domoticz server with nslookup .

If any of these checks have a negative result, fix that. With establishing a DNS server or a the FQDN and IP adress to /etc/hosts on your domoticz server or configure the right prefix in the plugin settings.

pouilld commented 1 year ago

Thanks for your answer. Having solved the DNS problem and been able to ping the device using its FQDN , it is now recognized by the plugin and created in Domoticz. A great thanks for your help. By the way, could you explain whats is the meaning of the "subnet" field in the plugin parameter : 192.168.2/0. Thanks in advance, Daniel

sydspost commented 1 year ago

Daniel,

With the subnet parameter you can increase or decrease the "bandwidth" of the number of ip-adresses which are checked if its a wiz-connected device. Because the plugin does a arp request within the subnet, and then does a nslookup for every ip-adress on that subnet to determine its a wiz-connected device. On huge subnets that can be very time and resource consuming.

Great that i could help you, please close the issue on GitHub.

Syds

Outlook voor Androidhttps://aka.ms/AAb9ysg downloaden


From: pouilld @.> Sent: Thursday, December 1, 2022 8:04:10 PM To: sydspost/Domoticz-WiZ-connected-plugin @.> Cc: sydspost @.>; Comment @.> Subject: Re: [sydspost/Domoticz-WiZ-connected-plugin] Plugin don't detect device (lamp) (Issue #19)

Thanks for your answer. Having solved the DNS problem and been able to ping the device using its FQDN , it is now recognized by the plugin and created in Domoticz. A great thanks for your help. By the way, could you explain whats is the meaning of the "subnet" field in the plugin parameter : 192.168.2/0. Thanks in advance, Daniel

— Reply to this email directly, view it on GitHubhttps://github.com/sydspost/Domoticz-WiZ-connected-plugin/issues/19#issuecomment-1334218325, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK6Q3QPQJCYHX3E7ZWNVDI3WLDZCVANCNFSM6AAAAAASOY6V3Y. You are receiving this because you commented.Message ID: @.***>

pouilld commented 1 year ago

Hi Syds, thanks for your answer. If I understand wee, the subnet parameter should be the generic (xxx.xxx.xxx.0) subnet in which the wiz device has an assigned IP address (192.168.7.0/xx in my case) and the field xx represent the number of IP addresses that the plugin will scan (starting to 1 in order to find the FQDN "wiz_" devices. As this is done by sending ARP requests (that can be resource consuming) does it means that one should preferably assign in the IP low addresses range in order to restrict the number of ARP requests in the "xx" defined in the plugin subnet parameter? I think it will be interesting to give more information about this subnet parameter into "READ.ME"plugin about how to correctly specify it. Anyway, thanks again for your help. Daniel