diy solar

diy solar

Home Assistant and automating based on SOC

Making automations with home assistant can be a loooong process when your testing them based on SOC. Waiting for the % to go up or down 1% to see if what you setup actually works can take FOREVER at times :)

Its still super fun though!
You could just manually run the automation or as suggested above make an template entity to use temporary instead of soc.
 
Thought I'd share another tip so to speak on using HA to automate stuff.

I found an ir blaster I had bought last year but never used. Its a Broadlink rm4 mini :


$26 so not to bad.

With this you can use it to control any infrared remote controlled device. I used it to control the window ac in the bedroom.

Normally that thing eats 18kw or more a day. I programmed home assistant to turn the temperature up to 72 at 8am everyday and then it lowers the temp to 66 at 8pm. Knocked 13kw off the daily usage. THAT'S worth doing :)
Wow that's expensive you poor American the exact same model costs $5 here
 
HA and Hubitat are both internet-less home automation solutions. I am a big Hubitat user and no internet needed to control devices that are in the home using Z-Wave, Zigbee or WiFi. But… if you wanna use voice control like The Goog nor Amazonia, then internet link required. Also things like your thermostat, add-on for a mini-split like Cielo and many other WiFi enabled devices do require talking to the mother ship over the internet. Generally if it is Z-Wave or Zigbee, no internet needed and you can use your phone or iPad on local WiFi to control it with a dashboard as I do with Hubitat. We had a 4 day power outage and my smart home was still smart once I got the generator going… minus internet needed things. HA does have a voice option, but it is immature at this point.
Think HA has local voice assist now.
 
I solved the internet issue by going with Starlink for my WiFi. All my devices are WiFi based and I have never given a second thought to “mother ship” connections. It’s an unfounded fear imho. One house in Vegas and another one in Costa Rica. I can control everything in both from anywhere’s in the world. The best investment I made was the $400 Flo water meter/valve.
Home assistant is locally based but you can still ingress anywhere in the world and if said cloud company folds or decided to change your TOS then your SOL Ill stick with my open source heavily secure system over cloud any day
 
Last edited:
Well unfounded till something goes wrong. I just got rid of StarLink as broadband came to my area which is much more stable. When there is loss of grid and internet want to make sure HA can reduce power consumption to extend battery when no one is at the cabin. Looking for worse case scenario solutions.
What power in an unoccupied cabin are you worrying about? Serious question.
 
Home assistant is locally based but you can still ingress anywhere in the world and if said cloud company folds or decided to change your TOS then your SOL Ill stick with my open source heavily secure system over cloud any day
Just what I was talking about when I said unfounded. Do you even use HA? My point is many important devices use the cloud AND work locally too. I use a lot of Shelly devices and have never had an issue locally with no internet and no grid. On generator my Shelly, Flo water meter, emporia system, etc still work perfectly fine.
 
What power in an unoccupied cabin are you worrying about? Serious question.
We have two freezers and two refrigerators with food. We stock up as the grocery store is about 1.5 hours round trip away.

I also have terrestrial based LTE MikroTik Internet backup in addition to broadband. Not as fast but has been a good backup.
 
Last edited:
Just what I was talking about when I said unfounded. Do you even use HA? My point is many important devices use the cloud AND work locally too. I use a lot of Shelly devices and have never had an issue locally with no internet and no grid. On generator my Shelly, Flo water meter, emporia system, etc still work perfectly fine.
7 years I primarily make my own devices using esphome most of my system is automated so my dashboards aren't that impressive but here's my electricity and PV one.
Screenshot_20240711-203552.png There's plenty of devices that require a cloud based API to work with HA and many that have refused API access to HA over the year's your very lucky that the devices you've bought have embraced home assistant because they gain business from it but many haven't been so fortunate insteon being a great example.
 
It does, just not very good yet.
I never bothered with it I take a very hands off approach tbh I rarely update unless it's necessary, lights are mainly automated aswell as climate I have more fun and spend far too much time building esp projects than anything else.
 
I never bothered with it I take a very hands off approach tbh I rarely update unless it's necessary, lights are mainly automated aswell as climate I have more fun and spend far too much time building esp projects than anything else.
As a good Home Automation solution should be or it won't get used or expanded. Hubitat is pretty damn easy to use and has support for any type device you might want.
 
As a good Home Automation solution should be or it won't get used or expanded. Hubitat is pretty damn easy to use and has support for any type device you might want.
It had a much bigger learning curve when I first started and all I wanted to do was water the garden and monitor CCTV all these years later the rabbit hole turned into a warren.
 
