I moved my pi with HG to run on a UPS to prevent those annoying power disconnects that seem to always happen. So 3am the other night power goes off in a hi wind storm. Off 3 hours. Next morning I found the UPS off, so of course the pi was off. Now for the stink bug culprits...
Turns out our backup 22kw generac generator did not power our buildings; it had a fault! So checking, found the transfer contactor was full of stink bugs! When it switched, it had a few stink bugs between the contacts! So the UPS ran out of juice in that 3 hours and shut off, incorrectly pulling power from the pi. Of course the alarms all went off next morning when opening doors since HG was not running to disarm.
Unfortunately, THIS power disconnect scrambled HG; the pi rebooted and HG ran but lost all its module names again, so I began a restore, forgetting I had a PW on HG. That did not go well and ended up locking up HG. Pi still talked via teamviewer and putty so did a reboot to find HG would no longer run. it seemed to try to load mono and then do nothing. No reboots brought HG back.
On a long shot, I sudo apt update & sudo apt upgrade (had done this only a week ago so fairly upto date) and reboot and HG came back!
I certainly will now remember other's advice to NOT restore with a HG PW!