Cannot accss open mqtt broker from ESP8266

29 views
Skip to first unread message

ulf....@gmail.com

unread,
Oct 9, 2023, 2:37:46 AM10/9/23
to MQTT
I am trying to access an open MQTT broker from ESP8266, with no luck. Works like a dreanm from Node Red, but when I try from Tasmota or EspEasy, I get connction failed. There is no user credentials on the open MQTT broker and I do not specify any user or password when I configure, which works fine on Node Red, but not using the ESP8266 controller.

Andy Stanford-Clark

unread,
Oct 9, 2023, 5:33:18 AM10/9/23
to 'Simon Walters' via MQTT
Could it be the protocol version number?
Some brokers do not support 3.1 by default, and some clients don’t talk 3.1.1 by default, if you see what I mean.

You can try it in Node-RED by changing the “Protocol” setting in the connection object in the MQTT node.

Andy

On 9 Oct 2023, at 07:37, ulf....@gmail.com <ulf....@gmail.com> wrote:

I am trying to access an open MQTT broker from ESP8266, with no luck. Works like a dreanm from Node Red, but when I try from Tasmota or EspEasy, I get connction failed. There is no user credentials on the open MQTT broker and I do not specify any user or password when I configure, which works fine on Node Red, but not using the ESP8266 controller.


--
To learn more about MQTT see https://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/1be005db-1be9-4a2f-92c9-fe3c254bc9cen%40googlegroups.com.

ulf....@gmail.com

unread,
Oct 9, 2023, 6:20:50 AM10/9/23
to mq...@googlegroups.com

Node Red is not the problem, and I do not have access to the broker and have no idea what implementation of MQTT is running there. I can access a HiveMQ using SSL support in Tasmota, but I have to recompile, since TLS is not supported by default.

You received this message because you are subscribed to a topic in the Google Groups "MQTT" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mqtt/EHLJKxfb2Hk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/7766919B-1C88-4E92-9F7A-D489EB280F80%40stanford-Clark.com.

Andy Stanford-Clark

unread,
Oct 9, 2023, 6:59:35 AM10/9/23
to 'Simon Walters' via MQTT
I meant: you can try to recreate the problem you are seeing on your ESP, by changing the protocol version in Node-RED, to see if that makes it fail to connect to your broker.
That would tell you if the protocol version that the ESP is using was the problem or not.


Andy

ulf....@gmail.com

unread,
Oct 9, 2023, 7:02:00 AM10/9/23
to mq...@googlegroups.com

Sorry – did not understand that! I'll have a look at it one of these days – too busy now, since I am leaving for Spain tomorrow morning and have some packing to do

ulf....@gmail.com

unread,
Oct 19, 2023, 4:55:41 PM10/19/23
to mq...@googlegroups.com

Just an update, in case someone wants to know.

 

The problem is that the source code specifies MQTT_USER as MqttUser and MQTT_PASS as MqttPassword. Looks like it falls back to these values even if you try to delete it in from the interface. I defined MQTT_USER as “” and did the same with MQTT_PASS. Recompiling the source code made it work on an open MQTT server set up without username and password!

Reply all
Reply to author
Forward
0 new messages