Re: TP-Link Plugin - How To (v0.1.2)
Posted: Wed Jan 16, 2019 7:40 pm
Software Support and Home Automation Forum
https://forums.indigodomo.com/
FlyingDiver wrote:I think I have some TP-Link hardware somewhere. Let me dig it out.
jay (support) wrote:FlyingDiver wrote:I think I have some TP-Link hardware somewhere. Let me dig it out.
TP-Link hardware works fine with this plugin (I have a TP-Link wall wart). It's just this other hardware that is the question.
{"context":{"child_ids":["CHILD_ID"]},"system":{"set_relay_state":{"state":1}}}
from KasaSmartPowerStrip import SmartPowerStrip
power_strip = SmartPowerStrip('192.168.0.117')
# get general system info
print(power_strip.get_system_info())
commands = {'info' : '{"system":{"get_sysinfo":{}}}',
'on' : '{"system":{"set_relay_state":{"state":1}}}',
'off' : '{"system":{"set_relay_state":{"state":0}}}',
'cloudinfo': '{"cnCloud":{"get_info":{}}}',
'wlanscan' : '{"netif":{"get_scaninfo":{"refresh":0}}}',
'time' : '{"time":{"get_time":{}}}',
'schedule' : '{"schedule":{"get_rules":{}}}',
'countdown': '{"count_down":{"get_rules":{}}}',
'antitheft': '{"anti_theft":{"get_rules":{}}}',
'reboot' : '{"system":{"reboot":{"delay":1}}}',
'reset' : '{"system":{"reset":{"delay":1}}}',
'energy' : '{"emeter":{"get_realtime":{}}}'