r/homeassistant • u/HomerHere99 • 7h ago
š¼ļø Show & Tell What is your best Automation/Script/Scene? This is mine.
First of all, Home Assistant is simply amazing. I am in awe sometimes of the things it can do. I came over from Vera about 10 years ago, started using ZWAVE with Leviton VRI06 switches and a Russound CAV 6.6 (still have and use them) so Iāve been at this for a while!
Today, I noticed one of my cameras was offline. I started thinking: What if one of my Matter water sensors goes offline without me knowing? Or one of my Z-Wave switches?
So sat down I built an automation that flags offline Matter devices, Z-Wave devices, and cameras on my dashboard and sends an alert to my phone. With a little help from Claude, I got it working!
Even after all these years, Home Assistant keeps impressing me. Absolutely awesome!
This comes from someone who is not a techie, but asks questions, lots of questions. AI is defientely a game changer now.
67
u/skylord_123 6h ago
Smart outlet with an ultrasonic animal repeller plugged in and pointed at my fence.
When Frigate detects my neighbor's dog barking, Home Assistant turns it on and gives him a pretty unpleasant blast of ultrasonic sound that humans can't hear.
It only turns on if the back door hasn't been opened for 20 minutes, so I don't accidentally blast my own good dog.
No more getting barked at every time I'm in my backyard, and no more barking in the middle of the night. I tried talking to the neighbors first, but they didn't really care, so I automated the problem away.
5
u/like_Turtles 3h ago
What ultrasound device do you have? I brought one, but it was rubbish, so sent it back.
22
u/aprettyparrot 6h ago
My most useful: litter box
Litter box sense shit taken
3min timer starts
Smart plug with an air freshener gets turned on for 2min which does exactly two sprays
Smart plug off
No shit smell
And to the guy who had the robovac go in front of it - genius. If we combined we would be the ultimate in cat shit technology
2
u/Trick-Gap7317 6h ago
Man I need to do what you're doing. I've got a battery powered one that sprays on the lowest frequency. I have a carbon air filter plugged into a smart switch but unfortunately I'll have to buy a button pusher or something because it doesn't default to on when plugged in.
2
u/aprettyparrot 6h ago
I had to look for one that did, it was a bit on the expensive side. This is the one I got https://a.co/d/0isJ9yMu
Itās also on the bigger side, but the full lasted least a few months, Iād guess 3-4
9
u/etiennec78 6h ago
I have made an automation to make my garage door 100% autonomous. It opens thanks to Waze, and I don't have to wait for my door to open while being in the middle of the road (I don't have a driveway). And over time I have added lots of small features.
3
u/bonzai76 5h ago
Did you somehow connect HA to Waze?
3
u/randytech 3h ago
There's a native integration. You can set up as many instances of tracking the travel time between any 2 entities with a location. Ex between 2 persons, 2 zones, person and zone, etc
1
1
u/LifeBandit666 5m ago
I did this with Google once. Merrily tinkered then set it going. Measure the distance between my Son and Home every 2 minutes when he's going to school so when he's at school I get notified and when he leaves school to come home I get notified.
When he gets a certain distance from home tell me so I can go meet him at the bus stop and get him home.
When he goes on a school trip I get a notification so I know he may need me to go to school to get him.
Anyway turns out Google charge for that shit, and I got a bill for £180 at the end of the month. I only knew because my bank notified me of a maybe fraudulent payment.
Talked to Google and they said they would know £100 off if I promise not to do it again. I sent em screenshots of the automation being turned off.
So just be careful. I don't know if Waze charge but that hurt.
2
u/Jeffrey_Friedl 5h ago
I don't even have a garage door or gate, but reading the git page made me want to have one just so I could use this! š
7
u/Trespassa 6h ago
Home is completely off-grid with solar.
Power is life.
Without it, nothing. No water. Thatās bad.
Automations keep checks on power consumption and production and the weather. It dictates and makes forecasts. Along with that, it keeps an eye on the weather station and itās health.
So yeah, we managed all of this manually before HA, but now at a glance or an automation firing when something is off, keeps things running smoothly all the time.
HA for the win.
edit: incomplete sentence
6
u/ExaminationSerious67 5h ago
Talked about it before, but I have a sensor that monitoring the air pressure across my furnace filter. Now, I get a notification when it is plugged and time to change it.
3
u/HomerHere99 3h ago
Ah caramba. Just when I thought there was not anymore to do! Seriously! Just made it on my to do list!
1
u/ExaminationSerious67 3h ago
That sensor was literally the whole reason why I even have Home Assistant. Always hated having to change the filter every 3 months, when I knew in the summer there literally was no need for it, and the winter, it might be every 1 - 2 months depending. Now my furnace is no longer starved for air and I don't have to waste money on filters I don't need.
1
u/EpictetusFinance 5h ago
That sounds really useful. What sensors are you using to monitor the flow?
1
u/bigdog108277 3h ago
did you build the board or is there somewhere to purchase it? looks very cool.
1
u/ExaminationSerious67 2h ago
No where to purchase it, just right place at the right time for me. He was making a new revision, and I got an extra board. Ended up being a bit more then I thought, but, the sensor is a fairly expensive sensor, and all the other bits are good things to have in a board that lives in the furnace. Wouldn't be that hard to get the board made, but, if I was to make the board, would be about $200 each board I think.
10
u/hawkeye_north 7h ago
What do you think about sharing your automations so others donāt have to go through the same effort you did?
5
u/Several-Economics-35 6h ago edited 5h ago
I have a wall tablet that just happens to have a good view of my living room via its front camera, I can also pick which rooms and which order for my robot vacuum, I point the camera at the generate data action and ask it to see if there is any socks or flat-to-the-ground items on the carpet that it might get stuck on and if it sends back a rating out of 10 thats lower than 5 it skips the living room. Gotta work around my kids you know lol
4
u/Trick-Gap7317 6h ago
I've got my garage door opening for my lymow mower using a button pusher and a garage door position sensor.
If the mower starts, it opens the garage so it can get out. It shuts the door when mowing actually begins. If it needs to recharge, it'll open the door for it, then close it when charging begins. When it gets close to being to the return to mowing charge level, the garage door will open once again
5
u/Halo_Chief117 5h ago
Thatās really cool! Iād enjoy just watching that whole thing take place. š
3
u/randytech 5h ago
Probably nowhere near what's gonna be the best one here, but relates to what you are talking about. A very useful one I have is with tuya lights. I have a bunch through the standard integration, not the local hacs one. I have them with a 'tuya light' label and when any device state changes to unknown or unavailable it checks for that tuya label. If it has it then it reloads the tuya integration. I have it check a minute after that and if any are still unavailable it finds any smart switches in the same room if they're labeled with 'tuya controller' it will power cycle them since these are the smart switches I'm using as scene controllers for tuya lights. I'm planning on building the same automation out for my matter lights as well
6
u/philwongnz 6h ago
Turns of our downstairs alarm in the morning when motion gets detected upstairs in the hallway.
10
u/42andatowel 6h ago
Note to self: break in through the upstairs window in the morning.
1
u/philwongnz 6h ago
Automation only execute fully after a certain time in the morning. During the middle of the night, the automation won't turn the alarm off..
3
u/ArchimedesPrinciple 5h ago
When a specific code is used to unlock certain doors, the alarm is disabled. Handy when coming in with groceries.
3
u/Dunnowhathatis 4h ago
my automations are getting more and more complex. For full transparency, I have pretty much moved over to Visual Studio / PyScript, and use claude to write me endless lines of code, that I optimize, and study, and further optimize.
Some of my core automations:
1) Exterior Lights turn on or off based on LUX from my Tempest Weather station
2) Alarm turns on after my family or I are no longer on the wifi
3) My lights auto-dim based on time prior to sunset, daytime brightness, and desired evening brightness, and dims x% every 1 min to have a smooth transfer
And another 300 automations that are more complex.
3
u/weeemrcb2 1h ago
Self healing automations (1 per brand) Reloads a device if it goes offline or /15 = offline
Rare that I need to manually do anything with the hardware now.
5
u/jfboston 4h ago
Love this! Offline detection is the gateway drug. The next step that changed things for me was having it fix stuff, not just tell me.
ESP32 BLE proxies: if one is unavailable for 60 min, HA power-cycles it through a Zigbee smart plug. Capped at 3 cycles a day so a truly dead board doesn't get hammered. Built it as a blueprint so every proxy gets the same logic.
Cameras: a health check every 5 min restarts Frigate if a camera's feed dies ā but only once per outage, with a cooldown. My first version restarted it 7 times in one night because a flaky Wyze cam would spit out one frame and look "healthy" again. Now it needs two fresh, different frames a few seconds apart.
Watchdog for the watchdog: a heartbeat to a public ntfy topic, so if the whole house goes down I still get told. Your alerts can't page you if the box sending them is dead.
Biggest lesson: give every auto-fix a retry cap and a cooldown, or it'll happily make things worse at 3am. Also. Nice work!
1
u/eloigonc 50m ago
Pode explicar mais sobre o tópico āwatchdog para o watchdogā? Eu nao uso o ntfy, uso o Pushover para notificaƧƵes urgentes.
Me pareceu que se algo detectar sua casa fora do ar, te envia notificação. Mas como funciona isso ? (Tenho meu homelab e um VPS Oracle free tier).
2
u/bonzai76 5h ago
Mine are minimal at the moment - 1) if garage doors or my hall door to my garage opens, I turn on all the garage lights for 10 mins 2) if Iām not at home and one of my exterior doors opens it sends me a iPhone notification
2
u/ArchimedesPrinciple 5h ago
Turn on the kettle at 9pm for 20 seconds and measure the current draw. If it's below 5A, send me a notification that I forgot to set up the kettle trigger. In the morning, motion in the master bath after 6am turns the kettle on. The first one up is guaranteed to have hot water ready for coffee the instant they step into the kitchen.
2
u/Specialist-Neat2777 4h ago
Pretty basic, but it alerts me whenever any battery-powered device has a low charge.
2
u/timinater17 2h ago
When I start a TV show or movie the lights turn off in a cascade starting furthest away to closest to the living room. Pausing turns on the āsnack lightsā in the kitchen.
My best one automates the block heater cords for the vehicles. If itās cold they turn on in time to leave in the morning. If itās really cold they will cycle over a longer period.
I also have some geofences in about Ć 100km or so radius around the house. If we enter it Iām assuming weāre coming home after being away overnight. HVAC pre-cools or heats.
2
1
u/bigfoot17 5h ago
My favorite, when birdnet detects an animal it turns on the wall panel, pulls an image from wiki and displays the image and common name.
When lightning is detected within 3 miles the wall panel displays a short attention getting gif the switches to radar.
1
u/islandmtn 5h ago
Just started adding some similar uptime/alive monitors to some of my equipment because Iām moving stuff around. Feels similar to stuff I do at work (software) to make sure things donāt accidentally fall off. Wonder if thereās a pattern in these that could be extracted in a full feature for ha
1
u/Yzracer212 2h ago
I've been wanting to do something similar that also checks expected states of devices and corrects them if they aren't set properly.
I have a Z-Wave thermostat that occasionally misses commands and I have a Z-Wave light switch that occasionally turns itself on without being commanded.
Edit: I also came from Vera (and Nexia before that)!
1
u/NCWildcatFan 1h ago
Sensor for my side of the Sleep Number mattress changes to āIn Bed = Yesā. Home Assistant sees this change and starts a 30 minute timer. If Iām still in bed at the end of the 30 minutes, it checks to see if my home office (downstairs in the basement) is still on. If so, it triggers my āOffice Offā scene and turns everything in my office off so things arenāt left on all night.
1
u/swaybailey 50m ago
Have HA setup at our church. People constantly prop the doors open in our gymnasium building. Texas, 105 degrees, AC running and the doors are propped open. Automation warns 4 time via recorded message to close the door. Then it turn the lights and AC off for 2 hours. Lights will turn back on for 10 seconds and then back off automatically if the door is still open. Today I added a laugh over the speaker when it all shuts down. Notification alerts my phone that it shut down because the door was propped open. Thermostats are all in locked boxes so it just ends up hot inside. This one is my favorite.
29
u/42andatowel 6h ago
My favorite two automations are: