Inverter: Fronius - dalathegreat/Battery-Emulator GitHub Wiki
[!CAUTION] Working with high voltage is dangerous. Always follow local laws and regulations regarding high voltage work. If you are unsure about the rules in your country, consult a licensed electrician for more information.
Fronius inverter wiki page
Types of compatible Fronius inverters
The code works with the following Fronius inverters
- Fronius Primo Gen24 Plus (all sizes)
- Fronius Symo Gen24 Plus (all sizes)
- Fronius Symo Hybrid 3.0/4.0/5.0-3-S (âšī¸ no longer available for purchase)
Software limitation
âšī¸ There is a NON-Plus variant of Gen24 available, for this you have to purchase a battery license before you can add a battery to the configuration. Contact your installer incase "Battery Operation" feature is missing!
This can also be seen from the label on the inverter, incase "Plus" is missing:
Setting up the Fronius inverter for DIY battery
You will need a technician login to the inverter to make changes to the setup. Contact your solar installer incase you don't have the technician login!
âšī¸ You will also need a Fronius Smartmeter so that the system can measure consumption and generation. The Fronius Smart Meter models "63A-3", "TS 65A-3" and "IP"(wireless) are all compatible.
To use a Fronius inverter with a used EV battery, it needs to be setup for battery operation. This is done via the "Solar.start" app, under components, add battery, and select "BYD Premium HVS/M".
After adding the battery, connect the LilyGo Modbus terminals to the inverter according to this diagram (LEAF battery example)
When the low voltage communication is handled, also connect the high voltage side (LEAF battery example)
Compiling the software for Fronius inverters
Make sure that the settings in the "USER_SETTINGS.h" file are correct. The line:
#define BYD_MODBUS //Enable this line to emulate a "BYD 11kWh HVM battery" over Modbus RTU
Needs to be uncommented for the software to emulate the BYD protocol over Modbus. Next step is then to select the battery that you intend to use, for instance if you use LEAF battery, make sure the following line is uncommented:
#define NISSAN_LEAF_BATTERY
After setting this up, flash the board!
Starting and stopping the system
When turning the system on, follow this startup procedure. Work quick, to avoid the inverter getting stuck in battery not detected mode.
Startup
- First start the Fronius inverter via AC switch
- Turn on the Solar DC switch
- Turn on the Battery DC switch
- Start the LEAF battery BMS* with 12V
- Start the LilyGo hardware with 5V
- Then either handle precharge/contactor closing manually or let the LilyGo hardware handle it automatically
Shutdown
- Turn off the LEAF BMS*, cut the 12V supply to it. Wait 60seconds
- LilyGo status LED will turn red. The Fronius inverter will within 30seconds stop using the battery.
- After 30s has passed, turn off the contactors incase the LilyGo isn't setup to automatically handle them
- Turn off the Fronius inverter via AC switch
- Turn off the Battery DC switch
- Turn off the Solar DC switch
NOTE: LEAF BMS is controlled via terminal #4 IGN in all Leaf batteries
Day to day monitoring
The performance of the system can be tracked with the app "Solar.web". This app gives direct info on current output/input, SOC% level of battery, graphs, and more. No settings can be changed via this app, but it is a great tool for visualizations and quick status checks. img
Troubleshooting
If you see Battery not detected in the Fronius apps;
Then check the following
- Make sure High Voltage is present on inverter battery input
- Try a different powersupply for the LilyGo. Powering it via USB from a computer can cause noise on the signal output. Powerbank or phone charger might have cleaner voltage output. If you see strange modbus errors, your powersupply might be noisy
- Make sure the Battery-Emulator has a good modbus connection to the Inverter
- Use shielded wires for a stable connection
- If you see "ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error" in the USB output on the LilyGo, it is an indication that wiring is not perfect