HA losing internet connection

I have HA on RBPI3 with Raspberrymatic add-on and every 10-15 min. HA is losing the internet connection for few seconds and then it gets back online, but sometimes, say once a day it doesn’t and I have to unplug it from the power source and plug it back in to restart.
What can be the problem?

It can be many things and the description does not really provide much clue.
It sounds a bit like a hardware timeout, which could be because of storage errors, especially if it is an old SDcard that is used, but it could also be caused by overheating or an underrated or faulty power supply.

The whole sistem is new, including the sd card. It is the first installation, on a new sd card. The power source is also new, 5VDC 2.4A.

Last night I’ve disconected the cloud connection (Nabu) and since then, no problems with the internet connection. Could the cloud connection be somehow related or it is just a coincidence?

It could be something with the internet connection.
I guess you are using a Raspberry Pi 4 then, so did you get some kind of cooling for the chips?
Version 4 do get quite hot and at least passive cooling should be applied.

Yes I belive it is something related to the internet connection, because this morning I deactivated IPv6 and reconnected the cloud service and it’s working fine since then. Maybe it had to do with IPv6… I don’t know for sure since I am no expert.
BTW, I am using Pi 3 not 4.

IPv6 can cause problems, if you have something configured in your router for IPv6 that is not actually working properly.

Disabling IPv6 didn’t solve the problem. After a few hours HA disconnected again several times untill it didn’t reconnect at all. The problem goes away only when I disconnect the cloud service and connect to HA with it’s local IP.

Maybe it is your router or internet connection that is the cause.

Try to run “ha resolution info” on the HA host to check if there are any DNS problems.

This is the result.ha

You have no issues in your DNS setup,
Try to monitor your router and if you are using WiFi on the HA installation, then also your access points.
Maybe your router have an issue or maybe there are noise on your WiFi at times.

I am using lan for my Raspberry Pi3, not wifi.
My network is made with Mikrotik Cap Manager, and the RPI is connected on one of the lan ports of a router wich is used as an AP.
Maybe it is not an internet/network problem after all. I just noticed I have a low power warning in logs seconds before the connection dropped. I will keep an eye on the power warning to see if occurs before the connection drops nextime.

Ahh, then it was power after all.
What have you connected to the RPi of both internal stuff and USB stuff?

The internal PCB for Homematic/Raspberrymatic (RPI-RF-MOD). I don’t know for sure if the power source is to blame, but today I will change the power cable because I suspect the wire gauge is to small in this micro USB cable. The power source is a Mean Well DIN rail form factor source 5VDC 2.4A.

Mean Well is supposedly a brand that makes stable and good power supplys and 2.4A should be more than enough for a RPi3 with just the RPI-RF-MOD connected.

It wasn’t the power… I am back to point zero. I have changed the cable, the power supply, the lan cable, the router… and no results.

OK, lets see if we can test this to the death. :slight_smile:
Set up a ping from your normal work computer towards the RPi.
In windows this is done with ping -t
Also set up a ping from your work computer towards to router. On Windows run ipconfig in a command prompt and use the IP under default gateway.
And lastly set up a ping to the first hop outside your network. On Windows you might get a list from running tracert, but otherwise your router should list a gateway for the WAN configuration and that can be used.

This should show…’
If the RPi lose network connection completely.
If the router lose connection to the local network.
If the router lose connection to the internet.

Pfff. I am not a programmer, but I will do my best to follow your instructions. Thanks. :grinning:

HA IP ping time - longest 482 ms
Main router IP ping time - longest 622 ms

Tracing route to over a maximum of 30 hops

1 <1 ms <1 ms <1 ms
2 3 ms 3 ms 4 ms
3 3 ms 3 ms 3 ms
4 17 ms 15 ms 17 ms
5 21 ms 21 ms 20 ms
6 20 ms 20 ms 20 ms
7 18 ms 19 ms 18 ms
8 18 ms 18 ms 18 ms

Trace complete.

Well, not quite the result I was hoping for.
We need information about periods of timeout or very high ping times for more than just one or two following pings.
And the traceroute is good, but it was a tool to find other hosts to ping.
I would add ping session towards and also one towards

You need to have all these ping sessions running at the same time and watch them for timeouts and large clusters of really high pings.

And I saw another post from you with logs and some errors in the Homematic setup.
Get those fixed, so your HA installation those not have to timeout on those all the time.

I will ping those addresses to.

Regardng the HA logs… I don’t know how to fix the errors… I am a pool constraction contractor, I am not an computer expert… the computer and smarthome thing is just hobby to me.