Debugging a faulty Home Assistant network connection

Hi Everyone,

HA Noob here.

Issue: My HA instance often loses connectivity with the following symptoms:

I don’t know what’s the issue. But the only way out is to power cycle.
Then everything works, for a while.

It might be something unique to my setup, so I’ll try to describe it best I can:

Network

  • RPi4 is my unify controller
  • I have a couple of unify switches & AP’s
  • Everything else on the network has absolutely no problems connecting

HA

  • Running off a Raspberry Pi 3 A+
  • Booting off an SSD
  • Connected over Ethernet (Pi >> Unify Switch >> Another Unify Switch >> Router)

Other Info

  • I use a Conbee II stick
  • A separate Raspberry Pi 3 A+ is running DeConz/Phosconn
  • HA instance is connected this this IP address (“add integration” >> “deconz”)

Important to note, I have absolutely no other connectivity problems on my home network.

Uploading (an) image that should illustrate the problem.
Consolidating 3 things into 1, as I am a new user

As per the router, homeassistant is disconnected.
But the ping works just fine.
And I can’t access HA via the browser. (both IP address and homeassistant.local:8153 don’t work)

Thanks!

Check System → Logs.

Just power cycled the R Pi to get back in the system.

I don’t see much here unfortunately. Just this -:

And now I can’t connect with the system again. Estd. uptime is ~5mins.

For network troubleshooting a layered strategy is often successful. How does the router probe the HA IP? When the problem is happening check:

  • What happens if you simply reconnect the Ethernet cable?
  • Does telnetting into 8123 on the HA IP work? This indicates whether a TCP handshake is still possible.
  • Simplify the setup. Try connecting the RPi more directly.
  • Login to the RPi locally and check the status of listening ports.

Thanks @odwide

1 & 3 are simple enough. I’ll try those.

Does telnetting into 8123 on the HA IP work? This indicates whether a TCP handshake is still possible.

Does this mean using something like Putty?
Should SSH be enabled on HA? Or is that by default?

Login to the RPi locally and check the status of listening ports.

How would I do this? Connect monitor via HDMI?

Thank you

Hi @tom_l
Is there a way to get older logs?
Given that I have to power cycle things, I just don’t see older entries - at least in the frontend.

Yes, there’s a file that is saved from before the last restart in your config directory, home-assistant.log.1 note the “.1

To add to odwide’s comment also check your wires and connections. Use a different Ethernet cable that is trusted on a more direct port on the switch.

I had this issue a year ago when one wire came loose behind my patch panel, it wasn’t until I connected directly did I find the intermittent issue.

Thanks,

1/
Direct connection - Connected direct to router. Still not working.

2/
Based on @tom_l 's advice, I tried to install “File Editor” to get into the config directory. Which didn’t work. Just timed out. No error. System is still up, so here are the logs if you can make something of this

Right after I got this screenshot, I clicked the button to refresh the logs.
I’m back to “Connection lost. Reconnecting” :frowning:

Your power supply is not sufficient.

I did see that a few minutes back, so I re-tried with another PSU.

Requirements needed:
5 V/2.5 A DC

I was using a 5V, 2.1 A PSU.

I’ve now subbed it for a an Anker Powerport that gives 5V, 4A on the USB port. (max output of 2.4A per port). Also changed the microUSB cable for good measure.

Let’s see

The pi 3A+ recommended power supply is 5V at 2.5A. That’s with an SD card. You have an SSD so it will be even more. You probably need a minimum of 3A.

Noted… thanks @tom_l

Even after the “upgraded” PSU, I’m still getting the low power message in the logs

This is my current PSU

Based on what you’re saying, this is not enough. Given the cap of 2.4A per port.

I’ll upgrade and then check back.

Thank you

No need to enable SSH. Telnet will simply do a TCP handshake with the HA web server, indicating whether the connection is healthy enough to go beyond a simple ping. On Windows you can enable the Telnet Client feature or use Powershell.

telnet <HA IP> 8123

A blank command prompt means that the handshake succeeds. Otherwise you’ll get an error.

So, I moved over to an SD Card. As @tom_l pointed out, the SSD has its own power requirements (which is 1A).

It is a lot better now. The system is mostly stable, but still goes down once a day. I think it might still be a power supply issue?

Perhaps HA needs the best quality power possible? That’s the theory I’m going with. I have ordered the official power supply.

Does anyone have any suggestions on what other power supplies I could try? (Something to power both Pi + SSD)

PS: I tried the below check

Got a blank screen. So I suppose that means the connection is healthy?

But it doesn’t matter, as homeassistant.local:8123 does not open.

If telnet works most likely it’s not a network issue.

True, I don’t think it is a network issue at all.
I’ve been searching online and have found other threads of people with power issues.

It’s looking like the power requirements of HA & Pi3 A+ are quite stringent.

I think I’ll need to find a good 5.1V, 2.5A PSU. And likely higher that 2.5A.

That said, I would really like to look at the logs just before a crash. How do that I get to that? I haven’t found any simple guide (yet).

Hi,

Is there any chance you’re with Virgin Media?

I’m on Pi4 with microSD and at some point in the past it just started dropping off the network, despite a new better Ethernet cable being purchased. I’ve since switched to Wi-Fi and it’s not dropped off yet. tempts fate

Gareth