ESP Easy How Subscribe MQTT Text value?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ptahotep
New user
Posts: 2
Joined: 13 Jun 2022, 13:09

ESP Easy How Subscribe MQTT Text value?

#1 Post by Ptahotep » 13 Jun 2022, 13:20

Hellow!
Unable to get text data from MQTT topic
Subscribe %sysname%/#
It is necessary that the text from a topic appeared in a variable.
Generic - MQTT Import only works with numeric content (.
Please help with an example with syntax

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy How Subscribe MQTT Text value?

#2 Post by Ath » 13 Jun 2022, 13:53

ESPEasy doesn't (yet) support handling string values in variables.

When using the MQTT Import plugin with the extensions available (may require installing a Normal build or creating a personal Custom build with P037 included) you can
a) Have events generated per topic, where the value is available in the rule via argument %eventvalue1%
b) Use the Mapping feature to convert known alphanumeric values to numeric equivalents (like "on" to 1 and "off" to 0, etc.)
/Ton (PayPal.me)

Ptahotep
New user
Posts: 2
Joined: 13 Jun 2022, 13:09

Re: ESP Easy How Subscribe MQTT Text value?

#3 Post by Ptahotep » 13 Jun 2022, 14:13

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests