A Home Assistant integration that connects to Victron Energy devices using MQTT, providing real-time monitoring of your Victron system including inverters, solar chargers, and battery systems.
- 🔌 Auto-discovery of Victron devices via SSDP (Cerbo GX, etc)
- 📊 Comprehensive sensor data including:
- Battery metrics (voltage, current, power, temperature, state of charge)
- Solar/PV metrics (voltage, current, power, yield)
- Grid metrics (voltage, current, power, energy)
- Inverter metrics (input/output power, frequency)
- EV Charger metrics
- 🕹️ Two-way control over your Victron installation:
- inverter mode (On, Off, Charger Only, Inverter Only)
- EV Charger (On, Off, current limit)
- charger current limit
- ⚡ Real-time updates via MQTT
- 🔒 Optional SSL and authentication support
- 🌐 Multi-phase system support
- All current supported entities are auto-documented here
- Make sure you have HACS installed
- Go to HACS > Integrations
- Click the "+" button and search for "Victron MQTT"
- Click "Download"
- Restart Home Assistant
- Copy the
custom_components/victron-mqtt
folder to your Home Assistant'scustom_components
directory - Restart Home Assistant
If you prefer not to use HACS due to bandwidth constraints, especially in marine environments, you can use the provided update script to manually update the integration after it was installed for the first time.
-
Open the HA Terminal window.
-
For the first time only, you need to give the script execution permissions:
chmod +x /config/custom_components/victron_mqtt/update_integration.sh
-
Run the script using a terminal:
/config/custom_components/victron_mqtt/update_integration.sh
-
Optionally, use the
--restart
flag to restart Home Assistant after the update:/config/custom_components/victron_mqtt/update_integration.sh --restart
This will validate the Home Assistant configuration and issue a restart command if the configuration is valid.
-
Restart Home Assistant manually if you did not use the
--restart
flag.
This script will fetch the latest version of the integration directly from the repository and replace the existing files.
The integration can be configured in three ways:
- Your Victron device should be automatically discovered if it has MQTT enabled
- Go to Settings > Devices & Services
- Look for the "Victron MQTT Integration" in the discovered section
- Follow the configuration flow
- Go to Settings > Devices & Services
- Click "Add Integration"
- Search for "Victron MQTT Integration"
- Enter the following details:
- Host: Your Victron device's hostname or IP (default: venus.local)
- Port: MQTT port (default: 1883)
- Username: (optional)
- Password: (optional)
- SSL: Enable/disable SSL connection
Some users prefer to reduce the direct load on their Victron server and use bridge from the Venus device to a local mosquitto server running as add-on on the HAOS.
- Install the Mosquitto broker add-on from the Home Assistant Add-on Store
- Configure a user and password for the MQTT broker in the add-on configuration
-
Configure the Mosquitto Bridge: Edit the Mosquitto configuration file at
/share/mosquitto/mosquitto.conf
(accessible via File Editor add-on or SSH) and add:connection victron address <YOUR_VENUS_IP>:1883 topic N/# in 0 # TO CHANGE settings via MQTT, one has to write to the "W/" topic!! topic W/# out 0 topic R/# out 0 start_type automatic allow_anonymous true
Replace
<YOUR_VENUS_IP>
with your Victron device's IP address. -
Restart the Mosquitto Add-on to apply the bridge configuration
-
Configure the Integration: When setting up the Victron MQTT Integration:
- Host:
core-mosquitto
(the internal hostname for the HA MQTT broker) - Port:
1883
- Username: Your MQTT broker username
- Password: Your MQTT broker password
- SSL: Disable (internal connection doesn't require SSL)
- Host:
- Reduces load on the Venus MQTT server
- Provides a single MQTT broker for all your Home Assistant MQTT devices
- Allows for better network traffic management
If you want to help the community and add more entities, please take a look at the module which drives this integration. It is very simple to extend this integration. I wrote a document about it.
-
Cannot Connect
- Verify your Victron device is powered on and connected to your network
- Check that the hostname/IP is correct.
- Ensure that MQTT is enabled on your Victron device.
- On your HA device, open Terminal window using one of the addons and run the following command:
nc -zv <Cerbo IP address> <Cerbo mqtt port, usually 8883>
if you are getting timeout or other errors there is real connectivity issue and it is not integration issue.
- in case venus OS is rooted (i.e. with ssh access enabled):
- use port 8883
- enable SSL/TLS
- use user root
- use password that you have defined to protect the instance
- Alternative: Consider using the bridged configuration (Method 3) if you're experiencing frequent connectivity issues or want to reduce load on your Venus device.
-
Authentication Failed
- Double-check the username and password if authentication is enabled.
- Note: These are device credentials, not VRM portal credentials.
-
No Sensors Appear
- Verify that MQTT topics are being published by your Victron device.
- Check the Home Assistant logs for any error messages.
- For bugs and feature requests, open an issue on GitHub
- For questions and discussion, use the Home Assistant community forums
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Thanks to Johan du Plessis johan@epicwin.co.za, who submitted the original code this custom integration is based on. He later abandoned it, and I revived it here.
- Thanks to Victron Energy for their excellent hardware and documentation.