Giter Site home page Giter Site logo

Comments (9)

gmaus60 avatar gmaus60 commented on August 15, 2024

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.

from hubitatactive.

DaveGut avatar DaveGut commented on August 15, 2024

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.

from hubitatactive.

gmaus60 avatar gmaus60 commented on August 15, 2024

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)

from hubitatactive.

DaveGut avatar DaveGut commented on August 15, 2024

Thanks. Two items:

  • The line you added should be case sensitive ?runIn(1, refresh)". (the "I" must be upper case.)
  • I need a log with debug logging turned on for the device before doing the test steps. That logging will identify what is happening in a good time sequence.

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).

from hubitatactive.

gmaus60 avatar gmaus60 commented on August 15, 2024

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

from hubitatactive.

DaveGut avatar DaveGut commented on August 15, 2024

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.

from hubitatactive.

gmaus60 avatar gmaus60 commented on August 15, 2024

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.

from hubitatactive.

DaveGut avatar DaveGut commented on August 15, 2024

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

from hubitatactive.

gmaus60 avatar gmaus60 commented on August 15, 2024

Beauty! Thank you.

from hubitatactive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.