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:
@@ -28,7 +28,7 @@ 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:
|
Provide the target IP using `-t` and a command to send using either `-c` or `-j`. Commands for the `-c` flag:
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|-----------|--------------------------------------|
|
|---------------|--------------------------------------|
|
||||||
| on | Turns on the plug |
|
| on | Turns on the plug |
|
||||||
| off | Turns off the plug |
|
| off | Turns off the plug |
|
||||||
| info | Returns device info |
|
| info | Returns device info |
|
||||||
@@ -41,6 +41,8 @@ Provide the target IP using `-t` and a command to send using either `-c` or `-j`
|
|||||||
| reboot | Reboot the device |
|
| reboot | Reboot the device |
|
||||||
| reset | Reset the device to factory settings |
|
| reset | Reset the device to factory settings |
|
||||||
| energy | Return realtime voltage/current/power|
|
| energy | Return realtime voltage/current/power|
|
||||||
|
| energy_reset | Reset energy meters |
|
||||||
|
| runtime_reset | erase runtime statistics |
|
||||||
| ledon | Turn on the LED indicator |
|
| ledon | Turn on the LED indicator |
|
||||||
| ledoff | Turn off the LED indicator |
|
| ledoff | Turn off the LED indicator |
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ commands = {'info' : '{"system":{"get_sysinfo":{}}}',
|
|||||||
'antitheft': '{"anti_theft":{"get_rules":{}}}',
|
'antitheft': '{"anti_theft":{"get_rules":{}}}',
|
||||||
'reboot' : '{"system":{"reboot":{"delay":1}}}',
|
'reboot' : '{"system":{"reboot":{"delay":1}}}',
|
||||||
'reset' : '{"system":{"reset":{"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
|
# Encryption and Decryption of TP-Link Smart Home Protocol
|
||||||
|
|||||||
Reference in New Issue
Block a user