This post might be a bit far fetched. But I am hoping that some of you might just know what I need.
I have flashed an ESP8266 device (NodeMCU) with Tasmota (https://tasmota.github.io/docs/). This allows me to connect the NodeMCU to the MQTT Distributor module and then in turn see the device in the designer using the MQTT Engine. I see the information about the device coming in through the MQTT Engine without a problem - I had to configure a custom namespace though.
Here is an image of the information coming in:
Tasmota supports different commands through a MQTT publish to specific a topic.
Here I have tried to use the system.cirruslink.engine.publish() function. However it needs the payload as an byte array. Which would be the command name itself. I have tried to use the function bytearray() like this:
system.cirruslink.engine.publish(“LocalMQTT”, “cmnd/DVES_177FF2_fb/”, str(‘power’).encode(), 0 ,0)
However, this gives me an status message on the device:
Which indicates that the command was not published/converted properly.
If I run the same command in the Tasmota console I get this:
Here is my Miscellaneous section of the general tab in the config of the MQTT Engine:
Where you can see that I have un-checked the blocking of device and node commands.
So anyone of you who would know how to ensure a correct payload like “power” to be published to a topic like cmnd/DVES_177FF2_fb?
Is there any other ways to publish to topics other than using system.cirruslink.engine.publish()?
Do the system.cirruslink.engine.publish() require the namespace of sparkplug to be used?
If any additional information is needed please let me know and I will try to provide as much as possible.