The channel has changed upon suggested fix. Running on Raspberry Pi 3 with Sonoff on ZHA.
The main question is how to get all devices back online. I hope I don’t need to readd them manually. The backup did not revert the state of devices.
The second one is why did it happen? I’m kind of rattled by HA instability.
See only part of the network.
I don’t use ZHA but I am assuming the same applies - this is from the changing channel documentation from Z2M. Also note that the Pi3 is no longer recommended to run HA, it’s too old and too weak.
Changing the channel of an existing Zigbee network is supported. In Zigbee, this is done by broadcasting a network update indicating the channel change. Devices that are asleep during the broadcast (usually battery powered end devices) will not switch immediately, but the next time they wake-up. It is therefore advised to trigger them after the channel change.
Warning
Some Zigbee devices do not support changing channels. In case a device remains unresponsive several minutes after the change, and after having been triggered/woken up, you may have to re-pair it manually.
Warning
Changing channels is only supported for the zstack and ember adapter.
The main reason for instability is the pi3, these no longer have enough memory to run HA. Other reasons may include the power available at the USB ports, google this to find out. Next will almost certainly be SD card if you are using one, if not it will be the USB powered SSD.
Now would be a good time to consider a hardware upgrade, this has been discussed plenty over the last few years here, so I won’t bother with my opinion on what you should invest in.
There seems to be enough memory, 0.7 GB / 1 GB. The CPU is not taxed at all, at least this time.
I am concerned that HA crashed and devices changed channels and lost all the devices. It was not a stable system, but it’s rather disastrous in this case.
Some router devices are coming online, but end devices are still offline.
It makes me think I need to re-add all dozens of devices manually (, which I dread…
You didn’t answer in regards whether you run on an SD cart, or SSD, not how much size left there either ?, But with 0.3GB left in memory, im sure your system will do alot Swap’s, during high usage, So most likely the cause of the Crash, which you will experience more of ( Until your Card/Disk gets permanently corrupted )( Might already be so )
No!
What you see is the allocated memory.
What you do not see is the request to allocate memory which is what makes it crash when those requests are not met.
300Mb is not much and what is worse is that it is probably really fragmented, so you might only have blocks of 20Mb available and some programs need bigger blocks. It is no good that you have 2x 20Mb available when the application needs 40Mb in one block.
It’s a SD high-endurance card with 70% space left. The fix was suggested by HA itself, which it did, restoring the channel.
Is there a way to defragment the current installation or do I have to reimage?
I have done some investigation and it appears that the crash was due to a memory issue indeed, caused by a Python subprocess.
It’s not clear what system was using the process. The SD card is very likely not an issue.
What is most concerning is that HA in the process/after the crash changed the channel and lost the devices.
My main issue with HA Assistant in general is that Zigbee devices keep becoming unavailable and having to re-add them now is such a chore that after trying two Zigbee controllers I want to look to other hubs and routers.
And you do you but until you fix that underlying issue of HA ITSELF running out of ram… You won’t fix that. THAT (devices becoming unavailable, and the wierd channel change - prob a corruption thing invited by memory exhaustion is my bet… those don’t happen in normal running sys) was a side effect of the system. Add all the ‘hubs’ or antennas you want.
Zigbee can take some settling in to get a reliable mesh. Read this for some good tips.
As for the channel changing, it might be that the crash has corrupted the settings file causing the channel change, just guessing as I have no experience of this issue