-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPS power failure #6
Comments
Also you can add automation when you detect power outage (UPS on battery mode) and after power is back online you turn OFF lights. Ikea lights has fun feature that they turn ON when they got power. Its just happened to me while we were on vacation. Power outage and after all lights in house was ON, of course I didnt think about it and lights was ON for one day till I didnt see it on my mobile phone :/ |
That's great idea! And you are right! Have to think a bit more about this one, since it's possible for UPS to shutdown Synology NAS and HA then would not know what to do on boot, when power get's back. |
Well yes, I was thinking about it. For that case when UPS shutdowns everything you cannot do much and this is the worst scenario. You can put that on every restart of HA turn off lights but then you need to add boolean sensor for development (intentional restart) to skip that automation but its not easy and you need to remember to set boolean before restart otherwise you will turn off lights at evening and family will be, lets say, unhappy :D. I didnt cover this worst scenario because I know that I will forget that boolean. Also I set notification for low battery on UPS so I will know that soon it will shutdown everything. If that happens when nobody is at home than I cannot do anything because you cannot start Synology remotely (if Im not wrong). |
To be precise Synology will go into safe mode, it will not shut down itself BUT in safe mode he shutdowns everything (all services) and also unmounts all disks and next expected action is power loss or cold boot according to Synology documentation. |
I've done some work on this based on my Powerwall usage. You might find some ideas and code in there. |
@deadly667 - it would be great if you cold save state between HA restarts. If there is a way, I'm not sure on how to do it. |
@CCOSTAN - that will be a great inspiration and help with DIYBMS project I'm working on and DIY PowerWall. Thanks for pointing me in that way! Although I'll have it set as proof of concept projects since I live in apartment and would break bunch of building codes I guess :) |
I've captured 3 states of UPS so far. Haven't tested if there is "OB CRITICAL" or not when battery is at critical state, but I guess that there is additional state available. States I got so far: When all is OK - Battery full and on mains When on batteries: When on mains and battery charging Now I should catch states OB DISCHRG and temporarily save it in booblean. |
Now we have 3 automation:
If I thought of everything, this should handle all events of UPS correctly. Both when power is restored without failure and also when power is restored after UPS shuts down. |
Third case is hard to test as I would need to cut power to UPS until it dies, and since batteries have lost majority of the capacity I think they wouldn't trigger shutdown in time. So, until I replace batteries, that will not be tested. Left to do is to make Alerts on remaining capacity and that will wait for battery replacement too... |
Closing this issue for now as I can't test anything until I replace UPS batteries. |
Old batteries have been removed and new ones are in. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
So far, only one notification arrives on power failure.
Need to add Alert when system is on UPS + notifications with remaining time.
Probably should also try to intercept shutdown and send message too.
The text was updated successfully, but these errors were encountered: