It was created to operate two Noah inverters, each with its own inverter. Akku1 is the System that uses Ecotracker/Shelly3em ... and Akku2 is the second system that used Energy2Shelly_ESP aka Shelly Pro 3 em
Configurable power offset to reduce reported power below a threshold.
- Zielwert (W): Standard output of Akku2. Input -0,99 to -0,01 can be used as an offset. -0,80 = 80% of real needet power.
- Timeout: If connection lost to Home Assistant or similar, the full grid reference is used
- Obere Grenze Akku1 : If Akku1 deliver more than this value, Akku2 will help
- Untere Grenze Akku1 : If Akku1 deliver lower than this value, Akku2 will help (Aditinal option: if you send Akku1=0 as power1 you can triger this always)
- Abweichung Grenze: If Akku1 is out of power or off, Akku2 only deliver if power more than this value is needet.
All feelds below are info boxes.
All settings adjustable via /offset without WiFi reset.
Your Home Automation System (FHEM/Home Assistant or maybe a Shelly script to transfer the power values to ESP) send power1 and power2 output values. Example for FHEM:
GetFileFromURL("http://192.168.xxx.xxx/setextern?power1=$pwr1&power2=$pwr2", 2)
All Text are only in German. If there is a problem, don´t use it (ok write me :-)
Tested only with ESP8266 (ESP12F)
Below this line is the original text and Instructions. Webflasher will not use my code ! Please use PlatformIO or the bin file
######################################################################################
This is a Shelly Pro 3EM Emulator running on ESP8266 or ESP32 using various input sources for power data.
This can be used for zero feed-in with Hoymiles MS-A2, Growatt NOAH/NEXA and Marstek Venus (testers needed!).
Kudos to @sdeigms excellent work at https://github.com/sdeigm/uni-meter which made this port easily possible.
SMA Multicast code is based on https://www.mikrocontroller.net/topic/559607
Compile and flash for your microcontroller using PlatformIO
Connect your ESP to your PC using USB and follow the instructions on the webflasher
3. Enter wifi and configuration data using the captive portal or by opening http://192.168.4.1/
On the captive portal you can currently set a data source for power data. The following options are available:
-
MQTT-
Server IP, port, username, password and topic
-
Power values on the MQTT topic are expected in JSON format. The are multiple fields to define available values using a JSON Path-style syntax. You can also select between monophase and triphase power data.
example (monophase profile):
- Total power JSON path ->
ENERGY.Powerfor{"ENERGY":{"Power":9.99}} - Phase 1 power JSON path -> "no definition"
- Phase 2 power JSON path -> "no definition"
- Phase 3 power JSON path -> "no definition"
- Energy from grid JSON path ->
ENERGY.Consumptionfor{"ENERGY":{"Consumption":77}} - Energy to grid JSON path ->
ENERGY.Productionfor{"ENERGY":{"Production":33}}
-> Energy2Shelly_ESP responds to{"ENERGY":{"Power": 9.99,"Consumption":77,"Production":33}}
example (triphase profile):
- Total power JSON path ->
ENERGY.Powerfor{"ENERGY":{"Power":7.3}} - Phase 1 power JSON path ->
ENERGY.Pow1for{"ENERGY":{"Pow1":98}} - Phase 2 power JSON path ->
ENERGY.Pow2for{"ENERGY":{"Pow2":196}} - Phase 3 power JSON path ->
ENERGY.Pow3for{"ENERGY":{"Pow3":294}} - Energy from grid JSON path ->
ENERGY.Consumptionfor{"ENERGY":{"Consumption":98}} - Energy to grid JSON path ->
ENERGY.Productionfor{"ENERGY":{"Production":131}}
-> Energy2Shelly_ESP responds to{"ENERGY":{"Power":7.3,"Pow1":98,"Pow2":196,"Pow3":294,"Consumption":98,"Production":131}}
- Total power JSON path ->
-
-
SMA- SMA Energy Meter or Home Manager UDP multicast data
- if you have multiple SMA energy meters you can optionally provide the serial number of the source you want to use in the configuration options
-
SHRDZM- SHRDZM smart meter interface (common in Austria) with UDP unicast data
- please enable UDP broadcasts to the IP of the ESP and port 9522 within SHRDZM
-
HTTP- a generic HTTP input
- enter a query URL in the second parameter field which delivers JSON data and define at least the JSON Path for total power.
- for full details on JSONPath configuration, check the section on MQTT above.
-
SUNSPEC- generic SUNSPEC register data polling via Modbus TCP
- you can setup host ip of Modbus device (e.g. Kostal Smart energy meter)
- Modbus TCP port (usually 502)
- Modbus Device ID of the unit ID (71 for KSEM)
-
TIBBERPULSE- Parses SML data from your Tibber Pulse IR locally using the sml_parser ESP library. This is a great option if you want to use Tibber Pulse data for zero feed-in with Hoymiles MS-A2, Growatt NOAH/NEXA, or Marstek Venus inverters/batteries.
- Follow these instructions to access your Tibber Pulse/Bridge data locally.
- Provide the
IP address / hostnameandportof the WebSocket API, plususernameandpasswordof your Tibber Bridge, in the configuration options so Energy2Shelly_ESP can connect and receive power data. - The parser automatically extracts
total power,phase powerandenergy from/to the gridfrom the WebSocket API data stream and makes it available for the Shelly Pro 3EM Emulator. - Following power meters are currently supported and implemented in the parser:
- EMH EHZB (SML message length: 248)
- eBZ DD3 (SML message length: 396)
- Support for additional power meters can be easily added. If you can provide your meter's SML sample data and message length and confirm that the parser works with your meter's data stream, then please open an issue or, even better, a PR with the details!
- Fronius:
http://IP-address/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System - Tasmota devices:
http://IP-address/cm?cmnd=status%2010 - ioBroker datapoints:
http://IP-address:8082/getBulk/smartmeter.0.1-0:1_8_0__255.value,smartmeter.0.1-0:2_8_0__255.value,smartmeter.0.1-0:16_7_0__255.value/?json
The Shelly ID defaults to the ESP's MAC address, you may change this if you want to substitute an existing uni-meter configuration without reconnecting the battery to a new shelly device.
- If you have a monophase setup, set
phase_numberto1. This asigns all power and energy data to phase 1. - If you have a triphase setup, set
phase_numberto3. This distributes power and energy data across all three phases.
Note
This option controls how energy2shelly firmware outputs energy data, it does not change the input data. So if you have a triphase setup but want to assign all data to phase 1, set phase_number to 1. The TRIPAHSE option in JSONPATH settings only controls how the firmware reads the input data, not how it outputs this data.
4. Check if your device is visible in the WLAN. http://IP-address
5. Check the current power data at http://IP-address/status
- (Optional) If you want to reset you Wifi-Configuration and/or reconfigure other settings go to
http://IP-address/resetand reconnect to the Energy2Shelly hotspot.
- ESP32-C3
- ESP32-S3
- ESP32 (ESP32-WROOM-32)
- ESP8266
First, sorry. This software is not perfect.
- Open an issue
- With helpful title - use descriptive keywords in the title and body so others can find your bug (avoiding duplicates).
- Which branch, what microcontroller, what setup
- Steps to reproduce the problem, with actual vs. expected results
- If you find a bug in our code, post the files and the lines.
- Open a PR 😻
- Explain in detail your changes
- Ask for a review
main page http://IP-address
status page http://IP-address/status
Note
Images may vary depending on the version. We always try to be up to date.





