Protect your off-grid solar battery bank from unexpected drainage!
In this episode of our Smart Off-Grid Home series, we show you how to set up two critical alarms in Home Assistant using Solar Assistant data. These automated alerts are designed to pierce through your phone's silent mode to wake you up in the middle of the night if something goes desperately wrong.
What you’ll learn in this video:
How to import and use our critical phone alarm blueprint script in Home Assistant via YAML.
Setting up a Battery State of Charge (SoC) threshold alarm to trigger when your battery drops below 25%.
Preventing "artificial" drops caused by heavy appliance inrush loads using automated delays.
Creating an overnight excessive power drain alert to catch hidden leaks (like a faulty water pump or plumbing issue running continuously between 11 PM and 6 AM).
How to test your scripts locally without relying on external cloud networks.
This is part of our ongoing Smart Off-Grid Home series, where we're using Home Assistant and Solar Assistant to automate and manage our off-grid solar system.
COMING UP:
We'll be looking at generator automation, including automatic generator start and stop, generator alarms and what happens if the generator runs out of fuel.
Further episodes will cover power dumping, load shedding and automatically using surplus solar energy for things such as hot water, heating and air conditioning.
If you're running an off-grid solar system, building a solar battery backup system, or interested in Home Assistant automation for off-grid living, subscribe and follow along with the series.
Thanks for watching and for supporting the channel!
We would love you to join us on our journey, living off grid, renovating our 150 year old abandoned Finca in southern Spain, using traditional building techniques and living a more self sufficient life with our rescue animals. Please consider subscribing to the channel to receive notifications of our future videos - best of all, it's free!
0:00 Critical alarms to save your battery
2:19 Battery state of charge alarm setup
4:49 Testing battery state of charge alarm and automation
8:39 Overnight power drain alarm introduction
10:21 Setting up overnight power drain alarm
12:40 Testing overnight power drain alarm and finalizing automation
14:20 Upcoming topics preview
This video provides a step-by-step guide on setting up critical battery alarms for off-grid solar systems using Home Assistant and Solar Assistant. The goal is to protect battery health and detect unforeseen power drains, such as water leaks, by sending high-priority alerts to a smartphone that bypass silent mode.
Welcome back to the finger and our smart off-grid home series. This week we're going to be looking
at critical alarms to save your battery. They're probably the two most important alarms every
off-grid personal solar should have. One is to protect the state of our batteries and another
is to alert us of unforeseen hidden drains that might drain our batteries while we're asleep
that we don't know about. For example we've had a couple of cases of water leaks while the pump's
running and you wake up in the morning with a flat battery and probably a burnt out water pump as
well. So we're going to deal with that. We said last week that we're going to look at other alarms
particularly particularly generators as well but I'm going to do a whole video on that. It's better
to keep that separate I think. So today two critical alarms that will wake you up in the
Last week we looked at integrating solar assistant with home assistant to feed us all the
information we need and the videos up there. I've got a playlist going for this if you want to watch
it because it is quite long and if you want us to break anything down into shorter videos like this
please let me know. So last week yes we did that and we also showed you how to build a basic dashboard
you can make that out on there and we can monitor all the aspects of our battery power,
state of charge, power going in or out of the battery, PV power being generated, solar from the
panels, the main load being used by the house and what the generator is putting in. That's our basic
instant live super reliable because it doesn't rely on any cloud apps or anything like that.
It's all on our home internet and basically yeah it's all in-house there's no internet required at
all. It's not a home internet, it's our home network and there's no internet required. This
won't fail you in case of an outage or anything like that. So last week we looked at a critical
alarm critical battery state of charge alarm and I'm going to run through it again just so it's
because it was sort of at the end of a very long video. So let's get into it. So there's our
dashboard that we built you can see the gauges updating live, constantly changing, it's all
instant and super accurate. So if we want to set up an alert I think we're going to do an alert.
The first thing we need to do for alerts is to make sure we've got a critical alarm
setup that we can send to punch to our phone even if the phone's on silent
etc etc in the middle of the night. You know I put mine on silent every night
so all we do we go down to the left here to settings click on settings go to automations
and scenes there we want to go to scripts now we've got a there's our critical alarm script
blueprint that we set up for you guys there is a link in the description where you can actually
download and download this open this file copy and paste it what you need to do we'll just go
back to the beginning if you go down there click on create script it'll give you an option to create
a new script there when you when this new screen comes up just click on the the little dots there
the three dots and then change down to here to edit in yaml then delete whatever's in there
and then paste that is the script you don't need to do anything with that the only thing that might
happen is this this has got a seven second loop on it because my my alarm only sounds very quick
very quickly for sort of four or five seconds you want to make sure it'll wake you up this
will keep playing it'll reset itself every seven seconds so even if yours plays for longer it
doesn't matter no then just click save I've already got it obviously and so I don't need
to do it again I'll just cancel that but yeah just click save and there we go so there is your
blueprint so with that done and we're going to create our first alarm go to settings what we
want to do is an alarm for battery state of charge we're going to do it for 25% so if the battery at
any point falls below 25% state of charge and it'll send an alarm to your phone you can obviously
set that figure to whatever you want whatever you're comfortable with whatever works for you
so what we do we go back to settings their automations and scenes and then there's our
these are all our automations and many of them we're going to go to create automation which is
there up to create a new automation which is there and we want to add a trigger obviously to set the
alarm off if you do a search at the top state of charge it could be different on
your system but if you're using a solar system that's what you'll get and it doesn't matter
which of these you use batteries or totals we're just going to pick on totals then we want battery
level threshold cross because we want the alarm to sound when the battery goes below 25% so we're
going to add that one and then we get a new options box pops up it's there we want to change
that to below because we want it to be below 25% which we just type in there you can see percent
at the side here and then we're going to put a delay on that because some inverters or some
things and will will pull up an artificial number for the battery state of charge we're using a
shunt and which gives us 100% accurate but we're just going to put a delay of say five minutes
on that let's type that in so it if it does artificially pull it down a heavy load or
something it's got chance to stop and recover like a pump starting for example will draw a heavy
inrush load so once we've added our trigger we don't need any more conditions we're just going
to add an action that is to run script so if you just type run there we want script run
critical phone alarm blueprint one make sure it's script run and not turn off or turn on it needs
to run it so when that's in there run critical phone alarm blueprint that's a bit of a tom
twister isn't it add a title and then we'll put in there battery state of charge i've already got
some pre-completed here below 25% a message whatever you want in there again and we're
doing this because we've got several alarms we want to know which one has actually triggered
battery state of charge low with an exclamation mark then just click save name it alarm or
whatever you want and battery state of charge below 25% so when you look at your screen you
know exactly what it is and then save it that's it so what we're going to do now is test that so
we go back to settings automations and scenes there's our alarm there um battery state of
charge below 25% go to the three dots at the right hand side there and click run actions
and you can hear straight away i've got an alert on my phone
there it is that will come through the phone is actually on silent as well
and then just hit mute and it stops so that's that one done and the second one we're going to
look at is um a power a power drain overnight as i said before we've actually had two instances of
this personally ourselves we had um one where where we had a toilet valve fill valve that was
faulty it wasn't stopping the water and it was permanently running through the overflow
it ran the pump for four hours hammered our batteries big time um the other the second one
was a friend of ours they had a water leak and which ran it just ran all night for hours and
i was their water pump um it actually burnt out the water pump and then we stopped it from using
any more power but it triggered the generator to start and everything really bad so we don't want
that to happen to you so we're going to show you how to set up an alert for a power drain like that
so we go back to our automation screen create automation create a new automation
we need to add a trigger what we want is a battery drain so the the sensor we want is battery
only enough there it is battery um we've got state of charge there which we don't want we
got voltage there which we don't want it's just battery this is your actual battery power
and we want numeric state cross threshold there um we're gonna go for below we ours is personally
set to um if it's drawing more than 400 watts on the battery because normally overnight it
draws between 150 and 250 with the occasional spike up to 400 or 500 600 when we flush the
loo for example in the middle of the night so we're going to set this to below minus 400
so that will trigger when um it's pulling more than 400 watts out of the battery
oops then we come down um we're also going to put a time in there a duration of 10 minutes
because as i say if you go to the loo in the middle of the night um your pump's going to be
over 400 but not for 10 minutes um or hopefully not for 10 minutes just to refill your loo
so um we're going to put a 10 minute delay in there then we also want another a condition
because we don't want this set for during the day because we often use more than that in the day
it's only at night we want it to wake us up if there's a hidden problem
so we want time in there click on time um then we want after say um 2300 which is 11 pm
before say 0600 don't know what time you get up i'll go to bed but you can obviously fix them in
and on days of the week oh actually if we leave that blank it'll do it every day anyway
it's only if you want the non-specific days so then we can go back to our action so we've got
the battery across below 400 minus 400 watts for 10 minutes is the trigger it's got to be
conditional the time is after 2300 or before 6 00 a.m and then we add the action which is again
run critical phone script alarm title overnight um i'll just spell that festive power drain
that will call that alarm as well in fact no we won't do that in a minute not for that bit
and the message is the battery my easy typing and filming is draining
excessively or whatever you want to call it for that and that's it just save again
call your automation alarm again alarm overnight power drain and just click save
again go back to the screen alarm um overnight power drain if you want to test it just go to
there click on run actions and listen for the phone there it is so there we go simple as that
hey don't forget the link to the critical battery script will be in the in the description below
um so i hope you found that all right we found that um understandable a lot simpler um just to
do it in small bite-sized pieces we're going to be looking at generators next um generator auto
starts auto stops alarms so if your generator runs out of fuel and things like that and this
is where to start auto start generator um then we're going to be looking further on in the series
we call it a series we're going to be looking at power dumping um when your batteries are full the
sun's still shining your panels are pulling in tons and tons of power or you that you're not
using it's just a waste that drives us crazy um power shedding when your batteries are starting
to get pulled down because you've got whatever loads on them um various things like that to
make your solar setup absolutely perfect automation is automation so these will all
be automated as i should have said to you get when you've got excessive power you can channel
it automatically through home assistant into heating hot water running heaters running aircon
and whatever you want basically so loads coming up and so i'm going to end this video there thank
you so much for watching i hope it was clear um give us a like if you've enjoyed it um
yes if you have any questions anything you'd like to see covered um stick it down in the comments
below we'll do what we can so yeah thanks very much thanks for everyone who supported the channel
and we'll see you on the next one