linuxscripts icon indicating copy to clipboard operation
linuxscripts copied to clipboard

check/status broken (with latest firmware?)

Open brian-silverman opened this issue 5 years ago • 5 comments

I'm running on an HS100, HW version 2.0, FW version 1.5.6 (as reported by Kasa App).

When running, I get an error and invalid result from "check" (my device is actually ON in the test below):

$ ./hs100.sh 192.168.1.25 9999 check
args are 192.168.1.25 9999 check
Connection to 192.168.1.25 9999 port [tcp/*] succeeded!
od: cannot skip past end of combined input
OFF

The reason is that in send_to_plug(), netcat returns nothing even though the payload is send successfully, and od complains about no input. I'm suspecting this broke in later firmware.

Also note: the on/off commands work perfectly. They don't need any output to work, of course.

brian-silverman avatar Aug 21 '20 16:08 brian-silverman

Thank you for the bug report. I have stopped using the hs100 and thus can't debug and fix the issue in the foreseeable future.

ggeorgovassilis avatar Aug 21 '20 16:08 ggeorgovassilis

No problem - thanks for the code!

brian-silverman avatar Aug 21 '20 18:08 brian-silverman

Keeping open for reference

ggeorgovassilis avatar Aug 21 '20 18:08 ggeorgovassilis

@brian-silverman please pull a new version (from github or docker) and try again, if you find the time. @Beanux was so kind to analyse the issue and provide a fix.

ggeorgovassilis avatar Sep 17 '20 15:09 ggeorgovassilis

Unfortunately, no, doesn't help in my case (just tried it). I'm not seeing ANY bytes of output from nc, so any changes down the chain (i.e. to egrep) have no effect.

brian-silverman avatar Sep 18 '20 17:09 brian-silverman