Professional monitoring solution for Victron MPPT solar chargers with load output functionality
- Overview
- System Architecture
- Hardware Requirements
- Software Prerequisites
- Installation Guide
- Data Points & Monitoring
- Technical Specifications
- Configuration & Customization
- Monitoring & Verification
- Troubleshooting
- Use Cases
- Contributing
- License
- Acknowledgments
- Support
- Example images
- Special thanks for support
This project provides precise monitoring of the load output from Victron MPPT solar charge controllers, delivering real-time consumption data with advanced filtering and analytics. The system captures power consumption in watts and accurately calculates energy usage in kWh for both daily tracking and lifetime monitoring.
- Real-time Load Monitoring: Continuous measurement of load output power (W)
- Energy Consumption Tracking: Daily kWh accumulation with automatic midnight reset
- Lifetime Counter: Total energy consumption tracking over device lifetime
- Advanced Data Processing:
- EMA (Exponential Moving Average) smoothing for stable readings
- Outlier detection and filtering for improved accuracy
- Zero-value filtering to handle controller standby states
- Data Management:
- Manual consumption adjustment capabilities
- Backup and restore functionality for data safety
- Persistent storage across system restarts
- High Sensitivity: Optimized for small load variations and low-power applications
βββββββββββββββββββ VE.Direct βββββββββββββββββββ MQTT βββββββββββββββββββ JavaScript βββββββββββββββββββ
β β ββββββββββββΊ β β βββββββββΊ β β ββββββββββββββΊ β β
β Victron MPPT β β ESP82XX with β β ioBroker β β Load Monitor β
β Charge β β Victron2MQTT β β MQTT β β Script β
β Controller β β Firmware β β Adapter β β β
β β β β β β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
| | | |
| | | |
Load Output Serial/MQTT Bridge Message Processing Data Analytics
Measurement Data Conversion Protocol Handling & Visualization
-
Victron MPPT Solar Charge Controller
- Must have load output functionality
- Compatible models: 75/10, 75/15, 100/15, 100/20.
- VE.Direct port required
-
ESP82XX Microcontroller
- ESP8266 or ESP32 based board
- Minimum 4MB flash memory recommended
- WiFi connectivity for MQTT communication
-
VE.Direct Cable
- Connect ESP to Victron controller's VE.Direct port
Model Series | Load Output | VE.Direct | Compatible |
---|---|---|---|
MPPT 75/10 | β Yes | β Yes | β Yes |
MPPT 75/15 | β Yes | β Yes | β Yes |
MPPT 100/15 | β Yes | β Yes | β Yes |
MPPT 100/20 | β Yes | β Yes | β Yes |
MPPT 100/30 | β No | β Yes | β No |
MPPT 100/50 | β No | β Yes | β No |
-
ioBroker Installation
- Version 4.0+ recommended
- JavaScript adapter enabled
- MQTT adapter configured
-
ESP Firmware: Victron2MQTT
- Repository: softwarecrash/Victron2MQTT
- Flash this firmware to your ESP82XX device
- Configure WiFi and MQTT broker settings
-
MQTT Broker
- Local broker (Mosquitto) or cloud service
- Must be accessible by both ESP and ioBroker
-
Connect VE.Direct Cable
Victron Controller [VE.Direct] ββββ [ESP82XX]
-
Power the ESP
- Can be powered from Victron's 5V output (if available)
- Or use separate USB/DC power supply
-
Download Victron2MQTT Firmware
git clone https://github.com/softwarecrash/Victron2MQTT.git
-
Configure and Flash
- Set your WiFi credentials
- Configure MQTT broker settings
- Flash firmware to ESP82XX
-
Verify MQTT Data Stream
- Check for incoming data topics:
mqtt.0.Victron.Load_current
mqtt.0.Victron.Voltage
- Check for incoming data topics:
-
Access ioBroker Admin Interface
http://your-iobroker-ip:8081
-
Navigate to Scripts
Admin β Scripts β JavaScript
-
Create New Script
- Click "Add Script"
- Select "JavaScript" engine
- Name: "Victron Load Monitor"
-
Import Code
- Download the
.js
file from this repository - Copy entire contents into script editor
- Save script
- Download the
-
Activate Script
- Toggle switch to "ON" position
- Monitor log for initialization messages
Data Point | Type | Description | Unit | Update Rate |
---|---|---|---|---|
verbrauch_aktuell |
Number | Daily energy consumption | kWh | Real-time |
verbrauch_gesamt |
Number | Lifetime energy consumption | kWh | Real-time |
aktuelle_watt |
Number | Current load power (smoothed) | W | Every 5s |
anpassen_verbrauch_aktuell |
Number | Manual daily adjustment | kWh | On-demand |
backup_now |
Button | Trigger backup operation | - | On-demand |
restore_now |
Button | Trigger restore operation | - | On-demand |
Raw MQTT Data β Outlier Filter β EMA Smoothing β kWh Calculation β Storage
- Outlier Detection: Filters values outside reasonable ranges
- EMA Smoothing: Reduces noise using configurable alpha factor
- Energy Integration: Converts power readings to energy consumption
- Persistent Storage: Automatic backup every hour
- EMA Alpha Factor: 0.3 (configurable)
- Sampling Rate: 5-second intervals
- Integration Method: Trapezoidal rule for kWh calculation
- Reset Schedule: Daily at 00:00:00
- Backup Interval: Hourly automatic backup
- Minimum Detectable Load: 1 Watt
- Accuracy: Β±2% for loads > 10W
- Response Time: < 30 seconds for load changes
- Memory Usage: ~50KB per month of data
- CPU Usage: < 1% on typical ioBroker systems
// Configuration section in script
const CONFIG = {
emaAlpha: 0.3, // EMA smoothing factor (0.1-0.9)
updateInterval: 5000, // Update interval in ms
backupInterval: 3600000, // Backup interval in ms (1 hour)
outlierThreshold: 1000, // Max reasonable power in watts
minValidPower: 0.1 // Minimum power to consider valid
};
Ensure your ESP publishes to these exact topics:
mqtt.0.Victron.Load_current (Amperes)
mqtt.0.Victron.Voltage (Volts)
-
Start Monitoring
// Check script is running console.log(\"Script status: \", script.running);
-
Monitor Data Flow
- Verify
aktuelle_watt
updates every 5 seconds - Check
verbrauch_aktuell
increases throughout day - Confirm
verbrauch_gesamt
accumulates correctly
- Verify
-
Compare with Victron App
- Use official VictronConnect app
- Compare daily kWh values
- Document any discrepancies
-
Test Backup/Restore
- Trigger manual backup
- Restart script
- Verify data persistence
Issue | Symptoms | Solution |
---|---|---|
No MQTT data | aktuelle_watt shows 0 |
Check ESP connection, verify MQTT topics |
Erratic readings | Fluctuating values | Adjust EMA alpha factor, check cable connections |
Daily reset fails | No midnight reset | Verify system timezone, check script logs |
Backup errors | Data loss on restart | Check ioBroker permissions, verify storage path |
// Enable detailed logging
log(\"Current power: \" + getState(\"mqtt.0.Victron.Load_current\").val + \" A\");
log(\"Voltage: \" + getState(\"mqtt.0.Victron.Voltage\").val + \" V\");
log(\"Calculated watts: \" + calculated_watts);
- Off-grid Cabin Monitoring: Track daily energy consumption patterns
- RV/Motorhome Systems: Monitor 12V appliance usage
- Boat Electrical Systems: Optimize battery usage during anchoring
- Small Solar Installations: Detailed load analysis for system sizing
- Research Projects: High-resolution energy consumption studies
- Load powers: 5W to 360W
- Applications requiring high precision
- Systems with variable loads
- Long-term energy tracking needs
We welcome contributions! Areas for improvement:
- Additional data visualization options
- Support for multiple Victron devices
- Enhanced filtering algorithms
- Mobile app integration
- Historical data analysis tools
This project is licensed under the MIT License - see the LICENSE file for details.
- Victron Energy for excellent documentation and open hardware interfaces
- softwarecrash for the Victron2MQTT firmware project
- ioBroker Community for the robust IoT platform
- ESP Community for affordable, reliable hardware
For issues, questions, or contributions:
Happy Monitoring! β‘π