-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wemos D1 Mini Pro - frequent reconnects #72
Comments
@qntris You can upgrade esp8266 core to 2.7.1 (last release) - tested. However try to compile with WiFiManager by tzapu v0.12.0 as it is stated in readme file and then report again the results |
Hi @Angel0ffDeath,
The sketch won't compile for D1 Mini Pro: |
Hi @Angel0ffDeath , I don't see any attachment and the post seems a bit off. |
Can you zip it or upload somewhere and provide a link? As for the reconnects, I am actually quite puzzled, the device works flawlessly:
My main router is TP-Link Archer C7 and the secondary one is TP-Link RE305 range extender, set up as Access Point, DHCP turned off, hooked up to the main router via cable. The main router and the RE305 are far away from each other, the beacon interval and the DITM interval is the lowest possible. The SSIDs and the passwords of the 2.4ghz and 5ghz networks are the same. Tried changing them as I suspected that the Wemos might be switching them, but that did not help either. I checked all the settings on my main router and on the RE305 and I honestly don't have any idea, why it would not be reconnecting when hooked up to the RE305 or when hooked up to the main router and being pinged from the RE305.... The signal strength is excellent in both rooms, the interference is very small. Other ESP8266 based devices (smart sockets) work without any issues in both rooms... Maybe @maragelis can help here as I am left without any clues on what might be causing the strange reconnect issue when connected to my router and not pinged from the AP. |
@Angel0ffDeath , can you delete your posts as they are spamming the topic - GitHub changes the content as it seems |
Done... Sorry... Was reading my gmail and answering from there... Didn't know it is posted here also |
@qntris - did you receive the file? |
Yeap, will test it first thing tomorrow (it’s late on my end) and report back. I however doubt that this is the problem, as the board is quite steady on my AP and seems to be disturbed when on the main router... |
just try, then disturb... |
here is also late. Will wait your feedback |
@Angel0ffDeath it compiled, but the result is the same - disconnects every couple minutes |
What serial connections are you using. Software or hardware? . Rx/TX pins or the 5,6 pins (can’t remember exactly). Try using Hardware RX TX pins without enabling debug this the most stable way. |
Hi @maragelis 1591378630: Client 84:F3:EB:DB:5B:06 has exceeded timeout, disconnecting. No other connection attempts after that. When pinging the board from a laptop connected to the WiFi, it is much more stable. My main board (NodeMCU) is connected to the main router and I am constantly pinging it from an old laptop that is connected to the AP in the other room (via WiFi) - no disconnects for 20-30 straight hours. |
@qntris - In addition to what @maragelis says I would like to add that in GENERAL WiFi works perfect. Your problems (as you describe them) are from the WiFi and not from Paradox communication. Nevertheless, first try what maragelis says and then additionally you can try the following: Check the signal strength. Check your WiFi router configuration - probably you would like to increase leasing time or to bound your alarm panel with certain IP. Also please adjust your DC-DC (Buck converter) to 5V. Try to move your Wemos device outside metallic box of the alarm (or at least leave the door open) and see what will happen. I don't have more ideas... Just try... If it still doesn't work... I don't know :( |
Hi @Angel0ffDeath Boards are tied with reserved IPs, lease interval is 120 minutes (disconnects happen quite often so not related to this), beacon interval is 40ms (the lowest possible). |
@qntris - I don't know how you can test the devices without they are connected to the alarm, but ok... you know. I hope you are using 1 device at time - the connected one and the others are disconnected. According to me it is also mystery... If you provide a trace - this will help Also - Can you provide a picture or scheme of wiring you are using |
I test their connection to the MQTT broker and if they drip it, also test the ping availability. I am testing two at a time almost, but I thin in one of the posts @maragelis mentioned it’s not a problem - they don’t have similar ID’s or so. When connected to the Paradox alarm I get messages and I can send commands as well. The wiring is exactly as per the picture that Maragelis has included to the project here in github, bit I am also testing them connected to a mini USB and into the AC adapter. It’s something else. I have 4 other ESP8266 base devices (smart sockets) and they are hooked to the main router without any disconnects (from the broker). I am not exactly sure how to do tracing - besides setting 1 and precompiling what else I need to do? Where do I look for the actual traces? |
@qntris - You don't need to recompile - just post "trace=1" in "in topic" (probably paradoxdCTL/in if you didn't change it) then connect your laptop via USB cable to the micro USB port of Wemos/NodeMCU. Now you can open PuTTY sesion (serial) and record the log (trace). Mean while you can issue some commands. If you have some home automation system this is already integrated - you can send the log file also |
@Angel0ffDeath , I have posted "trace=1" to the "in" topic and the Wemos' light flashes after sending it, so the connection is good. However hooking up to the serial port in Putty does not show anything - the connection to the serial port is established, but no traces are displayed on the terminal screen. I am using Home Assistant for home automation, can you give me some more hints for the traces? |
Some Chinese wemos modules have been known to have problems with the program. I have some suggestions. To use trace you have to use swap serial=1 and connect the panel to D13 D15, or use a serial ftdi module connected to D8 D7 when Using hardware serial. Know bug: there seems to be a problem with heavy systems (more then 16 zones) with high zone traffic. I believe the wemos can’t keep up with the rate of messages. |
Hi @maragelis, it’s not a faulty module or busy system. Everything’s fine when I keep pinging the device from the AP in the other room or if I connect it to the AP in the other room. It’s something with the router settings but I have checked e v e r y option - no reason for that behavior. Hoped that tracing will help. As I don’t have FTDI adapter - is there any other way - via miniusb cable or commands OTA? EDIT: |
This is trace function from the code: Then you should receive trace messages in status topic. And of course you should first publish TRACE=1 or compile with that option on |
Hi @Angel0ffDeath , I made the change that you have proposed, adding "true" (without quotes) as a third argument as it wouldn't compile otherwise. Below is the output in the "status" topic (changed the in topic to tracein to not interfere with my main board that is connected to the Paradox). I am testing this one without it being connected to the alarm module, just want to make sure that the connection to the MQTT broker is stable. Message 50 received on paradoxdCTL/status at 1:08 PM:
|
could you try this sketch if you have a second module. its a first version many years back which I am still running on my system. just give it a go. |
Hi @maragelis, I will give it a try, but I have two questions:
|
add them in the sketch ino file. just sniff mqtt messages. |
@qntris - According to what I see from the trace, I think your Wemos D1 Mini Pro is going to sleep mode to save energy. You can check this And try to disable autosleep mode and see what will happen |
Hi @maragelis, I managed to compile and upload it, but the wifi network that I usually connect to in order to enter my wifi credentials is not showing up. @Angel0ffDeath |
@qntris - In setup function just add: This will disable sleep mode. It should be added after setup_wifi(); To use the sketch @maragelis asks you: The network is PARADOXController_AP |
@qntris Any success??? I'm interested... |
When I unplug my TP-Link RE305 range extender it is stable (using the latest master). If I have the RE305 plugged and constantly pinging the Wemos it is also stable. Why this happens, to this day, I have not found out. All other ESP8266 devices at home work well regardless of the setup. |
@qntris Well then it seems the problem is between Wemos D1 mini Pro which you are using for the alarm and range extender. What type are the others ESP8266? Try to use the same type... |
I read that Paradox serial port is TTL 5v. Shouldn't a ttl level shifter be needed? Mine is a MG5000. |
@marianomd Correct it is 5V TTL, however Wemos D1 Mini tolerates 5V on input so you don't need TTL logic level shifter unless you are using some other board which is not 5V tolerable |
Great, thanks. |
Hi,
I am using a Wemos D1 Mini Pro and a buck converter connected to the Gnd and + serial pins of the MG5050 alarm system. I have properly soldered the pins and checked the connections several times, confirmed that the system is working (I could read/arm/disarm using MQTT). However after ~20-30 minutes the Wemos D1 Mini Pro is disconnected (for no obvious reason) and does not come back online. I have resoldered the connections precisely, tested and connected back to the alarm system. Same thing happened again after a few minutes.
Now I have connected the power to the 3v pin (stepped down the voltage with the buck converter) and testing it for a few minutes but I still see disconnects - Socket error on client 84:F3:EB:DB:5B:06, disconnecting. (at least with quick reconnects this time).
Should I be targeting a faulty Wemos module? I have a NodeMCU board that I have already programmed and is waiting in the shelf. If those disconnects continue, I will be trying it instead of the Wemos board.
I have used the following libraries and settings, as it would not compile with some of the lib versions from the Readme:
#59 (comment)
These are the Mosquitto logs:
1587933143: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933339: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933360: New connection from 192.168.0.170 on port 1883.
1587933360: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933405: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933405: New connection from 192.168.0.170 on port 1883.
1587933405: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933466: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933487: New connection from 192.168.0.170 on port 1883.
[INFO] found MQTT-user on Home Assistant
1587933489: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933669: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933679: New connection from 192.168.0.170 on port 1883.
1587933679: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933770: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933780: New connection from 192.168.0.170 on port 1883.
1587933780: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933835: Saving in-memory database to /data/mosquitto.db.
1587933885: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933898: New connection from 192.168.0.170 on port 1883.
[INFO] found MQTT-user on Home Assistant
1587933899: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
1587933944: Socket error on client 84:F3:EB:DB:5B:06, disconnecting.
1587933967: New connection from 192.168.0.170 on port 1883.
1587933967: New client connected from 192.168.0.170 as 84:F3:EB:DB:5B:06 (p2, c1, k15, u'MQTT-user').
The text was updated successfully, but these errors were encountered: