rvdbreemen / OTGW-firmware

A ESP8266 devkit firmware for the Nodoshop version of the Opentherm Gateway (OTGW)
MIT License
145 stars 34 forks source link

Ping problems #230

Closed Nifrabar closed 3 months ago

Nifrabar commented 8 months ago

In addition to issue #222 As I still had disconnect connect in Domoticz log file I removed the software and went back to the original software with just serial connection. From that moment all worked stable again as usual. Next step was buying a new NodeMcu V2 and flashed again the new software. OK all seems to work. But after a while again the connection error was there. Now I started pinging and here strange effects happened. 1st Ping > good 2nd Ping >fault 3rd Ping >fault

It seems that this is causing the connection problems. Random good/fault Ping result.

Maybe that baudrate is too high? As I cannot change any network setting from the application I got stuck new. Are there other bin-files to try? I am not able to compile thd source. My Domoticz is very stable without the new OTGW software. I am having about 30 ESPs (easy) and also about 15 ESP (tasmota) devices which are very stable.

So what suggestions are there.

Thanks. -Bart

rvdbreemen commented 8 months ago

Bart, I notice you are talking about the baud rate and network settings, but the firmware is designed for use with MQTT. Even though there is a legacy support mode available, my firmware is not designed for serial use.

If you have any issues, I recommend not using my firmware. You can opt for the EasyESP (used before) or the NodeMCU firmware by Bron Schelte.

Connection errors and ping issues are most likely on another level in the ESP, which I cannot explain. The reconnected could indicate unstable wifi issues,.

Can you see the quality of your wifi settings (in de Debug Information) page? That gives a good indicator if is maybe an unstable WiFi issue.

Thanks, Robert

Nifrabar commented 8 months ago

Robert, I will test with another esp next to the otgw. Then I will do several ping-test alternating for both esp s and revert with my findings. Would a serial connection not suffer from instable wifi? regards, Bart

rvdbreemen commented 5 months ago

@Nifrabar

I highly recommend the MQTT integration and not the legacy serial over WiFi/network integrations.

My firmware was specifically designed to no longer having to deal with crappy WiFi.

Did you solve this issue? Is so let me know.

Kinda regards Robert

pvossel commented 4 months ago

I have 2 NodeMCU's. One with the latest OTGW FW and another for a different project.

They are both near each other on my attic. Connected to the same IoT SSID. The other NodeMCU has a 100% successrate pinging. The OTGW one has a 50~ % successrate.

I suspect it might have something to do with wifi protocol. That one is using 802.11G and the other one 802.11N.

DaveDavenport commented 4 months ago

Just as a test, I did a quick test on my OTGW and I get no ping loss.

100 packets transmitted, 100 received, 0% packet loss, time 99162ms
rtt min/avg/max/mdev = 2.519/6.725/66.196/7.444 ms

I wonder why one sais G other N, given this is something the lower level firmware (from esp) deals with and not the otgw layer on top (to the best of my knowledge).

pvossel commented 4 months ago

@DaveDavenport,

I recently changed my firmware on my accesspoints (TP Link M4 Deco) to OpenWRT. OpenWRT is a bit more flexible in settings.

Since I have installed OpenWRT it is having this problem. Therefore I suspect some 802.11 mode issue (on OpenWRT or NodeMCU side).

Wifi RX Power (dBm)-66
Wifi Quality (%)80
Wifi QualityAmazing

Ping to NodeMCU with OTGW:

Ping statistics for 10.0.0.200:
    Packets: Sent = 8001, Received = 5092, Lost = 2909 (36% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1141ms, Average = 3ms

Ping to NodeMCU (other project):

Ping statistics for 10.0.0.237:
    Packets: Sent = 5699, Received = 5669, Lost = 30 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2722ms, Average = 157ms
Nifrabar commented 4 months ago

Any progress on improving ping-behaviour? Should like to have the MQTT version but as it turned out for me to be unstable as also mentioned bg others in this thread I keep using the serial OTGW connection.

DaveDavenport commented 4 months ago

Its very hard to debug this. There are so many unknowns.

@pvossel would it be possible as a test to swap the nodemcu around? flash the other one with otgw and the otgw one with the other project? This is very curious.

pvossel commented 4 months ago

Small update, the problem for me totaly dissapeared. Ive made a TCPdump from my accesspoint to the ESP. I saw it had trouble with an ARP broadcast. I've changed multicast to unicast and am now I am half a day problem free (no idea why this should influance the arp tho).

Will monitor it the coming days.

rvdbreemen commented 3 months ago

Closing this as it seems to be a network issue that the ESP has problems with. Related to SDK most likely.