Your inverter's dry contact can start and stop a generator — but it can't tell you if the generator failed to start, ran out of fuel, or never shut off. In part 3 of our off-grid Home Assistant series, we show how we use Home Assistant and a Shelly dry contact relay to fully automate and safeguard our backup generator.
Home Assistant watches our battery shunt and starts the generator automatically at around 25% state of charge, stops it at 45%, and checks it's actually charging. If it doesn't start or runs out of fuel, it shuts the relay off and sends a critical alert that cuts through to our phone, even on silent in the middle of the night. There's also a maximum runtime fail-safe and an automatic 100-hour service reminder.
Chapters 0:00 Recap of the off-grid Home Assistant series 0:48 Why an inverter dry contact isn't enough 2:18 Controlling the generator with a Shelly dry contact relay 2:41 Our generator automations 3:11 Automatic start trigger (battery shunt) 3:59 Automatic shutdown 4:28 Dashboard and manual start button 5:30 Generator charging demo 6:44 No-start alarm and cut-off 7:32 Out-of-fuel / flame-out alert 8:21 Maximum runtime fail-safe 8:43 100-hour service reminder 8:59 Why this beats a built-in dry contact 9:46 Need help setting this up? 10:10 Next time: automated heating with surplus solar
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:14 Welcome to the series on Home Assistant and off-grid systems
1:51 Generator start trigger and automated control
4:56 Automated generator shutdown and system safeguards
6:43 Monitoring generator performance and real-time feedback
8:23 Critical alarms and maximum runtime failsafe
9:37 Summary and preview of upcoming video on automated home heating
This video explains how to use Home Assistant and a Shelly dry contact relay to manage an off-grid generator. While standard inverters can only start and stop a generator, Home Assistant provides advanced monitoring, safety failsafes, and alerts to ensure the system operates reliably and prevents battery failure.
Welcome back to The Thinker
and our series on Home Assistant and off-grid, using Home
Assistant to make the best to optimise
to safeguard your off-grid system.
In the first two, the first one we looked
at setting up Home Assistant basically and
building a basic dashboard.
In the second one we looked at critical alarms
that will even cut through your
to your phone if it's on silent to alert you
if your battery falls to a perilously low level.
I'm going to go to the next level.
In this video we're going to be looking
at everything generators the last line of defense
for any off-grid homestead
and we know a lot of inverters have a dry contact switch so they
will start and stop a generator according
to preset battery charge state of charge parameters.
But that's all it will do, start and stop.
Using Home Assistant, it can do a hell of a lot more,
including tells you if it runs out of fuel, for example, and stops,
which you'd never know, apart unless you looked at your app
and saw that your generator wasn't actually charging,
but you wouldn't get alerted to that fact.
And again, it wouldn't do anything about it,
it'd just carry on either trying to start it or just...
let it just sit there idle while your batteries go flat
so we're going to show you everything you
can do with Home Assistant or everything
that we've done with Home Assistant and to get the
most out
of your
generator.
So just before
we get into it
our generator
is actually
controlled by
um a Shelly dry contact relay as i said before
um the the dry contact within the
Your inverter will happily start and stop the generator
but using the Shelly that's how we
can then incorporate all these other automations and safeguards.
So these are our our automation
screen within Home Assistant.
So we've got several automations here and they control the generator,
the day-to-day, start trigger and the shutdown.
One starts it one stops it basically and the others look after
the generator plus a long-term we've got a service reminder in there
and we'll get to those in a minute but first of all the start trigger.
So this is the screen well basically Home Assistant watches
the battery via our shunt
which is far more accurate than just reading standard battery voltage
or even indeed battery's own estimated state of charge.
If the battery drops under a preset amount,
which I think in our case is about 25%,
for more than a couple of minutes to allow for a heavy load,
artificially pulling the battery down a bit, it starts the generator.
And there's a couple of actions at the bottom there
that it keeps performing the action
until it actually makes sure that it's on.
It's just a double check basically to make sure.
So yep, that's getting it all started. Starting is only half the job.
And the next one is the automated stop.
Obviously we don't want the generator running any longer than usual,
wasting fuel etc etc.
So when the batteries go up to 45% and that little automation here,
automated shutdown,
switches the generator off
and again it double checks to make sure that it keeps...
Attempting to switch it off until it has actually switched off it
It always works first time, but there's no harm in having
that safeguarding to make sure that it has stopped
So this is our dashboard that we built in the first video
I've changed it slightly i've made the generator thing
a little bit bigger in the center there
I've added a timer that shows the hours of the generators run
and i've added um a start stop button
As you can see our battery is at 52.9% there's 473 watts coming
in from the power and the main load is blah dee blah
and it's not going to drop low enough for it to start automatically
but I've added a manual start switch for the generator.
I'm going to turn it
on manually
for demonstration purposes
and so all we do is click
that to on and the generator
should start.
So we can see now that the generator's putting in 2,200, 2,300 watts.
It's a bit confused because there's solar.
We tend to run it when there's not much solar coming in.
So, preferably when it's dark,
it just makes it simpler and more efficient.
But you can see the battery's charging there.
There's 2,137 watts going into the battery.
And the generator's producing 2,300.
And we've still got PV power coming in as well,
I've had to load it up on there,
I've had to put a heater on there to sort of show the effect
but if this was zero
and that was sort of down to normal running you can see
the effect it'll still be charging the
batteries which are going up quite quickly.
Obviously the information by this gauge here
It tells us that the generator is actually running because it wouldn't
be putting 2,300, 2,400 watts in if it wasn't running.
This is what we can set our alarm and cutoff for.
If this was at naught, we'd know the generator wasn't running
and therefore there's a problem with it.
So yeah, starting the generator is easy.
It's knowing it actually works is the clever bit, which again, using
the Shelly Contact Relay linked to Home Assistant and our automations,
we can do that. If it doesn't start, we've got an alarm set up,
which is up here, no start alarm and cut off.
which will switch basically
if it doesn't start if it's not detected that
it's putting X amount of current or power into the batteries but then I
think we've got a three minute timer
on that it will actually switch the
generator off or reset set the switch off
so it doesn't keep trying to start
and then it could be out of fuel it could have a flat battery you know
several reasons for that and it will actually send
an alarm which we covered
in the last video
um straight through to my phone even if your phone's
on silent in the middle of the night
and at the same time we've got an out of fuel a flame out alert
so should the generator run out
of fuel after it started same thing applies again
um it'll detect that it's done this that it's not
stop charging the batteries when it should be and then
also to the another automation which
is the flame out of the automation alarm there again it'll switch
the generator off and and
obviously because you don't want it to keep trying
to restart it even though it probably
thinks it has started when it's run out of fuel
and for example anything else could go
wrong i don't know what
but that's probably the most likely one if it does again you'll get an
alarm through to your phone even if you're asleep
in the middle of the night if it's early morning
or whatever your generator has kicked in and stopped
and the next one we have is a maximum
The maximum runtime failsafe, that's this one here.
Should anything go wrong, the last thing you want
is your generator just running and running and running.
If for some reason it doesn't cut off, it has a maximum,
it's set to run for a maximum of an hour.
So it's not going to be running all night,
should the worst come to the worst.
The next one down there is basically just a service reminder.
It's set to record the amount of hours.
that the generator runs and alert me every 100 hours
which is a recommended service interval
for our particular generator
so um yes um an inverter with a dry contact does it doesn't do
all this it will stop it
and start it in any case our budget inverter doesn't even have um
A dry contact switch built into it anyway.
Nor can your inverters dry contact
check whether the generator is actually running
or if it should stop and run out
of fuel and stop charging your batteries.
All it can do basically switch it on and
off that's why having a separate dry contact switch
to Home Assistant is far
superior. So that's it really start,
stop and safety nets to protect your
Your generator and your...
batteries from going flat
and you wake up in the morning to dead batteries.
Thank you very much.
We've not gone into any tech in this, we've shown how to set up
screens on previous videos, it's the same principle.
Do contact us if you have any
You know.
difficulties or you need any help with this, we're happy to help.
We're probably going to set something up where we can have
a template that you can download.
to put all your own things in but we're
not sure there are many but yeah
any questions drop them in the comments
and we'll do our best to answer them
and that's it for this one i hope we've
covered everything i think we have
again if we haven't comment
and we'll we can address it again in the next one
we're going to be looking at heating i think
um all our heating in the house
is automated using all our spare solar
and dump energy we've gained kilowatt hours
and kilowatt hours of power out of the system by
automating it and you don't have
to sit there all day wondering oh i'll switch a heater on
because we've got our batteries are full
and we're just wasting solar which is every off-grid person
isn't it worst nightmare i think you want to use everything you can
so but that's it for this time
thank you so much for watching i hope you
found it helpful if you have give us a like
And we'll see you on the next one.