-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binary characters found in status payload #8
Comments
Thanks @spideyb . Which device/firmware version? |
HS110 v1.0 - Firmware: 1.0.8 BTW - thanks for the scripts, real useful |
Hello, i got the same "issue". the egrep become: send_to_plug $ip $port "$payload_query" | decode | egrep -oa 'relay_state":[0,1]' | egrep -o '[0,1]' and this should also fix the #13 Result recieved by cmd_print_plug_relay_state():
|
Thank you @Beanux for the analysis and fix. |
I found that running the status payload was returning binary characters, adjusting cmd_print_plug_relay_state() to the following strips it out (added tr -cd '\11\12\15\40-\176'):
output=
send_to_plug $ip $port "$payload_query" | decode | tr -cd '\11\12\15\40-\176' | egrep -o 'relay_state":[0,1]' | egrep -o '[0,1]'
The text was updated successfully, but these errors were encountered: