I would like to transfer data from nodered over MQTT to my ESPeasy device.
I can not configure this.
I configured Controller, and I saw in mosquitto_sub how ESP sends data.
"
Client mosqsub|11803-orange received PUBLISH (d0, q0, r1, m0, 'cellar/status/LWT', ... (9 bytes))
Connected
Client mosqsub|11803-orange received PUBLISH (d0, q0, r1, m0, 'cellar/out/LWT', ... (9 bytes))
"
My data that I want to receive in ESP is as follows:
"
Client mosqsub|11803-orange received PUBLISH (d0, q0, r0, m0, 'cellar/in', ... (59 bytes))
{"idx":10,"nvalue":31.19,"svalue1":"31.19","t3":31,"t4":19}
Client mosqsub|11803-orange received PUBLISH (d0, q0, r0, m0, 'cellar/in', ... (55 bytes))
{"idx":7,"nvalue":29.3,"svalue1":"29.3","t1":29,"t2":3}
"
I configured device in ESP. What mistakes have I made? I tried different options in Generic setup - MQTT Import, but I did not receive the data.
Maybe MQTT is not working correctly in my firmware version? But, I can not use another version because of the PZEM-004 device.
"Generic - MQTT Import" problem
Moderators: grovkillen, Stuntteam, TD-er
- Andrew Mamohin
- Normal user
- Posts: 102
- Joined: 12 Jun 2020, 08:30
- Location: Belarus, Gomel
- Contact:
Re: "Generic - MQTT Import" problem
The strings you receive don't look like numerical values, but more like JSON formatted data.
MQTT import currently only supports simple strings which can be read as either an int or a float value.
MQTT import currently only supports simple strings which can be read as either an int or a float value.
- Andrew Mamohin
- Normal user
- Posts: 102
- Joined: 12 Jun 2020, 08:30
- Location: Belarus, Gomel
- Contact:
Re: "Generic - MQTT Import" problem
Can you write me an example of such an MQTT message so I can make it in NodeRed?
Andy.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: "Generic - MQTT Import" problem
The message should be a simple numerical value.
Code: Select all
123.456
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



- Andrew Mamohin
- Normal user
- Posts: 102
- Joined: 12 Jun 2020, 08:30
- Location: Belarus, Gomel
- Contact:
Re: "Generic - MQTT Import" problem
Wow! Thank! I did the conversion in NodeRed and everything started working correctly.
[attachment=0]FwlFnNf8Mf.png[/attachment]
[attachment=1]ceshLXdFhh.png[/attachment]
[attachment=0]FwlFnNf8Mf.png[/attachment]
[attachment=1]ceshLXdFhh.png[/attachment]
- Attachments
-
- FwlFnNf8Mf.png (12.78 KiB) Viewed 16704 times
-
- ceshLXdFhh.png (12.18 KiB) Viewed 16704 times
Andy.
Who is online
Users browsing this forum: No registered users and 14 guests