[server]
# Serving serial device, connected to the SolarEdge inverter.
# optional, default: /dev/ttyUSB0
device = /dev/ttyACM0
# Serving serial baud rate.
# optional, default: 9600
#baud = 9600
# Parity setting, N, E or O
# optional, default: E
#parity = E
parity = N
# Serving serial timeout, depends on line speed.
# optional, float, default: 1
#timeout = 1
# Logging level, CRITICAL, ERROR, WARNING, INFO, DEBUG
# optional, default: INFO
#log_level = INFO
# Masqueraded meters, comma separated.
# optional, default: ''
#meters = meter1, meter2
meters = meter1
# Meters defined in [server] need a config section, one per meter.
# Depending on the type of meter that is to be masqueraded, you can
# define a number of generic and type specific variables.
[meter1]
# Modbus address of the meter as defined in the SolarEdge inverter.
# This value needs to be unique.
# optional, default: 2
dst_address = 3
# Source meter type, which corresponds to a script in /devices.
# The generic.py device returns null values.
# optional, default: generic
type = mqtt
host = 192.168.xx.xx
port = 1883
willTopic = /lastwill
# Masqueraded serial number.
# Need not be correct, must be unique, must be an integer.
# optional, default: 987654
#serial_number = 987654
# Current transformer amperage rating.
# optional, default: 5
#ct_current = 50
Setup Guide for external production and mqtt source
This guide explains how to setup the project in order to simulate an SolarEdge Meter providing data for external production. The advantage is
The meter might also be used for other purpose as well, like consumption, production, import/export and so on. This guide assumes an exiting physical meter for import/export and another non SolarEdge inverter from which you would like to provide the production power so that the monitoring portal show e.g. the correct value for self consumption.
Requirements
Schematic
Steps
Download the project code
create a python virtual environment and active it
adjust the requirements.txt as some newer versions are not working anymore with the project
install the requirements
plug in your USB adapter and figure out the device, like
/dev/ttyUSB0or/dev/ttyACM0change the config file semp-rtu.conf using your adapter and mqtt
extend the wiring from your inline meter as shown in the scematic. The Waveshare adapter seems to be terminated so put it at the end of the chain. It's better to shut down your inverter during this work.
bring everything back online
start the script
python3 semp-rtu.pyconnect to your inverters wifi. If you have the solar edge app you can to the menu and choose the inverter mode.

After this you can start your browser and go to 172.16.0.1.
go to Site Communication

go to RS485-1

Add Modbus Device (Energy Meter)

you might have to change the Device ID according to you configuration and change the Meter Function to External Production. You have also to change the Meter Protocoll to WattNode

In you current Meter, change the Modbus Termination to OFF

After this when you view the status you should see

when you send Data over mqtt you should see the Total Power
send your engery data over mqtt on the configured topic. The minimal payload could look like this
{ "power_active":0, "engery_active":4864.978, "import_energy_active":4864.978 "l1_energy_active":4864.978, "l1_import_energy_active":4864.978 "l1_power_active":0 }power is the current power of all your inverters in Watt. Energy is the total produced energy over time in kWh. This value needs to be published as engery_active AND import_energy_active. Without import_energy_active you will only see the current power conditions in the app, but the consumption graphs are not effected. With import_energy_active the consumption data include your additional production and calculated self consumption is more correct. See discussion from inside: Setup Guide for external production and mqtt source #35 (comment)
when you view the meter status in the app or on your inverter you should see the injected power value. From this time on the external production is shown together with the solar edge production
all other json value you can fill out can be found here https://github.com/nmakel/solaredge_meterproxy/blob/master/devices/mqtt.py
how can now create a service for running and auto starting the meter proxy