Modbus TCP translator for Schenider Electric iEM3000 series power meter to simulate a Fronius Smart Meter for the Fronius GEN24 inverter
|
|
9 månader sedan | |
|---|---|---|
| README.md | 1 år sedan | |
| modbus-fronius-symo.c | 9 månader sedan | |
| modbus-fronius.c | 1 år sedan |
I installed a Fronius GEN24 Symo 10.0 inverter at home not a long time ago (2024), but I already had a power meter near my utility meter. My meter is a Schneider Electric iEM3155 (A9MEM3155). So I didn't want to spend 250€ more in a meter from Fronius, especially a three-phase one (as they are quite expensive).
The iEM3155 only support Modbus RTU to collect data from it, so I installed a Modbus RTU to Modbus TCP Gateway from USR (USR-DR302 : https://www.pusr.com/products/din-rail-rs485-serial-to-ethernet-converter-usr-dr302.html), as I need multiple masters to access the iEM3155 data.
Thanks to a German forum (https://www.photovoltaikforum.com/thread/185108-fronius-smart-meter-tcp-protokoll/?pageNo=1), I learned that the GEN24 accept to receive the meter data in Sunspec format.
So I made this translator. I ma not a software engineer, and my coding skills are quite low. S I basically used an example from libmodbus and made it works for my purpose.
To configure it, you just have to change few define at the begining of the file.
You will need a libmodbus to compile this software. If you are on Ubuntu or Debian, you can run sudo apt install libmodbus-dev
To compile it, I run this command:
gcc modbus-fronius.c -o modbus-fronius -I/usr/include/modbus -lmodb -lm
Then you can start the executable like this:
./modbus-fronius
Or you can make a systemd service to make it start at booting time.