Raspberry Pi 3b+ Wifi instability - Any way to automate detection?

At random times my Raspberry Pi 3B+ shuts off and stays off. This is well docuented online but no solution that I’ve found.
Errors like this show up randomly and continuously when it goes off, it stays off.

brcmfmac: power management disabled
brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -110
brcmf_do_escan: error (-110)

My questions are

  1. Is there any way to script a ping connectivity test so that if the pings fail, the entire reboots?
  2. Is there any fix anyone has found? Short of using a new USB wifi adapter?

What installation are you running?
When testing with a VirtualBox VM I found the HassOS image very unstable for network. IT would require a reboot to restore connectivity.

Hassio can be installed on Raspbian Lite on the Pi if you are currently using the Hassio image.

If HA were to detect the network as down, how would it notify you? :confused:

I’m using hassio (hassos I guess?)

If i could script something like a connectivity test via shell script, I could do a reboot if it goes down. Note, when the error happens, the wifi is down permanently.

Surprised that given the scope of this problem and the amount of posts I see online that it hasn’t been addressed.

I do not use my Pi on wireless but when it had the network issues several times I decided using a mature, stable OS was a better option. Due to scattered documentation installation of Hassio on Raspian Lite is a little tricky. I can post directions here if you want to do this.

Sure bosborne, i’ll take a look.

Just surprised since this wifi problem is prolific. I have a wired connection nearby but prefer to use wireless.

It appears to me the devs are not concerned about long term stability

You shouldn’t! No server should be run on a WiFi if Ethernet is available.

The ‘gold’ standard for me for running Hass.io on Raspbian Lite is Dale3h’s script which worked brilliantly…
GitHub - dale3h/hassio-installer: Hass.io Installer for Raspberry Pi 3 B+ (Raspbian Stretch Lite)

If you must run Hassio, I agree that running it on a Debian-based Linux like Raspbian Lite is likely better than HassOS.
It looks like that script basically automates the Hassio Linux installation, including the installer flag for the Pi. I have done this previously and it works.

He did that script back when there was no hassio install for the Pi3B+ but it worked with the Pi3B as well. HassOS has come a long way since then however I would still use that install now as I prefer a Linux distribution like Debian. It also works as a USB boot install…

1 Like

Hi DavidFW1960 and Bosborne.

Thanks for the insights…

The reason the “server” would use Wifi is just portability to get the best stable z-wave I can get. That’s all I wanted in this as I’m ditching Samsung Smarthings into this DIY.

The reason for running Hassio is the easy of use of the plugs. Makes it so easy to set up Node-Red on there, alongside MQTT, etc.


Q1: If I look at the Raspbian Lite + HA? What are my benefits?
SSH to the core OS as one, it seems
Flexibility in that the system can do more than just HA
Don’t I loose the plugin options?

Q2: If I were to look at the Raspbian route, would I be able to backup/restore my current working configuration include the z-wave setup/devices, etc?

Assuming you mean installing Hass.io on raspbian then you will still have all the Hass.io addons available. You can also if you choose to do so, boot from a USB device and not use an SD-Card at all. Even if you do this, while you could run other things on the Pi I don’t recommend it but YMMV… It’s up to you.

Thanks David.

What boot from USB instead of sd-card? Reliability?
If I move to Raspian with Hassio as a container, can I backup/import my current config?
Is the z-wave card still functional intside the container?

I’m familar with Linux but have never used Raspbian Lite. I’m just wondering what do I gain for this conversion work.
First thing is probably wireless stability IF the fix is done. But I think it’s a hardware issue.

So you’re currently running HassOS - so maks a snapshot and you can restore the snapshot.
There’s a lot of threads lamenting issues with SD Cards on here so some people prefer a USB boot.
Your z-wave should be unchanged from how it is now. I have ZERO z-wave experience though…
I doubt a change will necesarily fix the wifi issue and refer to my previous comment about running a server off WiFi… ie DON’T.

Changing from an SD Card to a USB drive did not affect my zwave at all.

Thanks a bunch @DavidFW1960 and @anon34565116

Agreed that SD-Cards come with great danger, Prefer USB and they are cheap enough.
I think running Raspbian gives me some capabilities found at the OS level which is nice.

I never really had any problems with an SD card once I switched to a higher quality one (Samsung EVO 32gb) but a lot of people seem to have issues. The constant database writes and sometimes sub-par power supplies combined can kill a system.

In my case for USB, I had an unused laptop SSD so I bought an external case that converted it to USB. Etcher complained about a 240GB SD Card. Other than that, things have worked well for me.

From my own personal experience I suffer no wireless disconnects from my Raspberry Pi.

Granted I run HA in a venv manually installed on a regularly updated Raspbian Stretch Lite OS.

The initial install of Raspbian Lite had a blank SSH file and a preconfigured wpa_supplicant.conf dropped into the boot folder of Raspbian so I was able to ssh into the Pi on first boot and ensure that I could sudo raspi-config and upgrade including any firmware upgrades which would pick up any firmware/kernel changes which would typically include changes to the likes of how Raspbian communicates with the WiFi chip.

This is all done prior to any attempt to install HA.

As I don’t use Hassio I can’t comment on how it handles matters like this but I think the above procedures tend to eliminate issues like the OP is experiencing.

The only suggestion I could make to help the OP identify a crashing Raspberry Pi would be to have a second device on the same network running a service daemon polling the offending Pi that would immediately report any crash should it happen.

Depending on what type of router the OP has this could be achieved within the router itself.

1 Like

Thanks @ConcordGE

I think the problem is with the broadcom wifi ship. It seems to be a well known proble,.

That said, I have a Meraki MR42 AP and a Meraki Switch and Firewall. I can monitor when the PI goes down, but also currently have a monitor and keyboard connection to it so I see there errors like

brcmfmac: power management disabled
brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -110
brcmf_do_escan: error (-110)

They are exactly the same each and every time…

Ahh well, time to use wired. or goto Raspbiaan so I can update if it is a driver issue

Or, it could be a problem with the HassOS driver for Broadcom.