I just finished getting my WinPC+CP1500pfclcd (blueiris server), my NAS, and my HA pi to safely shut down after a power outage, and so far it’s working. Here’s an overview of what I did…
I installed powerpanel business 4 (local) on the winpc, plugged the USB in, and setup SNMP v1 in powerpanel using the “public community” only (read only, as the NAS really only needs power out traps). Since the software is local, it handles shutting down the winpc. V3 I am I guess too dumb to get working in this case… and everything on my LAN is isolated behind a router, and I don’t let anyone I don’t fully trust on my LAN subnet ever anyways (all openVPN from outside).
On my Synology nas, I just configured DSM for an SNMP UPS, SNMP v1, using the public community, added the IP of the pc running ppb4local, and the NAS immediately showed approval (make/model/states showed up from ppb4, no problemo). So now the NAS will know when the UPS is having issues, and can shutdown as needed. If the nas was another windows pc, I’d just use ppb4 remote on it instead… but thank goodness the NAS knows what to do sans SNMP NMS! (…DSM’s built in “SNMP server” was disabled)
For my pi… I already had a hardware solution for this, lol… an arduino nano with the pi USB supply going to a digitalread, and sending states to HA using the serial sensor. This method is powerful, since you get a bunch of useful io from the nano, and a lot of preprocessing can be handled by the 32u (can program it to suit a TON of different applications). For example I am using a second pin to read my 12VAC doorbell signal, and a third to get my smoke alarm signal wire into HA. You can get into maker land with these things… but I bet half of the HA users are already there.
On a side note, I did try a roundabout way using a docker image of ppb4 local… the idea was to have the USB attached to the NAS, Synology handle shutdown from USB, and the ppb4 local instance would then inform a ppb4 remote instance (installed on the winpc) to shutdown in time. Unfortunately I’m too much a newb, and could not get the container to talk succesfully with USB after trying for hours. So I gave up and experimented with SNMP until I came up with something that worked.