Sonoff-Tasmota linking to openhab

are you talking about multiple updates per item? Or multiple devices?
If devices, every device has its own topic

  • stat/sonoff1/POWER
  • stat/sonoff2/POWER

If per item, you’ll have to explain, what you mean… :slight_smile:

Hi Thomas, as per this part of ThomDietrich’s tutorial over on tasmota:

String LivingRoom_Light_Verbose “Living Room Light: MQTT return message [%s]”
{ mqtt=“<[broker:tele/sonoff-A00EEA/INFO1:state:default],
<[broker:stat/sonoff-A00EEA/STATUS2:state:default],
<[broker:stat/sonoff-A00EEA/RESULT:state:default]” }

There are three incoming messages specified for the item? Does this just update the one textfield with whichever the last piece of received data was, eg. display status2, a tele comes in so replace with that…? I couldn’t find anything about such a setup in the items documentation, just trying to get my head wrapped around the various layouts.
Thanks

oh, ok:

Optional! A collection of return messages by the Sonoff module
Recommendation: Define specific items for what you really need on a regular basis, use standalone MQTT client for troubleshooting

you understood correctly then. the *_Verbose items in ThomDietrich’s example function as stringbased target for all kinds of information. And you have to have some kind of rule-based logic on how to deal with that information.
It’s sufficient, if you just want to see in event.log, what’s coming from your device.

Frankly, I don’t think that’s the best way to do it, if you want to use the transported information afterwards… If you want to work with those information, you can always create specific items for each topic - so you can have simple JSON-transrormation per item, something like this:

String LivingRoom_Light_Info1 "Living Room Light: MQTT Info1 [%s]"  { mqtt="<[broker:tele/sonoff-A00EEA/INFO1:state:default]" }
String LivingRoom_Light_Status2 "Living Room Light: MQTT Status2 [%s]"  { mqtt="<[broker:tele/sonoff-A00EEA/STATUS2:state:default]" }
String LivingRoom_Light_Result "Living Room Light: MQTT Result [%s]"  { mqtt="<[broker:tele/sonoff-A00EEA/RESULT:state:default]" }
...

you can always replace “default” with “JSONPATH($.ATTRIBUTE)]
That way, you won’t need to write rules for extracting info.

If you want to use current MQTT V2 of openHab 2.4+ you may have a look at: Sonoff Tasmota with MQTT Binding 2.4 (using config files)