Connection drops, not able to connect to Home Assistant

Hi all,

I’m new here but I figured I’d ask my question as I can’t find it anywhere else.
I have Home Assistant installed on a Raspberry Pi 3B+. It works fine for half a day, a full day and sometimes even two days but then I can’t access the Home Assistant instance anymore. Not via the app and not via a browser to directly approach the IP address.

I still have it connected to a screen, mouse and keyboard because of this very issue and Home Assistant is still running on the RPi so I’m guessing the problem is somewhere else.

Anyone who knows how I can fix this to ensure I can always reach HA? I have UFW firewall installed but the ip addresses of the devices I use to connect and the ports they use to connect are whitelisted in the firewall.

I have the Netgear Orbi RBK40 (or something like that - don’t remember the exact model) and I have the ports configured there as well to ensure access.

Any and all suggestions are welcome as I have hit a wall and have pulled the power of the RPi for now as it doesn’t work anyway.

Thanks!

What do you mean when you say you “can’t access” you HA?

What do you see on the screen?

Are you using Hassio or some other install method?

Does your pi get a new (and different) ip address?

Hi, apologies for the delay.

I’ve installed Home Assistant on Raspbian Stretch.
The problem I am facing is as follows:

I boot up the Pi. Everything works and I can access the Home Assistant GUI from another laptop, my tablet, my phone (all via IP address) as well as via the Home Assistant iPhone app.

This all works well for a certain amount of time. half a day, a full day, two days. Then I can’t access the HA GUI anymore via any of the devices. I also can’t connect to it through the app.

When I then go to the Pi (physically walking to it) and attaching it to a monitor I can see that both the Pi and Home Assistant are still running fine but I can’t access it from outside the Pi anymore.

I have UFW installed for specific device access and that seems to work fine. It seems to crash somewhere which prevents any connections from inside the network to get to the HA GUI.

thanks

Bjorn

Hi, no. I’ve checked this and it keeps the same IP address. I’ve checked this by turning on the screen and checking the IP address on the Pi itself as well as the app Fing to check what devices are available on the network. The address stays the same.

I might want to consider putting it into static mode but I don’t think that will solve the problem.

I am at the point now that I want to do a million things with it but I can’t do anything as I can’t rely on the connection. My wife isn’t much of a techie so if stuff doesn’t work she won’t ever use it again so until I can get this stable I won’t tell her to use it.

Can you ping it? ssh into it?

Neither. I can at first but after the time mentioned in an earlier comment I can’t get to it any other way than connecting a screen, mouse and keyboard.

You can’t ping it but Fing can find it? :thinking:

Can you ping it from the same device that is running Fing?

can you ping another device on your network from inside the Pi?

Can you kill the firewall then try to test it again?

Just spitballing here…

Sorry, to clarify: the moment that I can’t ping it I can’t see it on Fing either. on the Pi itself it still gives the same address.

Haven’t tried pinging others when the issue occurs. I will boot it up when I get home and try it when it fails.

I’ll also drop the UFW as a second test and try. I’ll post the results here.

If none of that works maybe you have a failing ethernet port/wifi adapter. maybe try switching to the other one and see if it keeps working.

Ok so after three days the darn thing is still operational. I’ll be checking it again when I get home tonight.

Keep you posted.

Hi there. So it seems to be fixed now. it has been running properly for over 4 days now and it doesn’t act up anymore.

I did have an issue accessing it from my wife’s phone but I guess this had something to do with UFW being set too strict. so I’ve removed some rules and I will get more details later.

Thanks for thinking with me.

Cool!

Hopefully it stays that way. :grinning:

Well. After a good while of testing I’ve come to the conclusion you already mentioned in an earlier comment: the WiFi connection on this lovely device has a mind of its own. Seeing as I don’t rely on WiFi I’ve jammed a cable in and it’s now been stable for over a week. Guess that solves that!

Thanks again for the help, the thoughts and suggestions.

Cheers,

Bjorn