After several weeks of research and experimentation, I successfully integrated my new Solarwatt Vision battery and inverter into my Home Assistant setup using the Modbus protocol. This integration has significantly enhanced my ability to monitor and control my home’s energy storage system, especially during off-peak hours when electricity rates are most favorable.
The Challenge
Initially, I faced challenges with the default settings, particularly with the battery’s discharge rate. The system would occasionally discharge at a higher rate than desired during the night, which wasn’t optimal for my energy-saving goals. To address this, I explored the FoxESS Modbus protocol documentation and discovered that I could adjust the maximum discharge current directly through Modbus commands.
The Solution
Here’s how I optimized the setup:
-
Configuration in Home Assistant:
- Added a
modbussection in myconfiguration.yamlto connect to the Solarwatt device. - Configured sensors to monitor battery health (
SoH), current charge/discharge rates, and maximum allowed discharge.
- Added a
-
Custom Switch Integration:
- Created a template switch to limit the maximum discharge current to 6A during off-peak hours. This ensures that the battery discharges at a controlled rate, aligning with my energy management strategy.
-
Automation:
- Set up automations to adjust the discharge limit based on time-of-use rates. For example, the discharge limit is increased during daylight hours when solar generation is highest.
Results
The integration has been a game-changer. I now have precise control over my battery’s discharge behavior, which has improved my overall energy efficiency. The system now responds predictably to my automation rules, and I can monitor all relevant metrics directly within the Home Assistant dashboard.
Lessons Learned
- Documentation is Key: Thoroughly reviewing the FoxESS Modbus protocol documentation was crucial in identifying the correct registers to target.
- Testing is Essential: Before implementing any changes, I tested each Modbus command individually to ensure it produced the desired effect without disrupting the system.
- Automation Simplifies Management: By automating the discharge settings, I save time and ensure consistent energy management throughout the day.
If you’re looking to optimize your energy storage system, I highly recommend exploring Modbus integration. It opens up a world of customization and control that can significantly enhance your home’s energy efficiency.
Happy tinkering! ![]()