POW Values Using PaperUI and No Things File

Finally got around to learning the upgraded MQTT. I am now on 2.5 and working through it. I am using the embedded broker (did not not install mosquito). I am trying to do this without using the things file. I was able to connect a POW and can turn it on and off using this cmnd and state in the configured channel and added an item in the PaperUI… awesomeness…

cmnd/sonoff-DVES_7FFAF2/POWER
stat/sonoff-DVES_7FFAF2/POWER

Now I am stumped as to how to get the values for the POW by using just the PaperUI. I assume I create a new channel and then I can have each value as an item? Or do I need a new channel for each value? The value in the console is typical. Its a tele. Do you use tele like you use stat and cmnd?

MQT: tele/sonoff-DVES_7FFAF2/SENSOR = {"Time":"2020-02-29T18:39:15","ENERGY":{"TotalStartTime":"2020-02-27T22:32:14","Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":0,"Current":0.000}}

Searched and searched and could not find how to do this without a things file.

Thanks!

This broker is no longer supported and I recommend uninstalling it and using mosquitto.

For setting up your Thing it’s also recommended to use PaperUI. Here is a good guide that shows how to:

Well crap, how did miss that. Ok, but I still can do this using just the PaperUI and now things or items file, correct?

Create the Thing via PaperUI (see the link above) and use files for your items. Just don’t create both Things and items via PaperUI and Files.

So then back to the first question, how do you create a thing in the PaperUI for the POW values?

Click on discover devices and select generic mqtt thing. Did you see the link I posted above?

See also:

What you may have done here is create channels belonging directly to the broker Thing.
That can be done, but it’s more conventional (and likely easier to manage in the long run) to make generic “sub” Things to the broker.

Thanks @H102 but I head read that but am not migrating. Starting from scratch.

Ok, this is what I tried to this point…

I changed over to mosquito and deleted the embedded.

I have two things:
Google Photos

The Heater Thing works great at turning the POW on and off…
Created the second Thing to bring in the values…

Google Photos

I added all the values for the POW as items under the Thing

This is how I configured the Thing. Didnt know whether it should go in cmnd or state, maybe neither…

Google Photos

And my items:

//Heater
Number heater_POW_Load  "Heater Power load [%.1f W]" <voltage> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Power)]"}
Number heater_V "Heater Line voltage [%.1f V]" <voltage> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Voltage)]"}
Number heater_POW_Current "Heater Line current [%.3f A]"  <current> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Current)]"}
Number heater_POW_Today "Heater Total energy today [%.3f kWh]" <total_energy> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Today)]"}
Number heater_Yesterday "Heater Total energy yesterday [%.3f kWh]" <total_energy> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Yesterday)]"}
Number heater_POW_Total "Heater Total energy [%.3f kWh]" <total_energy> {mqtt="<[broker:/tele/sonoff-DVES_7FFAF2/SENSOR:state:JSONPATH($.ENERGY.Total)]"}

And the controls:
Google Photos

and the log:

 Incoming payload '{"Time":"2020-02-29T22:00:19","ENERGY":{"TotalStartTime":"2020-02-27T22:32:14","Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":0,"Current":0.000}}' not supported by type 'NumberValue'

Your item file is using the mqtt version 1.x syntax.

Here is an example of my items file with mqtt version 2:

Switch LivingRoom_Light "Living Room Light" <light>  ["Lighting"] { channel="mqtt:topic:pibroker:sonoff11:power" }
Number LivingRoom_Light_Temp "Temperature [%.1f °F]"      <temp>             { channel="mqtt:topic:pibroker:sonoff11:temperature" }
Number LivingRoom_Light_Humidity    "Humidity [%.1f %%]"    <humidity>       { channel="mqtt:topic:pibroker:sonoff11:humidity" }

Also, notice there is no leading / in the topic. If you copy the channel from PaperUI it will be correct in your file e.g. channel=“mqtt:topic:6d8a8fd1:heater_power”

1 Like

Hi @H102, I tried that but no luck. Not sure I had it right. But I really need to back up on this.

So starting from the basics, to get the power values, do I create one channel that is the state topic for the POW Sensor and then add items to it?
MQTT State Topic

tele/sonoff-DVES_7FFAF2/SENSOR

Or, do you create a channel for each of the values?
MQTT State Topic - something like this…

tele/sonoff-DVES_7FFAF2/SENSOR:ENERGY.Power

Post what you tried.

You create one Thing(thing is usually created in PaperUI) and link the channels to each item. The link can be done using files or PaperUI.