Living aboard a sailboat with modern amenities requires careful power management. Today, we’ll explore an automation that attempts to protects your battery system. This setup demonstrates how to prioritize power usage and protect your batteries from over-discharge.
The Automation: BatteryProtect
Here’s the Home Assistant automation that manages our power systems:
alias: "[Victron] BatteryProtect"
description: Stop inverters if battery < 50% and discharging
trigger:
- platform: numeric_state
entity_id: sensor.victron_system_battery_soc
below: 50
condition:
- condition: state
entity_id: sensor.victron_system_battery_state
state: DISCHARGING
action:
- data: {}
target:
entity_id: switch.shellyuni_4417931b8251_channel_1
action: switch.turn_off
- data: {}
target:
entity_id: input_boolean.onduleur
action: input_boolean.turn_off
mode: single
How It Works
This automation does the following:
- It triggers when the battery state of charge drops below 50%.
- It checks if the battery is in a discharging state.
- If these conditions are met, it turns off two systems:
- A Shelly device controlling a smaller inverter dedicated to Starlink
- The main Victron Quattro 5000VA inverter via an input boolean
The Starlink Setup
You might wonder why we have a separate inverter for Starlink. There are several reasons for this setup:
- Power Isolation: By using a separate inverter, we can keep Starlink running even if we need to shut down the main inverter to conserve power.
- Noise Reduction: Starlink’s power requirements are relatively constant. A dedicated, smaller inverter can be more efficient and produce less electrical noise than running the large main inverter at low load.
- Flexibility: This setup allows us to prioritize internet connectivity, which can be crucial for weather updates, communication, or remote work, even when we need to conserve power elsewhere.
The Shelly Uni gives us smart control over this dedicated “Starlink inverter”, allowing us to integrate it into our home automation system.
Victron Integration
The sensors used in this automation (sensor.victron_system_battery_soc
and sensor.victron_system_battery_state
) come from our Victron system. Specifically, we’re using a Victron Color Control GX ( Now upgraded to an Ekrano ) , integrated with Home Assistant via the Victron ModbusTCP integration.
This integration allows us to pull near real-time data from our Victron install to Home Assistant.
Main Inverter Control
The input_boolean.onduleur
entity controls our main Victron Quattro 5000VA inverter. By turning this boolean off, we’re effectively shutting down the main inverter to conserve power.
Sadly it’s a hack I’ll have to explain in another post, but I’m pretty sure you also found a way to turn it off !
Customizing the Automation
While this automation works well for our setup, you might need to adjust it based on your specific equipment and needs. Consider factors like:
- The safe discharge level for your specific battery bank ( We’re on LiFe batteries )
- The power requirements of your essential systems
- Your typical usage patterns and power generation capacity
Conclusion
By separating systems like Starlink onto their own inverter and implementing smart controls, we can maintain essential services while protecting our main battery bank.
Remember, while automations like this can greatly improve your system’s efficiency and reliability, it’s crucial to understand your power system thoroughly and consult with a marine electrician when making significant changes. It works for us but might not work for you !
Happy sailing, and may your batteries always have the charge you need!