Beginner with MQT Connection (rc -2) problems

1,383 views
Skip to first unread message

RobUpNorth

unread,
Mar 18, 2018, 1:36:10 PM3/18/18
to SonoffUsers
Hi, I'm new to the world of Sonoff/Tasmota and am unable to resolve the MQT connection problems.
...and also unable to locate the various logs that I've set to debug level in the node - any help here would be great. Flying blind at the moment!
...and the device web-page response time is very slow, minutes for each button select and usually have to reboot to get it to respond.

The main problem (I think?) is being unable to get my MQTT link established, but probably other issues complicating the issue. The device web-page console looks like this below...

00:00:00 CFG: Loaded from flash at 3F9, Count 19
00:00:00 APP: Boot Count 14
00:00:00 Project RobsBME280Project Sonoff (Topic bme280, Fallback DVES_3BB009, GroupTopic sonoffs) Version 5.12.0
00:00:00 CFG: Saved to flash at 3F8, Count 20, Bytes 1648
00:00:00 WIF: Checking connection...
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Patch issue 2186
00:00:00 WIF: Connecting to AP1 RobsBillion-2.4g in mode 11N as bme280-4105...
00:00:01 WIF: Checking connection...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Checking connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Checking connection...
00:00:10 WIF: Connected
00:00:17 DNS: Initialized
00:00:24 HTP: Web server active on bme280-4105.local with IP address 192.168.1.102
00:00:31 HTP: Console
00:00:39 MQT: Attempting connection...
00:00:53 MQT: Connect failed to PC-Robs:1883, rc -2. Retry in 10 sec
00:01:11 MQT: Attempting connection...
00:01:25 MQT: Connect failed to PC-Robs:1883, rc -2. Retry in 10 sec

The device is an NodeMCU 8266-12E connected to a BME280 which, according to the console, does appear to be providing good sensor data.
Have a MQTT broker running on my desktop with MQTT.fx scanning for active topics.
I'm using Atom/Platformio as an upload tool, and have configured the user_config.h and platformio.ini for MQTT, wifi, etc

If more details are required then please let me know...

Any help and guidance would be appreciated as not having much success in getting this off the ground.

Colin Law

unread,
Mar 18, 2018, 1:49:57 PM3/18/18
to RobUpNorth, SonoffUsers
What have you specified for the mqtt broker? The console suggests
PC-Robs. Have you got a DNS server configured that knows what address
that is? I normally put an IP address in for the MQTT broker.

To get your debug out in the console I guess you have to set
WEB_LOG_LEVEL to LOG_LEVEL_DEBUG to get it to appear in the console,
but I have never done that. I usually just use LOG_LEVEL_INFO and then
remove it when it is all working.

Colin

Phil

unread,
Mar 18, 2018, 1:52:33 PM3/18/18
to SonoffUsers
can you validate your mqtt broker is accessible with a 2nd puter?    do you have any pc firewall s/w running?

subscribe to a test topic on either your broker pc or the 2nd puter and publish a test message on the other puter 

use the mqtt specific commands to validate your settings..

And a router/dhcp server reboot is always worthwhile with posible net connection issues..  

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages