[SOLVED] Teckin SP20 Plug - MQTT setup

I am running Openhab 2.4. I bought a couple of Teckin SP20 plugs and I have Tasmota 6.5 on them. All that is good (I can toggle on/off through the plug’s UI as well as see power use, voltage, etc.)

I have installed the MQTT 2.4 binding as well as the MQTT Embedded Broker. I have been able to add one of my plugs as a Thing, and successfully subscribe it to the MQTT Broker. I am even able to toggle the power via MQTT from my Sitemap.

My problem currently is I am having trouble setting up the display of information such as the voltage, power used, etc. I have tried following several examples but they all use a .things configuration file; I am trying to keep my Thing configuration in PaperUI and the rest of my configs in config files.

From the console of my plug, here is what it reports to my MQTT Broker:

19:33:29 MQT: tele/sonoff-CEE581/STATE = {"Time":"2019-07-06T19:33:29","Uptime":"1T13:05:36","Vcc":3.165,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"MURRELL-YVR","BSSId":"38:D5:47:74:1C:80","Channel":1,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:04"}}
19:33:29 MQT: tele/sonoff-CEE581/SENSOR = {"Time":"2019-07-06T19:33:29","ENERGY":{"TotalStartTime":"2019-07-04T06:52:54","Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":126,"Current":0.000}}

Here is the Channel I have tried adding in PaperUI to display Voltage:

Type: Number
MQTT State Topic: tele/sonoff-CEE581/SENSOR
MQTT Command Topic: (left blank)
Incoming value transformation: JSONPATH:$.ENERGY.Voltage
Outgoing value transformation: JSONPATH:$.ENERGY.Voltage

I have tried also with just having a value in the “Incoming value transformation” and just the “Outgoing value transformation” but neither is unsuccessful. Honestly, I am not even sure if even if I need a value in the Outgoing value transformation if that is even correct.

I created the item:

Number Plug_SonoffCEE581_Voltage "Outlet01 [%.1f V]" <voltage> { channel="mqtt:topic:43e6ddb0:Plug_SonoffCEE581_Voltage" }

and added to my sitemap:

Text item=Plug_SonoffCEE581_Voltage label="Sonoff-CEE581 Voltage"

but all it shows is:

- V

rather than the voltage (it should show ‘126 V’)

As usual, any pointers appreciated. Thanks! :slight_smile:

Issue is solved. I didn’t have the JSONPATH transformation installed. Also, just in case anyone with a similar issue stumbles across this, you just need the “Incoming value transformation” and not the “Outgoing” one.