I was about to pull the trigger on the next step in my setup last night so I can run venus os to access all of the victron gear I have and after tons of research I decided to go a different route.

I will be order a new victron cerbo gx instead of the pi venus os route.

After figuring up the cost of the hardware plus cables needed and after going thru the venus os code and pi limitations it just isn't cost effective considering the hardware and plugs on the cerbo gx. Its cheaper to just buy the cerbo gx and add that to the HA setup.
 
After figuring up the cost of the hardware plus cables needed and after going thru the venus os code and pi limitations it just isn't cost effective considering the hardware and plugs on the cerbo gx. Its cheaper to just buy the cerbo gx and add that to the HA setup.

Yep. RPi solution is best for small system to monitor 1-2 devices. I used one to monitor a JBD BMS using the dbus-serialbattery driver. It was pretty cool.
 
I wish HA had a way to group automations or way to find out how they all interacted. I drew down my batteries one day because my off trigger didn’t kick in for the AC.

Right now I have things like “turn this on if…” and another for “turn this off if…”. It’s really hard to maintain.

Could be I just need to… use a template? And capture all those rules and actions in one place?
 
I wish HA had a way to group automations or way to find out how they all interacted. I drew down my batteries one day because my off trigger didn’t kick in for the AC.

Right now I have things like “turn this on if…” and another for “turn this off if…”. It’s really hard to maintain.

Could be I just need to… use a template? And capture all those rules and actions in one place?
When its important and I mean IMPORTANT I make triggers that send emails if the triggers don't work right.

Like this :

if soc < 88% and amps drawn < 7 and backup charger = off then backup charger = on

Simple enough. Battery gets low from idle drain so kick in the backup 5 amp charger to recharge it.

Lets say the above failed or didn't fire off.

Here is the monitor rule :

if soc < 87% then email "Backup charger failed to engage!"
if its REALLY important there will be another monitor rule :

rule#2
if soc < 86% then email "Backup charger failed to engage and you didn't get the 1st warning ! :)"

Make as many as makes you comfortable.

Oh and last but not least you can setup sound on machines where your at a good bit :

if soc < 80% then say "YO YOUR MURDERING YOUR DAMN BATS DUDE!!!"
 
Best one I have right now is a creepy HAL 9000 kind of voice that nags the wife where ever she is at in the house when she forgets to close the refrigerator door. I love that one.
 
I drew down my batteries one day because my off trigger didn’t kick in for the AC.
I tend to use recurring time based triggers rather than event based triggers. To me if a trigger event happens and the desired resultant action is missed for some reason (e.g. a sensor/controller happens to be offline or something when the trigger event occurs), then it'll get picked up the next time it is checked and comes back online. A lot of my automations check every minute, or every five minutes.

e.g.
Trigger: Every five minutes
Conditions: If aircon is on and SOC is below threshold
Action: Switch aircon off
 
I tend to use recurring time based triggers rather than event based triggers. To me if a trigger event happens and the desired resultant action is missed for some reason (e.g. a sensor/controller happens to be offline or something when the trigger event occurs), then it'll get picked up the next time it is checked and comes back online. A lot of my automations check every minute, or every five minutes.

e.g.
Trigger: Every five minutes
Conditions: If aircon is on and SOC is below threshold
Action: Switch aircon off
this is very smart approach - personally I will grab this idea and use in mine automations.
 
I wish HA had a way to group automations or way to find out how they all interacted. I drew down my batteries one day because my off trigger didn’t kick in for the AC.

Right now I have things like “turn this on if…” and another for “turn this off if…”. It’s really hard to maintain.

Could be I just need to… use a template? And capture all those rules and actions in one place?
what kind of installation of HA do you use?
maybe node-red could be an idea to solve some of your issues.

below a flow that based on SOC shutdowns sockets and devices:

1720740995970.png
 
I tend to use recurring time based triggers rather than event based triggers. To me if a trigger event happens and the desired resultant action is missed for some reason (e.g. a sensor/controller happens to be offline or something when the trigger event occurs), then it'll get picked up the next time it is checked and comes back online. A lot of my automations check every minute, or every five minutes.

e.g.
Trigger: Every five minutes
Conditions: If aircon is on and SOC is below threshold
Action: Switch aircon off
If your wanting to recheck a value I use state changes.

statechange.jpg


In this example when the soc changes it will check to see if its below 91. If it missed for some reason and made to 90 and didn't catch it then it will check again when it goes down to 89.

Each time the soc changes up or down it will run thru the comparison.
 

diy solar

diy solar
Back
Top