Skip to content
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

Added verbose flag to print verbose output #15

Closed
wants to merge 1 commit into from

Conversation

djhworld
Copy link

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

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}}}

@softScheck
Copy link
Owner

This function was added by another pull request.

@softScheck softScheck closed this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants