Tasmota Mqtt reading

Hello, how can I read “watt” from a sonoff mqtt device. Maby somebody have a Screenshot from the channel or something.

I hope to have understood your question correctly…

Does this help?

Thank you, but it doesn’t works for my
Something i doing wrong.
Where do i find the first picture with JSONPATH?

Both are the channel details you requested.

Some additional info:

  1. Please install JSONPATH Transformation Service (Main UI->Administration->Settings->Add-ons->Other Add-ons->Transformation Add-ons->JSONPATH Transformation)
  2. As the SENSOR Topic is read-only, there is absolutely no need to configure more than Incoming value transformation and stateTopic
1 Like

Thank you for clarifying. Had no idea sensor was read only, but it does make sense.

Thank you, Now it works!!!

another question, can i create a item where sensor a + sensor b?

One Item, one value.
If you want to do maths, you will need two Items and a rule (and perhaps a third Item to put the result in).
If you want a single string with any random collection characters in it, that’s just one string type Item. It doesn’t care if that represents two or three things mashed together, say for display purposes.

Rules sounds good. I try to type it in javascript but it doesen’t work:

events.postUpdate(“PowerInLivingrooom”,itemRegistry.getItem(“HIFI”).getState + itemRegistry.getItem(“TV”).getState);

PowerInLivingroom should be HIFI (10) + TV (10)

Whats wrong, or is it the wrong way?

now it works:

PowerInLivingrooom.postUpdate((HIFI.state as Number) + (TV.state as Number))

Thanks for all your Help!!!

1 Like

an other question: if i have a swich without power measure. i know that there is power xxx watt.
Now i would like to add xxx to my livingroom power if the switch ist on.
does somebody have an idee?

Such would be better asked in a new thread!

Thank you. Done:

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.