Shelly Pro 3EM no Energy Entity

Hello,
I replaced my Shelly 3EM with a new released Shelly Pro 3EM.
There are no entities about the energy. There are only 7 entities about firmwareupdate, temperature, reeboot, uptime…

How will I get them? Do I need to wait for an update because it is a new device?

Firmware: 20221107-134319
Hardware: gen2 (SPEM-003CEBEU)

Home Assistant 2023.1.4
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0 - latest

1 Like

I’m in the same boat as you, no energy-related entities have been natively recognized. I’ve tried enabling outbound websockets per the instructions on the official integration page as it’s a gen2 Shelly device, it started recognizing device’s custom name, but no luck on the energy entities yet. Will keep digging and report in if I find something out.

Found this from 1 week ago.

I’ve opened a new issue on GitHub.

1 Like

If you know how to deal with mqtt, integration works very good. Mqqt message is missing totals, but those can be done with Riemann sum integral sensor.

mine MQTT messages are totally missing energy values

Yes, Shelly is not sending those values in mqtt. But use can use HA helper to calculate them from power reading - Add Riemann sum integral sensor. Its pretty accurate and match values in shelly app.

Could you please share how you did this?

If you have already em3 power sensors included on HA (over mqtt), go to devices, helpers, create new helper - Riemann sum…, select one of mqtt power sensors as a source, select desired metrixc (e.g. k) and you are done.
Repeat for each phase. Then you can sum them all with " Combine the state of several sensors" sum helper.

1 Like

Hi all,

have the same problem as you.
I’m trying to integrate it via Modbus.
Please check the details from shelly here and we can get it running together.

live data:

History

BR

Mike

I just upgraded my Testsystem with latest beta and now all live parameters were displayed.

I‘ll now wait to have it in the main branch next days

Mike

1 Like

Integrated now with 2023.2.0

Thanks to the Team.
Mike

1 Like

Do you read it via ModBUS?

The Shelly integration will show it after the upgrade and reboot.
No further Action needed.

To get it into your Energy Dashboard I’ve configured the helper as mentioned above.

Will it only show up as an option if it’s via MQTT? I did the same steps (No mqtt), I can see the integration but I’m unable to add it to the energy dashboard. did I miss a step?

Same for me, this is great. However, still missing the energy values (Wh / kWh), which is something we’ll need to wait for Shelly to add via a firmware update.

Use helper Riemann sum integral sensor to calculate it. Its very accurate.

2 Likes

I set up the Riemann helper and need to monitor the deviation to my EM24 from Victron for kWh for next days.
On current power I have a offset of 5-7W average when I consume around 500W - 700W which is from my point totally fine.

Hey, thanks for the suggestion! I’ve set up Riemann sum integral sensor with Integration method set to “Trapezoidal rule”, picking up values from a template sensor that sums three phases a few days ago. It’s accurate within 2%, which is acceptable, but the problem I’m getting is that it subtracts reported negative values (energy returned to grid from solar production) from positive values (consumption). Logically this makes sense - if energy is returned, it offsets that what’s been consumed. But because consumption and return tariffs are different, I’d need to set up 2 Riemann sum integral sensors somehow with one calculating only the positive values and one - only negatives.

Any way to do this with Riemann sum integral sensor?

First you need to create 2 different power sensors in configuration.yaml and then 2 different Riemann sums. Here is my example:

  - sensor:
      - name: "Home Power From Grid"
        unique_id: "home_power_togrid"
        state: >
          {% if states('sensor.home_total_power')|float >= 0 %}
            {{ states('sensor.home_total_power') }}
          {% else %}
            0
          {% endif %}
        unit_of_measurement: "W"
        device_class: power

  - sensor:
      - name: "Home Power To Grid"
        unique_id: "home_power_fromgrid"
        state: >
          {% if states('sensor.home_total_power')|float < 0 %}
            {{ -1 * states('sensor.home_total_power')|float }}
          {% else %}
            0
          {% endif %}
        unit_of_measurement: "W"
        device_class: power

1 Like