Still nobody experimenting with the MQTT stuff?

James Sentman james at sentman.com
Mon Jan 16 09:14:22 EST 2023


Hello Eric,

I’ve been looking at the Tasmota stuff this morning, and it should be able to be controlled but the Unit setup is perhaps not simple. Sadly MQTT is not simple so I can only make it smarter so much ;)

Can you tell me exactly what kind of device you’re using that has buttons? I think you probably just need more than one XTension unit, one for each button and each output or whatever else. Looking at the documentation for Tasmota I can document how to use it for just turning the power of something on or off. Send me examples of all the input/output from that device from the mqtt explorer and I’ll make some specific unit types to support it properly.

It looks like since the topic you need to send to is separate from the topic you need to subscribe to in order to get the current state it’s going to require some scripting. I don’t currently have a way to send a payload to the server via a script, but I’ll start working on this today.

You could still do it by having 2 units, one for displaying the status and a separate one for sending control.

For the Control unit you would need to use the enumerated device type in XTension and set the enumeration below the field to just “OFF,ON” but I can’t be sure that will display anything useful in the display of current status. You should also enter the string “OFF,ON” into the Unit’s Enumerated values which are on the Display tab of the Edit Unit dialog. 

Then for the Payload Creation Method popup back on the first tab choose "Enumerated Value"

Now it will send the Strings OFF or ON when you control the Unit. Choosing a topic will depend on your specific settings but according to the instructions with their default or demonstration values the control topic would be something like “cmnd/tasmota_switch/POWER” once you can send the OFF or ON enumeration to that topic, or whatever you called your device, it should respond to those commands. 

The listening device that shows the current state uses a different topic path so for that separate Unit to show current state I would use a topic path that has their “stat” in it, in the example code that path is “cmnd/stat/tasmota_switch/POWER

you can make that an enumerated value type of Unit also and enter the same OFF,ON into the enumerated values field. It should follow the current state.



> On Jan 15, 2023, at 5:32 AM, Domotique <eric.berdah.domotique at gmail.com> wrote:
> 
> I continue my MQTT experiments with tasmota firmwares.
> 
> with the enumerated values ​ I can receive my button's state changes, but I can't transmit them from my XTension unit.
> 
> I think my broker(mosquito) does not receive topics from xtension , the message counter in "MQTT explorer" does not progress when I change the state of my unit
> 
> the second problem is that tasmota uses different headers for its topics "stat" for status, "cmnd" for commands and "tel" for telemetry feedback
> 
> and in the interface I can only put one topic for transmission and reception
> 
> I place the link below for the MQTT protocol used by tasmota
> 
> https://tasmota.github.io/docs/MQTT/#examples <https://tasmota.github.io/docs/MQTT/#examples>
> 
> 

Thanks,
 James


James Sentman                       http://www.PlanetaryGear.org		http://MacHomeAutomation.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20230116/9b9d4b9f/attachment.html>


More information about the XTensionList mailing list