Issue with Publishing and Subscribing in MQTT
-
[link text](link url)Hello everyone,
I'm facing issues with both subscription and publishing in MQTT. When publishing, it does not allow me to send alphanumeric values. If I use a numeric string and then convert it to an integer, it works correctly, as shown in the following example:
MQTT publish topic "coreS3/state", "5", Qos 1
However, when I try to publish any variable, whether numeric or text, the system simply ignores the command without displaying errors. For example:
MQTT publish topic "coreS3/state", numeric or text variable, Qos 1
If instead of a variable I use a fixed string, the command executes without issues.
I have spent a lot of time trying to solve this, but I haven't found a clear answer. Has anyone faced a similar issue or has any suggestions on how to fix it?
I appreciate any help you can provide.
[C:\Users\faria\Downloads\MQTT_Relay_S3_BAD.m5f2]
-
Hello @Robertof
hmm, using variables in MQTT publish works for me.
How are you testing your code? Make sure your test software uses a different MQTT client id than your UIFlow2 code, else the first registered client gets kicked out.
BTW: my example is in the Project Zone, named M5CoreS3_MQTT_4Relay_UIFlow2.2.5
Thanks
Felix