Build automations based on device online/offline status

You could put a PI on the grid side and have a simple Apache setup that can be queried. You can then use the Web Requestor Edge driver to check whether the webpage is available.

Does the Synology have an API/web interface that can be queried for the power state? That would be another option using the same driver.