TP-Link Controller

The TP-Link controller allows you to control on/off and dimmer devices that conform to the TP-Link (Kasa) standard. All setup and configuration must be first done using the TP-Link smartphone app but afterwards, you can perform actual control through PowerHome.

On/Off devices are configured in the PowerHome Explorer on the Digital IO screen as IOT Input and IOT Output device types. Enter the TP-Link device IP address into the "IP / Address" column. Unit and Point must have values but are not used (0,0 is fine).

Dimmer devices are configured within PowerHome Explorer on the Analog IO screen as IOT Input and IOT Output device types. Enter the TP-Link device IP address into the "ROM ID / IP / Topic / Channel" column. Unit and Point must have values but are not used (0,0 is fine).

Since TP-Link dimmers track the on/off status separately from the dimmer value, the two separate data values must be encoded together into a single number. Dimmer values are 0 to 100 but are stored and set as a value from 1 to 101. The number 128 signifies that the TP-Link device is off. The number 256 signifies that the TP-Link device is on. By combining the values (or not) you can change the on/off state and dimmer level in a single command, change only the on/off state, or change only the dimmer state (you can change the dimmer level even when the TP-Link device is off and doing so does NOT turn the device on). To turn off a dimmer without changing the current level, use an analog value of 128. To turn on a TP-Link dimmer without changing the level, use an analog value of 256. If you want to change the dimmer level only without changing the on/off state, use an analog value of 1 to 101. If you want to change both the on/off state and the level in the same command, add the values together. Assuming you want to change the level to 50%, then turning on at 50% would be 256 + 51 or 307. To turn off and set the level to 50% would be 128 + 51 or 179. The values that are stored internally in the Analog IO table within PowerHome is the combined on/off state and dimmer level.

You can use the predefined User Range ID for WEMO (TP-Link devices and Wemo devices are handled internally in the same manner) to handle the various on/off and dimmer states.