Comments (14)
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 :/
from home-assistant_config.
@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 :)
from home-assistant_config.
That's great idea! And you are right!
Philips Hue had that problem, but they updated firmware long time ago to fix this issue.
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.
from home-assistant_config.
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).
from home-assistant_config.
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.
from home-assistant_config.
I've done some work on this based on my Powerwall usage. You might find some ideas and code in there.
CCOSTAN/Home-AssistantConfig#779
from home-assistant_config.
@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.
In theory, I have an idea, but that would be big hack - to publish specific MQTT message and then on each reboot to check for that message state.... Maybe that could work. But since I now use add-on MQTT, I guess that it's not running or could be delayed during HA startup.
Or based on your idea, probably, easiest way would be to have automation on statrup check if it's daylight and if specific light is on (light that is NEVER on during day), to then turn all lights off...
from home-assistant_config.
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
Ups Status : Online
Ups Status Data : OL
When on batteries:
Ups Status : On Battery Battery Discharging
Ups Status Data : OB DISCHRG
When on mains and battery charging
Ups Status : Online Battery Charging
Ups Status Data : OL CHRG
Now I should catch states OB DISCHRG and temporarily save it in booblean.
It should be checked on startup of HA and if set to true/on - wait 5 minutes and turn lights off (just to give Zigbee network few more minutes to try and sync back).
from home-assistant_config.
Now we have 3 automation:
- UPS_power_failer.yaml - this one is triggered when UPS kicks in sets input_boolean to on
- UPS_battery_full.yaml - it is triggered when battery is full and if input_boolean state is on .
This is for when power is restored while HA is still running - UPS_battery_failed.yaml - every HA restart this one runs, but is only triggered if input_boolean is set to on.
Turns lights off and notifies.
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.
Is this it @deadly667 ?
from home-assistant_config.
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...
from home-assistant_config.
Closing this issue for now as I can't test anything until I replace UPS batteries.
Had replace battery alarm (continuous high pitch beep) at 5:50 AM on Sunday - not funny, took about 15 minutes to reset it.
from home-assistant_config.
Old batteries have been removed and new ones are in.
I will conduct some power failure tests over the weekend.
from home-assistant_config.
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.
from home-assistant_config.
Due to new unplaned test, I have a bit more stats about UPS now.
Power lost:
UPS depleted:
And power restored.
But HA didn't start properly - have to see what happened there.
from home-assistant_config.
Related Issues (20)
- Seeed Studio XIAO 32C3 and mmWave sensor HOT 2
- Smart Doorbel by Marcel Zuidwijk HOT 1
- Command Line changes in 2023.6 HOT 1
- Support for roon in music assistant?? HOT 6
- HACS Room Card Examples HOT 5
- Log error: Shellies Discovery name fix HOT 2
- Log error: GitHub notification has error HOT 1
- Log error: Erathquake zone trigger issue HOT 1
- Bubble Card Examples HOT 5
- Linptech ES1 presence sensor automation example
- Low battery themplate HOT 1
- Media Control device Apple TV) refresh issue HOT 2
- GTFS examples HOT 1
- OpenEPaper Link code examples.
- Google Sheets integration HOT 1
- Smart Solar Inverter HOT 5
- Music Assistant HOT 5
- HASS.Agent implementation HOT 3
- ILI9488 display with ESPHome HOT 1
- Support for Lilygo T5-4.7 e-paper device HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-assistant_config.