Closed djhworld closed 4 years ago
This makes integrating this script into other scripts that accept JSON simpler.
If users wish to see verbose output (i.e. the Sent and Received sections) they can use the -v or --verbose flag
Sent
Received
-v
--verbose
Default output
tmp/tplink-smartplug|master ✔ ▶ python tplink-smartplug.py -t <my-ip> -c on {"system":{"set_relay_state":{"err_code":0}}}
Verbose output
tmp/tplink-smartplug|master ✔ ▶ python tplink-smartplug.py -v -t <my-ip> -c on Sent: {"system":{"set_relay_state":{"state":1}}} Received: {"system":{"set_relay_state":{"err_code":0}}}
This function was added by another pull request.
This makes integrating this script into other scripts that accept JSON simpler.
If users wish to see verbose output (i.e. the
Sent
andReceived
sections) they can use the-v
or--verbose
flagDefault output
Verbose output