Configuring Shelly EM Energy Meter

Thank you. I read at the very beginning of this thread that you ended up using total. Does it only work with rest? No MQTT? I read someone said something changed on the latest firmware.

My config at the moment is as follow:

- platform: mqtt

    name: "EM - Phase A - Total Energy"

    unique_id: shellyemTotEnergy

    value_template: "{{ value|float / 60000 }}"

    unit_of_measurement: "kWh"

    expire_after: 86400

    device_class: energy

    state_class: total_increasing

    qos: 1

    state_topic: "shellies/shellyem-XXXXXXXXXXX/emeter/0/total"

Is there any reason you are not using the core Shelly integration?

It works perfectly.

Yes, the reason is that I have another shelly device that is not supported (firmware too old apparently) and I would like to keep everything in one place.
I have even tried the shelly community addon but didn’t work very well in my case.

Also, I’m looking forward to adding other devices via WiFi in the near future, and an MQTT broker sounds just like the best solution.

That used to be the case. It has since been added to mqtt.

shellies/shellyem-<deviceid>/emeter/<i>/total total energy in Wh (accumulated in device’s non-volatile memory)

https://shelly-api-docs.shelly.cloud/gen1/#shelly-em-overview

Has anyone found any other ct clamps that work with the shelly em? I need one that can go over a 25mm cable to monitor an entire installation not just individual circuits.

Puh, a long thread tried to read and understand everything, but if I missed something just point me to the right answer.

I am living in an area (EU) where we use 3 phases 230/380V or 240V/400V
I wanted to use the 3EM but the clamps just do not fit into the distribution box. So I decided to give the EMs a try because the 50A clamps just fit into the distribution box onto the main cables.

Anyhow, is it possible with the original software to measure 2 phases (L1 and L2) with two clamps while the EM is powered using L1?
Can I use the standard integration and the energy values provided to feed the energy dashboard? Or do I need to create some template sensors like mentioned a few times in the threat?
Is the phase shift making the EM generating wrong energy data ,if powered by phase L1 but measuring L1 and L2?

I could not find any reliable information on that, if this is the wrong thread I will open a new one, just let me know. Thanks

I get an answer from Shelly

Dear Sir/Madam,

Remember that Shelly EM supports one phase measurements. Whatever is attached on it’s L channel is taking the voltage from there, the rest of the channels, the phase is shared between them, so the clamps will be using this same voltage for calculating the measurements. One phase, but two instances that are part of that same the device can measure, otherwise it will give you wrong readings.

The way you want it to measure on two phases, it will give you wrong reading on the second clamp. If possible, use two Shelly EM.

Hope this clarifies your inquiry.

Kind regards,
Shelly Support Team

1 Like

They would say that though. They are in the business of selling Shelly devices :slight_smile:

I guess it depends on how badly the two phase loads are unbalanced. A higher load on one phase will result in a greater voltage drop compared to the other.

Thats right :slight_smile:
But the Voltage drop is not the issue at my place, this is quite constant on every phase whatever load I have on it.
But the reported power with the shelly stock firmware is kinda weird. I have phase 1 used to power it, measuring phase 1 and phase 2. Phase 2 is constantly reporting negative values, which breaks the HA energy dashboard because it thinks I return power instead of consuming. And yes I have the clamp alligned the right way :wink:

Change the EM to tasmota and the measurments seem better. So I think the internal calculation is not only taking amps multiplied with voltag but also include the phase shift somehow (cosphi) which tasmota does not to - as it seems.
But I could not find any confident data.

I also have a second shelly em, connected it to phase 1 and the clamp on phase 3 - this data reported to HA was all wrong. The PF were negative values all the time. Changed the power source for the EM to phase 3, which I measure and everything looks ok.

So I need two EMs anyhow, so I will try to get a 3rd one just to see if the data from last weeks with tasmota doing 2 clamps and shelly original doing one clamp compares somehow with 3 EMs using stock firmware doing 3 phases with the same power source.

and if someone asks why I am not using a 3EM - simply because the 120A clamps are huge and do not fit into my distribution box, the 50A fit fine. And 3EM does not officially support 50A clamps - or sell. And so there would be now financial benefit if I buy them separately and tinker around.

Ah. The phases are 180° out of phase. So your voltage will be phase shifted 180° compared to the current for one phase. That’s probably going to screw up their measurements.

You will need two EMs.

This is the whole thing.
I have 2 EMs already and have seen the EM #1 on phase 1 with stock firmware measuring phase 1 and phase 2 is already making measurements appearing in HA which make no sense on phase 2.
The extreme test was using the second EM to be powered by phase 1 and measure phase 3. This was the reason to write a message to Shelly and into the forum.

In the meanwhile I changed the EM #1 to tasmota, the reading there using phase 1 as power source and measuring phase 1 and phase 2 look more what I expect. So it seems that tasmota does not really care at all or too much about phase shifting when reporting the data to home assistants energy dashboard.
Even though the data is there.

And because I already started this endeavor - and I would like to have proper data. I am waiting for my third EM. Will run all 3 of them with stock firmware and compare the data to my official electricity meter and the values I already collected the last 2 weeks using the tasmota 2 clamp and shelly 1 clamp setup.

1 Like

Oh. Sorry, I thought you were talking about 2 phase. You need to measure 3 phases (120° apart).

yup, european standards :wink:
3 phases, 240V and nowadays with all the power supplies, LEDs and so on the power calculation of modern electric devices seems to get harder and harder.
Anyhow, I try to get this running, but seems like 3 devices of EM will do it :wink: and hopefully the 3EM with 50A (smaller clamps) will get introduced :smiley:

1 Like

My shelly EM has been working fine since I setup it up using @ tom_l guide. Since the beginning of March, my nightly report log of energy usage was way off. It was giving a very low reading. It still reading low readings as of today and I thought I would see what is going on. When I log in to the shelly em browser, I am not able to view what is under the tabs boxed in red highlights. The rest I can see. I have not update the firmware for a long time. Maybe once and that was close to a year ago. I have tried logging in from my phone and used edge browser and chrome. I hope I don’t have to reset it fix this.

I’ve switched over to using the core integration, but that does require the later firmware.

Have you tried to update via the Shelly App?

I seldom, don’t, use the app. I logged in to the app and I don’t see the shelly em. arg. I would just need to ‘adde device’ from t he app??

TBH I don’t know. I never use it, I always use the device web interface. It was just another option I thought might work instead of a web browser. You could contact Shelly support.

I will wait a day or so more and maybe it will clear up. Doubt it. My shelly plug (us) web browser tabs are fine.

Update: I think I got it fixed.
Contacted support and they gave me 2 options to fix the issue and both were to connect to the app which I didn’t want to do. Also their step instructions were not clear to me.

I remembered tom posted an alternative way to update the firmware via a program called hfs.exe which I now remembered I did with one of my contact sensors, but I ended using Shelly OTA update instead.

I find it strange that the link posted the current version as v1.9.4 which was newer than v1.8.1 (what I had), but it wasn’t as you read on. When I updated it, I was able to see what is under Actions and Settings tab now and it prompted me that I have a new version. So I updated using the device browser this time. AND after I updated, it then prompted me that there is a new version. So I updated again. Done. My current latest version is:

 20220209-094734/v1.11.8-g8c7bb8d

I don’t know why, but i can’t see voltage nor returned energy, only total and current energy from both channels, can somebody help?