From 20f12e043eb19592e916338ff9a72795d8de3bc2 Mon Sep 17 00:00:00 2001 From: softScheck GmbH Date: Thu, 7 May 2020 12:38:54 +0200 Subject: [PATCH] Added led commands --- tplink_smartplug.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tplink_smartplug.py b/tplink_smartplug.py index 984c889..ba0ecef 100755 --- a/tplink_smartplug.py +++ b/tplink_smartplug.py @@ -48,9 +48,11 @@ def validPort(port): # Predefined Smart Plug Commands # For a full list of commands, consult tplink_commands.txt -commands = {'info' : '{"system":{"get_sysinfo":{}}}', +commands = { 'info' : '{"system":{"get_sysinfo":{}}}', 'on' : '{"system":{"set_relay_state":{"state":1}}}', 'off' : '{"system":{"set_relay_state":{"state":0}}}', + 'ledoff' : '{"system":{"set_led_off":{"off":1}}}', + 'ledon' : '{"system":{"set_led_off":{"off":0}}}', 'cloudinfo': '{"cnCloud":{"get_info":{}}}', 'wlanscan' : '{"netif":{"get_scaninfo":{"refresh":0}}}', 'time' : '{"time":{"get_time":{}}}',