Hi,
Just to add to the testing results. I also added some more info that might help.
Tested this snapshot: org.openhab.binding.tplinksmarthome-2.2.0-SNAPSHOT.jar
cd /usr/share/openhab2/addons
wget https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.tplinksmarthome/2.2.0-SNAPSHOT/org.openhab.binding.tplinksmarthome-2.2.0-SNAPSHOT.jar
sudo chmod 644 org.openhab.binding.tplinksmarthome-2.2.0-SNAPSHOT.jar
What model did you test? - TP-Link HS-110
Does switching on/off work? - Yes
Does auto-discovery work? - Yes
Does RSSI work? - Yes (shown in dBm)
TP-Link HS-110 with Energy Monitoring (Specific features):
Does Power usage work? - Yes (shown in W)
Does Energy usage work? - Yes (shown in kWh)
Does Current work? - Yes (shown in A)
Does Voltage work? - Yes (shown in V)
Although auto-discovery works well (it even found an LED switch for HS110), I converted my configuration to manual files so I can easily back them up and restore. Also, you can remove the groups and charts if you don’t use it.
sample home.things:
//TP-Link UPS Socket
Thing tplinksmarthome:hs110:UPS "TP-Link UPS Socket" @ "Servers" [ipAddress="192.168.1.25", refresh=60]
sample home.items:
I added [ “CurrentTemperature” ] to TPL1_Power because I wanted to see the power usage of the UPS in homekit. It will appear as temperature in your ios device but you can add a label as Power.
// Main group
Group gHome
//Groups - Location
Group gLivingRoom (gHome)
Group gServers (gHome)
//Groups - Function
Group gSecurity (gHome)
Group gSockets (gSecurity)
//Groups - Charts
Group gChart2 (gHome)
//TP-Link Socket
Switch TPL1_Switch "UPS Socket" (gLivingRoom, gServers, gSockets) ["Switchable"] { channel="tplinksmarthome:hs110:UPS:switch" }
Number TPL1_RSSI "Signal [%d dBm]" (gChart2) { channel="tplinksmarthome:hs110:UPS:rssi" }
Number TPL1_Power "Power Usage [%.2f W]" (gChart2) [ "CurrentTemperature" ] { channel="tplinksmarthome:hs110:UPS:power" }
Number TPL1_Energy "Energy Usage [%.2f kWh]" (gChart2) { channel="tplinksmarthome:hs110:UPS:energyUsage" }
Number TPL1_Current "Current [%.2f A]" (gChart2) { channel="tplinksmarthome:hs110:UPS:current" }
Number TPL1_Voltage "Voltage [%.2f V]" (gChart2) { channel="tplinksmarthome:hs110:UPS:voltage" }
sample home.sitemap:
Frame label="Servers"
{
Switch item=TPL1_Switch label="UPS Socket" icon="poweroutlet"
Text item=TPL1_RSSI label="Signal [%d dBm]" icon="network"
Text item=TPL1_Power label="Power [%.2f W]" icon="heating"
Text item=TPL1_Energy label="Energy Usage [%.2f kWh]" icon="energy"
Text item=TPL1_Current label="Current [%.2f A]" icon="heating"
Text item=TPL1_Voltage label="Voltage [%.2f V]" icon="heating"
Text label="Charts" icon="line"
{
Chart item=TPL1_Power service="rrd4j" period=D refresh=60000
Chart item=TPL1_Energy service="rrd4j" period=D refresh=60000
Chart item=TPL1_Current service="rrd4j" period=D refresh=60000
Chart item=TPL1_Voltage service="rrd4j" period=D refresh=60000
Chart item=gChart2 service="rrd4j" period=D refresh=60000
}
}
sample rrd4j.persist:
// persistence
Strategies {
everyDay : "0 0 0 * * ?"
everyHour : "0 0 * * * ?"
everyMinute : "0 * * * * ?"
default = everyChange
}
Items {
gChart2* : strategy = everyChange, everyUpdate, everyMinute
}
I hope it helps with the testing and review. For persistence, you can change it to log every minute instead of every change/update.