mirror of
https://github.com/softScheck/tplink-smartplug
synced 2026-01-11 23:38:46 +01:00
Added energy reset and runtime reset (#103)
* Add energy reset * add engery_reset and runtime_reset commands
This commit is contained in:
34
README.md
34
README.md
@@ -27,22 +27,24 @@ A full list of commands is provided in [tplink-smarthome-commands.txt](tplink-sm
|
||||
|
||||
Provide the target IP using `-t` and a command to send using either `-c` or `-j`. Commands for the `-c` flag:
|
||||
|
||||
| Command | Description |
|
||||
|-----------|--------------------------------------|
|
||||
| on | Turns on the plug |
|
||||
| off | Turns off the plug |
|
||||
| info | Returns device info |
|
||||
| cloudinfo | Returns cloud connectivity info |
|
||||
| wlanscan | Scan for nearby access points |
|
||||
| time | Returns the system time |
|
||||
| schedule | Lists configured schedule rules |
|
||||
| countdown | Lists configured countdown rules |
|
||||
| antitheft | Lists configured antitheft rules |
|
||||
| reboot | Reboot the device |
|
||||
| reset | Reset the device to factory settings |
|
||||
| energy | Return realtime voltage/current/power|
|
||||
| ledon | Turn on the LED indicator |
|
||||
| ledoff | Turn off the LED indicator |
|
||||
| Command | Description |
|
||||
|---------------|--------------------------------------|
|
||||
| on | Turns on the plug |
|
||||
| off | Turns off the plug |
|
||||
| info | Returns device info |
|
||||
| cloudinfo | Returns cloud connectivity info |
|
||||
| wlanscan | Scan for nearby access points |
|
||||
| time | Returns the system time |
|
||||
| schedule | Lists configured schedule rules |
|
||||
| countdown | Lists configured countdown rules |
|
||||
| antitheft | Lists configured antitheft rules |
|
||||
| reboot | Reboot the device |
|
||||
| reset | Reset the device to factory settings |
|
||||
| energy | Return realtime voltage/current/power|
|
||||
| energy_reset | Reset energy meters |
|
||||
| runtime_reset | erase runtime statistics |
|
||||
| ledon | Turn on the LED indicator |
|
||||
| ledoff | Turn off the LED indicator |
|
||||
|
||||
More advanced commands such as creating or editing rules can be issued using the `-j` flag by providing the full JSON string for the command. Please consult [tplink-smarthome-commands.txt](tplink-smarthome-commands.txt) for a comprehensive list of commands.
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@ commands = {'info' : '{"system":{"get_sysinfo":{}}}',
|
||||
'antitheft': '{"anti_theft":{"get_rules":{}}}',
|
||||
'reboot' : '{"system":{"reboot":{"delay":1}}}',
|
||||
'reset' : '{"system":{"reset":{"delay":1}}}',
|
||||
'energy' : '{"emeter":{"get_realtime":{}}}'
|
||||
'energy' : '{"emeter":{"get_realtime":{}}}',
|
||||
'energy_reset' : '{"emeter":{"erase_emeter_stat":{}}}',
|
||||
'runtime_reset' : '{"schedule":{"erase_runtime_stat":{}}}'
|
||||
}
|
||||
|
||||
# Encryption and Decryption of TP-Link Smart Home Protocol
|
||||
|
||||
Reference in New Issue
Block a user