Closed gmaus60 closed 3 years ago
Additional info: I can ping the IP address of the switch from my computer. I can control the switch LED status indicator from Hubitat. I can turn the light ON from Hubitat, but can't turn if off again. If I manually turn the switch off, wait a moment, I can turn the light on again from Hubitat.
Did you do the following after updating (per instructions): Run the Kasa Integration App Select "update Installed Devices" Select Done the Next to exit the app.
This is necessary to update some fields and errors can occur otherwise. Assuming you have (I expect this),
line 571 reads: refresh() Change it to read runIn(1, refresh) Test and see if this fixes the issue.
Otherwise, I will need more data. Below test. Turn on debug logging including Save Preferences Open a Log Window Turn on Wait 1 minute Turn off Wait 1 minute Refresh
Send log to me. Log you provided showed some interesting errors - but I can not see the meaning w/o more detail of debug logging.
Dave
PS - The HS210 is designed to set the relay and then separately request the status (different from other plugs). This is due to the HS210 state not updating otherwise. The change is refresh at line 571 is to see if my not delaying that by 1 second is causing an issue.
The code mod did not make a difference. Yes I did update the drivers via the app.
Here are the logs....along with a ping to the switch from the router that the hub is connected to...
root@OpenWrt:~# ping 192.168.0.99 PING 192.168.0.99 (192.168.0.99): 56 data bytes 64 bytes from 192.168.0.99: seq=0 ttl=255 time=2.702 ms 64 bytes from 192.168.0.99: seq=1 ttl=255 time=2.559 ms 64 bytes from 192.168.0.99: seq=2 ttl=255 time=2.505 ms 64 bytes from 192.168.0.99: seq=3 ttl=255 time=2.533 ms 64 bytes from 192.168.0.99: seq=4 ttl=255 time=2.521 ms 64 bytes from 192.168.0.99: seq=5 ttl=255 time=2.705 ms 64 bytes from 192.168.0.99: seq=6 ttl=255 time=4.166 ms 64 bytes from 192.168.0.99: seq=7 ttl=255 time=32.130 ms 64 bytes from 192.168.0.99: seq=8 ttl=255 time=2.492 ms 64 bytes from 192.168.0.99: seq=9 ttl=255 time=2.528 ms 64 bytes from 192.168.0.99: seq=10 ttl=255 time=4.783 ms 64 bytes from 192.168.0.99: seq=11 ttl=255 time=4.806 ms 64 bytes from 192.168.0.99: seq=12 ttl=255 time=2.500 ms 64 bytes from 192.168.0.99: seq=13 ttl=255 time=2.519 ms
dev:11532021-03-25 07:13:40.821 pm warn[Plug Switch/6.2] Hall handleCommsError: 9 consecutive communications errors. Type = Socket Comms Timeout dev:11532021-03-25 07:12:36.771 pm warn[Plug Switch/6.2] Hall handleCommsError: 8 consecutive communications errors. Type = Socket Comms Timeout dev:11532021-03-25 07:12:33.899 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse) dev:11532021-03-25 07:12:32.695 pm warn[Plug Switch/6.2] Hall handleCommsError: 7 consecutive communications errors. Type = Socket Comms Timeout Retry 7 for command. dev:11532021-03-25 07:12:29.718 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse) dev:11532021-03-25 07:12:28.488 pm warn[Plug Switch/6.2] Hall handleCommsError: 6 consecutive communications errors. Type = Socket Comms Timeout Retry 6 for command. dev:11532021-03-25 07:12:25.381 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse) dev:11532021-03-25 07:12:24.162 pm warn[Plug Switch/6.2] Hall handleCommsError: 5 consecutive communications errors. Type = Socket Comms Timeout Retry 5 for command. dev:11532021-03-25 07:12:21.058 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse) dev:11532021-03-25 07:12:19.850 pm warn[Plug Switch/6.2] Hall handleCommsError: 4 consecutive communications errors. Type = Socket Comms Timeout Retry 4 for command. dev:11532021-03-25 07:12:16.743 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse) dev:11532021-03-25 07:12:15.521 pm warn[Plug Switch/6.2] Hall handleCommsError: 3 consecutive communications errors. Type = Socket Comms Timeout Retry 3 for command. dev:11532021-03-25 07:12:12.411 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_davegut_Kasa_Plug_Switch_1127.runin() is applicable for argument types: (java.lang.Integer, java.lang.String) values: [1, refresh] Possible solutions: run(), run(), find(), run(java.io.File, [Ljava.lang.String;), main(java.lang.String), wait() (parse)
Thanks. Two items:
Something is definitely wrong. I just need data that captures exactly where (again, I do not see error on exact same driver using HS200 and HS105).
I did not have upper case I. I fixed that. Problem remains.....
On @ 7:24:00 - light came on Off @ 7.25:00 - light stayed on
dev:11532021-03-26 07:25:33.860 am warn[Plug Switch/6.2] Hall handleCommsError: 8 consecutive communications errors. Type = Socket Comms Timeout dev:11532021-03-26 07:25:30.836 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:30.802 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:29.788 am warn[Plug Switch/6.2] Hall handleCommsError: 7 consecutive communications errors. Type = Socket Comms Timeout Retry 7 for command. dev:11532021-03-26 07:25:29.541 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:26.502 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:26.470 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:25.438 am warn[Plug Switch/6.2] Hall handleCommsError: 6 consecutive communications errors. Type = Socket Comms Timeout Retry 6 for command. dev:11532021-03-26 07:25:25.211 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:22.183 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:22.154 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:21.129 am warn[Plug Switch/6.2] Hall handleCommsError: 5 consecutive communications errors. Type = Socket Comms Timeout Retry 5 for command. dev:11532021-03-26 07:25:20.877 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:17.843 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:17.814 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:16.793 am warn[Plug Switch/6.2] Hall handleCommsError: 4 consecutive communications errors. Type = Socket Comms Timeout Retry 4 for command. dev:11532021-03-26 07:25:16.568 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:13.542 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:13.503 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:12.477 am warn[Plug Switch/6.2] Hall handleCommsError: 3 consecutive communications errors. Type = Socket Comms Timeout Retry 3 for command. dev:11532021-03-26 07:25:12.343 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:09.299 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:09.273 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:08.267 am warn[Plug Switch/6.2] Hall handleCommsError: 2 consecutive communications errors. Type = Socket Comms Timeout Retry 2 for command. dev:11532021-03-26 07:25:08.035 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:05.029 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:05.005 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:04.002 am warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout Retry 1 for command. dev:11532021-03-26 07:25:03.771 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:25:00.737 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:25:00.706 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":0}}, socketStatus = closed dev:11532021-03-26 07:25:00.703 am debug[Plug Switch/6.2] Hall off dev:11532021-03-26 07:24:36.872 am debug[Plug Switch/6.2] Hall socketStatus: closed dev:11532021-03-26 07:24:01.829 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:24:01.810 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"get_sysinfo":{}}}, socketStatus = open dev:11532021-03-26 07:24:01.807 am debug[Plug Switch/6.2] Hall refresh dev:11532021-03-26 07:24:00.623 am debug[Plug Switch/6.2] Hall socketStatus: open dev:11532021-03-26 07:24:00.595 am debug[Plug Switch/6.2] Hall sendLanCmd: {"system":{"set_relay_state":{"state":1}}}, socketStatus = closed dev:11532021-03-26 07:24:00.593 am debug[Plug Switch/6.2] Hall on
Update 6.2.1 is available. It fixes a type in the on/off command for HS210 switches. May fix your problem. Please respond with closing this comment if it fixes your issue.
THANKS for the great assist.
On - Off is now working, but the current state when going on, does not seem to update. I set the poll interval to 5 seconds, and that seems to have helped. When clicking on, the status takes 5 seconds to update, but when clicking off the status updates immediately. I'm not sure if this is normal or not. This switch is probably one of the least used switches in my setup and I don't have any automatons setup on it, so it's working, but still seem a bit wobbly.
Added a one second delay to get status from device (the HS210 has a delay when turning on before the status it reports changes).
Updated code is available. If you use HPM, do a Repair to update this driver.
Dave
Beauty! Thank you.
Hello - My HS210 3way switch is no longer responding in Hubitat. I have tried removing/re-adding the switch, including doing a factory reset and Hubitat will not control the device.
Here are some logs....
dev:11532021-03-25 05:42:52.517 pm info[Plug Switch/6.2] Hall distResp: Led On/Off response = [err_code:0] dev:11532021-03-25 05:42:51.317 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout Retry 1 for command. dev:11532021-03-25 05:42:47.307 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout Retry 1 for command. dev:11532021-03-25 05:42:46.868 pm errorjava.lang.RuntimeException: java.lang.InterruptedException (socketStatus) dev:11532021-03-25 05:41:48.201 pm info[Plug Switch/6.2] Hall updated: Setting Led off to 0. dev:11532021-03-25 05:41:46.122 pm info[Plug Switch/6.2] Hall updated: Attempting to Unbind the Device from the Kasa Cloud. dev:11532021-03-25 05:41:45.077 pm info[Plug Switch/6.2] Hall updated: device already set use LAN communications. dev:11532021-03-25 05:41:45.071 pm info[Plug Switch/6.2] Hall updated: poll Interval set to 30 minutes minutes. dev:11532021-03-25 05:41:45.058 pm info[Plug Switch/6.2] Hall updated: Driver version and data already correct. dev:11532021-03-25 05:41:45.056 pm info[Plug Switch/6.2] Hall updated: Debug logging is false dev:11532021-03-25 05:41:45.036 pm info[Plug Switch/6.2] Hall updated: Updating device preferences and settings. dev:11532021-03-25 05:41:41.848 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout Retry 1 for command. dev:11532021-03-25 05:41:40.772 pm info[Plug Switch/6.2] Hall updated: Setting Led off to 0. dev:11532021-03-25 05:41:38.723 pm info[Plug Switch/6.2] Hall updated: Attempting to Unbind the Device from the Kasa Cloud. dev:11532021-03-25 05:41:38.156 pm warn[Plug Switch/6.2] Hall handleCommsError: 1 consecutive communications errors. Type = Socket Comms Timeout Retry 1 for command. dev:11532021-03-25 05:41:37.667 pm errorjava.lang.RuntimeException: java.lang.InterruptedException (socketStatus) dev:11532021-03-25 05:41:04.354 pm info[Plug Switch/6.2] Hall updated: device already set use LAN communications.