大家好, 這是我第一次在論壇上發帖。希望你能幫到我。
我從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 位址)
MQTT_ESP32_AppDev did not work.
-
- 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.
- Attachments
-
- 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
-
- 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.
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)
-
- 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.
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?
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
-
- 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.
Also...
If you stop the mosquitto server as a service, then run with the command
you will get on screen messages that will help,
such as when the client connects etc..
If you stop the mosquitto server as a service, then run with the command
Code: Select all
mosquitto -v
such as when the client connects etc..
-
- Posts: 3
- Joined: Tue May 04, 2021 10:18 am
- Has thanked: 2 times
Re: MQTT_ESP32_AppDev did not work.
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. (2) Rpi IP address matches up with the stated IP within IoT Made Easy component. (3) I found I didn't set up the broker name and password, so I changed the component properties.
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. (2) Rpi IP address matches up with the stated IP within IoT Made Easy component. (3) I found I didn't set up the broker name and password, so I changed the component properties.
-
- Posts: 3
- Joined: Tue May 04, 2021 10:18 am
- Has thanked: 2 times
Re: MQTT_ESP32_AppDev did not work.
Thanks you for you reply!LeighM wrote: ↑Tue Nov 16, 2021 3:32 pmAlso...
If you stop the mosquitto server as a service, then run with the commandyou will get on screen messages that will help,Code: Select all
mosquitto -v
such as when the client connects etc..
This was the screen message, is it got some wrong ?
-
- 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.
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel