You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just acquired a KP200 wall outlet which has two sockets that can be controlled independently. The TP-Link protocol has been extended to support this device and I was able to discover how it works and share it here.
After configuring the device with the Kasa app on my phone I sent the message {"system":{"get_sysinfo":{}} to get the system information which returned
The two sockets are described in the children item. Each one contains an id item that consists of the main deviceId with a 2 digit number appended, as well as an alias and a state. The alias and relay_state items are not present in the main block.
To control an individual socket, the set_relay_state message contains an additional item context which contains the id of the socket to turn on or off.
I just acquired a KP200 wall outlet which has two sockets that can be controlled independently. The TP-Link protocol has been extended to support this device and I was able to discover how it works and share it here.
After configuring the device with the Kasa app on my phone I sent the message
{"system":{"get_sysinfo":{}}
to get the system information which returnedThe two sockets are described in the
children
item. Each one contains anid
item that consists of the maindeviceId
with a 2 digit number appended, as well as analias
and astate
. Thealias
andrelay_state
items are not present in the main block.To control an individual socket, the
set_relay_state
message contains an additional itemcontext
which contains theid
of the socket to turn on or off.child_ids
specifies a list, so it is possible to control more that one socket at a time.I hope this is useful. My implementation of this can be found at https://github.com/jbuehl/ha/ha/interfaces/tplinkInterface.py
The text was updated successfully, but these errors were encountered: