MQTT_ESP32_AppDev did not work.

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
kevin22630582
Posts: 3
http://meble-kuchenne.info.pl
Joined: Tue May 04, 2021 10:18 am
Has thanked: 2 times

MQTT_ESP32_AppDev did not work.

Post by kevin22630582 »

大家好, 這是我第一次在論壇上發帖。希望你能幫到我。

我從youtube上看到了這段視頻, 關於如何使用ESP32與 Mqtt 協定的視頻 (https://www.youtube.com/watch?v=efDrZdLGeTY), 我試圖寫相同的代碼, 但它不工作。

問題1: . fcfx 和 .fcsx 無法像視頻一樣連接。

問題 2 : AppDev. fcsx 將在 5 秒後自動停止運行。

我用 Rpi4b 是我的 Mqtt 經紀人 (https://www.flowcode.co.uk/wiki/index.p ... QTT_Broker
Picture_2是我的 Rpi 設置。(MQTT 經紀商測試和 IP 位址)
Attachments
Picture_2.png
Picture_2.png (429.76 KiB) Viewed 2557 times
MQTT_ESP32_AppDev.fcsx
(14.09 KiB) Downloaded 95 times
MQTT_ESP32.fcfx
(13.21 KiB) Downloaded 97 times

Steve-Matrix
Matrix Staff
Posts: 1234
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: MQTT_ESP32_AppDev did not work.

Post by Steve-Matrix »

For convenience, here's a translation of the original post into English:
Hi everyone, this is my first time posting on the forum. Hope you can help me.

I saw this video from youtube, about how to use ESP32 and Mqtt protocol video ( https://www.youtube.com/watch?v=efDrZdLGeTY), I tried to write the same code, but it doesn't work.

Question 1: .fcfx and .fcsx cannot be connected like video.

Question 2: AppDev. fcsx will automatically stop running after 5 seconds.

I use Rpi4b as my Mqtt broker ( https://www.flowcode.co.uk/wiki/index.p ... QTT_Broker)
Picture_2 is my Rpi setting. (MQTT broker test and IP address)

medelec35
Matrix Staff
Posts: 1430
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 505 times
Been thanked: 468 times

Re: MQTT_ESP32_AppDev did not work.

Post by medelec35 »

Welcome to the Flowocde forums.
If It was me,
The first thing I would do is check that both the ESP32 and RPI can be seen on the network.
I would use a network utility tool.
Then I would check that RPI IP matches up with the stated IP within IOT Made Easy component.
As you have set up a broker name and password, within IOT Made Easy (Pi,a0953530662), have you set up the same name and password within the RPI?
Martin

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: MQTT_ESP32_AppDev did not work.

Post by LeighM »

Also...
If you stop the mosquitto server as a service, then run with the command

Code: Select all

mosquitto -v
you will get on screen messages that will help,
such as when the client connects etc..

kevin22630582
Posts: 3
Joined: Tue May 04, 2021 10:18 am
Has thanked: 2 times

Re: MQTT_ESP32_AppDev did not work.

Post by kevin22630582 »

Thanks Steve-Matrix for the translation.

Reply to medelec35 :
First, thank you for your reply. I followed your suggestion, check my hardware.

(1) Rpi and ESP32 both can be seen on the network.
Picture_3.png
Picture_3.png (198.63 KiB) Viewed 2526 times
(2) Rpi IP address matches up with the stated IP within IoT Made Easy component.
Picture_4.png
Picture_4.png (750.82 KiB) Viewed 2526 times
(3) I found I didn't set up the broker name and password, so I changed the component properties.
Picture_5.png
Picture_5.png (30.14 KiB) Viewed 2526 times

kevin22630582
Posts: 3
Joined: Tue May 04, 2021 10:18 am
Has thanked: 2 times

Re: MQTT_ESP32_AppDev did not work.

Post by kevin22630582 »

LeighM wrote:
Tue Nov 16, 2021 3:32 pm
Also...
If you stop the mosquitto server as a service, then run with the command

Code: Select all

mosquitto -v
you will get on screen messages that will help,
such as when the client connects etc..
Thanks you for you reply!

This was the screen message, is it got some wrong ?
Picture_6.png
Picture_6.png (224.75 KiB) Viewed 2524 times

BenR
Matrix Staff
Posts: 1706
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: MQTT_ESP32_AppDev did not work.

Post by BenR »

Hello,

Mosquitto version 2.0 and after requires a bit of additional configuration to enable remote access.

The clue is the "starting in local only mode"

The details are available here.

https://mosquitto.org/documentation/aut ... n-methods/

Fingers crossed :D

Post Reply