Shelly 3EM 3-phases Energy sensor

There are two shelly integrations, so far I have only used the core integration which ships with HA.

There is also a custom component, installable via HACS, which looks like it exposes total & total_returned. But doesn’t cover the three phase net metering calculations.

They are both available via coIot, I’m guessing they should be trivital to add to the core plugin.
Just wondering if the Shelly core plugin is maintained by Home Assistant team or Shelly?

Any info on the update rate of the 3em sensors using the core plugin, I read that minimum is 15s using coIot and MQTT is 1s?

Update rate seems to be variable, I think it is event driven by the Shelly device when something changes.

I have seen updates every 15 seconds, but sun set was 2 hrs ago so there hasn’t been any energy returned from my PV.

Yea for Energy returned I would expect to stop once the sun goes down.

However the Energy sensors I would expect to update inline with Power sensors but they don’t seem to. That Energy update interval of 4+ minutes is never going to be accurate for Net metering calculations.

Is it always that slow?

I can see a number of incorrect connections in your pictures. For example, the ground fault circuit interrupter is incorrectly connected. Just as “schneemensch” says, the third clamp is also incorrectly mounted. Can you arrange a picture where you see the lower connections on the bottom line?

Hi there,

where can I integrate the skript from the first post?
I cannot find the template editor in the new design :smiley:

Hi, i think you must check again…and again.
I have also at first a mismatch clamp and power cable… you can measure it, on Shelly VA and the other side to cable with clamp A, is it ok, you measure zero Voltage.

2022.02 broke my energy integration :angry: I fixed it by changeing my template sensor from state_class: measurement to state_class: total_increasing
Didn’t find any information in breaking changes of ths release :pleading_face:

I wasn’t able to bring the energy integration back to work after the upgrade. I decided to restore a full backup. :frowning:
It started to work within seconds with the old version of HA

Even changing to “total_increasing” didn’t help.

  - sensor:
    - name: "Hausanschluss"
      unique_id: energy_total
      state: >-
        {{ states('sensor.shelly3em_hausanschluss_channel_a_energy')|float + 
           states('sensor.shelly3em_hausanschluss_channel_b_energy')|float + 
           states('sensor.shelly3em_hausanschluss_channel_c_energy')|float }}
      unit_of_measurement: kWh
      device_class: energy
      state_class: measurement
      attributes:
        last_reset: "1970-01-01T00:00:00+00:00"

My power sensor was not affected… :woozy_face:
Anyone else facing similiar problems?

I think that “total_increasing” is a better choice.
You might need to wait a few hours after making the change (the statistics engine has a built-in latency).
A good post which explains the difference between “total_increasing” and “measurement” can be found here. Based on this post, it seems that “measurement” is not an option anymore, but maybe “total” can be used in a combination with “last_reset” (but I didn’t test it as we use “total_increasing”.)
(BTW, we use the sensor as it’s defined at the top of this thread, here, and it’s working well with 2022.2.2.)

1 Like

:thinking:

  - sensor:

space,space

  - sensor:
      - name: "Hausanschluss"
        unique_id: energy_total
        state: >-
          {{ states('sensor.shelly3em_hausanschluss_channel_a_energy')|float + 
             states('sensor.shelly3em_hausanschluss_channel_b_energy')|float + 
             states('sensor.shelly3em_hausanschluss_channel_c_energy')|float }}
        unit_of_measurement: kWh
        device_class: energy
        state_class: measurement
        attributes:
          last_reset: "1970-01-01T00:00:00+00:00"

I had no issue, but i used before 2020.9 and use state_class: total_increasing

Thank you very much for your advice.
Your sensor is working with 2022.2.3 without any problems.
I still have a lot to learn and read :slight_smile:

1 Like

Hi,

I have created new Net metering templates using the power sensors that update every second for best accuracy!

1 Like

Hi! I am in the same boat as you, we have a delta connection as well. Although I can count the the amperages to be correct. Shelly shows a negative power factor (-0.59) on the 3rd phase, a 0.2 on the 1st and .99 on the 2nd. Voltages are A - 123, B - 120, C - 207.

Got it powered on by connecting neutral to a ground wire.

Hope i got something wrong that somebody here can tell me, but as far as i can tell, all wires and clamps were correctly installed. A to A, B to B, C to C.

I also have solarman integration and it works perfectly with the same setup. (inverter also has to be connected to a neutral - where i used the same ground wire as shelly 3em)

1 Like

Thanks a lot for the feedback. So you are indeed getting strange readings.
According to the drawing Neutral wire seems to be optional. So strange that you had to connect it to a ground wire. I wouldn’t be surprised if that creates the problem.

The Neutral Clamp is optional, not the Neutral wire!!!

See here for more info on how to connect using the 2 watt meter method

Yes, that’s correct. Shelly won’t turn on without a neutral wire, or in my case the ground wire. Clamp readings are accurate though as far as i can tell. Will be replacing it with vue soon anyway. Hope they can fix this through software - the negative readings.

Also, here’s hoping emporia vue will cooperate with Home Assistant soon.

The Emporia vue does not support Delta!!
They have no plans to support anything other than the cloud.
I have just been down this path, the shelly is the best supported 3 phase with HA.
Use the 2 watt meter method for Delta.

Just wired up vue, it seems to be running ok (same with shelly using ground as neutral). Can’t see voltages but can see consumption in amps. Interface leaves a lot to be desired. Would be happy with a bigger web interface than the app, specially as i’m monitoring 18 clamps.

Today made a simple energy dashboard - can’t get decent metrics on HA Energy because shelly showing my consumption as a negative. I now use amperes to see usage instead of kwh - then use influxdb, maybe i can then just multiply by fixed voltage to get my total consumption.

I agree, although Emporia vue is really cheap, can measure a lot with 1 device, and easy to wire, but shelly 3em can integrate with HA, which i really need since it’s makes it easy to see and compare everything in one glance.