WeMos D1 mini w/espeasy but no MQTT

I am also running mega-20180723 normal and mqtt working normally (with node-RED)

Well, the v2.0 version is the recommended stable one, you might try.

IMHO there is no reason to install a development version but it's up to you.

I'm running mega-20180722 with no problem. Let me update to 20180723 and get back in a couple minutes.

while I'm uploading, which version from the release do you use? I ust the 'normal' version
ESP_Easy_mega-20180723_normal_ESP8266_4096.bin

mega-20180723 is working fine. I seem to remember last week having a problem when trying to connect to one of my MQTT box's on a pizerow so I switched to one that has been running for a bit. Let me play and I'll update you in a bit

Same here. I didn't notice "development version"

well that wasn't it, it is working fine with both mqtt brokers.

How did you set up the broker with a login? I wonder if that could be an issue?

You should find the mosquitto log at /var/log/mosquitto/mosquitto.log
Have a look in there to see if there is anything interesting.

This is what I"m getting in the Mosquitto log
1533107149: New client connected from 192.168.1.141 as ESPClient_B4:E6:2D:17:E0$
1533107149: Socket error on client ESPClient_B4:E6:2D:17:E0:D9, disconnecting.
1533107149: New connection from 192.168.1.141 on port 1883.
1533107149: New client connected from 192.168.1.141 as ESPClient_B4:E6:2D:17:E0$
1533107149: Socket error on client ESPClient_B4:E6:2D:17:E0:D9, disconnecting.
1533107150: New connection from 192.168.1.141 on port 1883.

Is it possible there is another device on our network with the same IP?

I am using Untangle UTM as my router and it won't let me assign duplicate ip's.
based on the mosquitto.log entries I believe it's a socket error, not a routing error.
I'm not sure how to deal with a socket error.

First disconnect the device, restart mosquitto and check in the log that there is not a device connecting from that ip or with that client id.
Then connect the device and see what happens in the mosquitto log. Check that it is not trying to connect twice before the first error.

Well, that seems to have done something. ESPeasy log reports this now:
185704: DHT : Humidity: 41.60
190704: DHT : Temperature: 26.90
190704: DHT : Humidity: 41.60
195704: DHT : Temperature: 26.90
195704: DHT : Humidity: 41.60
200704: DHT : Temperature: 26.90
200704: DHT : Humidity: 41.50
202405: MQTT : Intentional reconnect
202433: MQTT : Failed to connect to broker
205704: DHT : Temperature: 26.90
205704: DHT : Humidity: 41.50
210704: DHT : Temperature: 26.90
210704: DHT : Humidity: 41.50
211968: WD : Uptime 4 ConnectFailures 0 FreeMem 17512
215704: DHT : Temperature: 26.90
215704: DHT : Humidity: 41.40
220704: DHT : Temperature: 26.90
220704: DHT : Humidity: 41.40
225704: DHT : Temperature: 27.00
225704: DHT : Humidity: 41.40
230704: DHT : Temperature: 27.00
230704: DHT : Humidity: 41.40
232505: MQTT : Intentional reconnect
232533: MQTT : Failed to connect to broker
235704: DHT : Temperature: 27.00
235704: DHT : Humidity: 41.30
240704: DHT : Temperature: 27.00
240704: DHT : Humidity: 41.20
241968: WD : Uptime 4 ConnectFailures 0 FreeMem 17488

I'm back to connection errors but I think I see a pattern. I get 8 connection errors then a good connection, 8 errors then a good connection...
The wemos attempts a connection every second but only connects about every 5-10 seconds (no stopwatch)
(?)

When I change my device interval from 5 seconds to 1 second I only get 1-2 connection errors between good connections, while with a 5 second interval I was getting 8-9 errors between good connections.

One easy way is to use a new wemos, they are really cheap, I'd take a
WeMos D1 Mini Pro-16 Bytes Module ESP8266 Series WiFi Wireless Antenna Connector

what do you have set at CONFIG->Sleep Mode?
I have 0 and 60 with 'Sleep on connection failure:' unchecked

I also have 5 seconds for the device interval

No, I deliberately disabled that one. Only need one issue at a time. :wink:

image

[{"id":"959c061.3ace2f8","type":"inject","z":"691cdf35.de19f","name":"","topic":"","payload":"Hello world","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":180,"wires":[["4649debe.6f36f"]]},{"id":"4649debe.6f36f","type":"mqtt out","z":"691cdf35.de19f","name":"","topic":"test","qos":"","retain":"","broker":"a86115be.40797","x":410,"y":180,"wires":[]},{"id":"6430e235.7fe28c","type":"mqtt in","z":"691cdf35.de19f","name":"","topic":"test","qos":"2","broker":"a86115be.40797","x":410,"y":240,"wires":[["ef06a56c.2ee1e8"]]},{"id":"ef06a56c.2ee1e8","type":"debug","z":"691cdf35.de19f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":240,"wires":[]},{"id":"a86115be.40797","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.142","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Here's a very basic MQTT checker that doesn't need the Wemos.
It just sends and receives a "Hello World" message to/from the broker.
It might help to rule out the Wemos as the culprit.

I've done that and got good results. Here's my MQTT node with debug.

[{"id":"f721e390.6b0638","type":"mqtt in","z":"22ab03b0.dce77c","name":"","topic":"/Irrigation_141/DHT22/TempDHT","qos":"2","broker":"2be9bb32.557d34","x":200,"y":130,"wires":[["9b81b3f7.687d18"]]},{"id":"9b81b3f7.687d18","type":"debug","z":"22ab03b0.dce77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":470,"y":130,"wires":[]},{"id":"2be9bb32.557d34","type":"mqtt-broker","z":"","name":"192.168.1.140:1883","broker":"192.168.1.140","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]```