MQTT import ??

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

MQTT import ??

#1 Post by Asco » 23 Sep 2018, 18:11

Hello,
I would like to use the plugin "MQTT import" on a ESPeasy_01 module to get sensor values from another ESPeasy_02 device.

I have read a lot of post about this but can't understand how to use the plugin, perhaps someone can help me please ? ;)

using red-node debug I can get:

Code: Select all

23/09/2018 à 12:01:33node: bf8fd352.782658domoticz/in : msg.payload : string[57]
"{"idx":225,"RSSI":10,"nvalue":0,"svalue":"21.30;58.40;1"}"
This is from a ESPeasy_01 who send DHT22 reading to a Domoticz server, it can correctly get the 2 values in Domoticz

How can I get thoses datas in the second ESPeasy, does using the pluggin MQTT import the good way to do that?

Thank you in advance!!
chris

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MQTT import ??

#2 Post by grovkillen » 23 Sep 2018, 18:34

MQTT import is simple so you cannot use JSON formatted messages, only a single float value is supported.

If I where you I'd use rules and push a simple messages on change of that first device. Then on the receiving unit I'd just subscribe to the topic.
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 :idea: :idea: :idea:

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: MQTT import ??

#3 Post by Asco » 23 Sep 2018, 19:47

Hello grovkillen,
Thank you for your help,

As you can understand I'm very new to MQTT :)

I don't understand what you mean by "push a simple message" and I don't understand "subscribe to the topic" :roll: :roll:

... SO I think I have to read more about espeasy before coming back to ask a question.

Regards
Chris

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: MQTT import ??

#4 Post by Asco » 24 Sep 2018, 14:54

Hello,

I have been able to write rules to publish from ESP_02 the 2 datas I need to read on the other ESP:

Code: Select all

chris@L750D:~$ mosquitto_sub -h 192.168.1.3 -t ESP_02_BALANCE/#
"poidsLili":2.20
"poidsMiha":3.10
On the ESP which has to receive the datas I have set a controller:
The attachment Capturecontroller.PNG is no longer available
and a device:
The attachment Capturecontroller.PNG is no longer available
But I can't get poidsMiha and poidsLili on the second ESP.

Can you help me with this?

Thank you in advance!
Chris
Attachments
Capturecontroller.PNG
Capturecontroller.PNG (17.61 KiB) Viewed 4947 times
Last edited by Asco on 24 Sep 2018, 15:00, edited 1 time in total.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MQTT import ??

#5 Post by grovkillen » 24 Sep 2018, 15:00

MQTT Import is kinda its own client. You will set the subscription inside the task settings, not the controller settings.
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 :idea: :idea: :idea:

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: MQTT import ??

#6 Post by Asco » 24 Sep 2018, 15:04

Thank you grovkillen,

is there an example somewhere, I am able to use MQTT with node-red, domoticz and mosquitto, but can't understand how it works with ESPeasy ?

I think there is something wrong with phpBB ;impossible to put 2 images inline..

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MQTT import ??

#7 Post by grovkillen » 24 Sep 2018, 15:09

Regarding attached pictures, you should just upload them and the forum will place then in the end.

I will need to put some love to the wiki regarding MQTT import. I'll give you a holler once it's done.
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 :idea: :idea: :idea:

Asco
Normal user
Posts: 15
Joined: 24 Jun 2018, 17:48

Re: MQTT import ??

#8 Post by Asco » 24 Sep 2018, 15:15

Thank you very much :) !!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 30 guests