Configuring Shelly EM Energy Meter

Correct.

Roger. Thank you so much

I have been using a shelly em for about a year now, one of the CTs is on my main incomer, and the other is on my oven supply. Everything is working well, except that when the oven is off, rather than reporting 0W, I seem to get no data. This causes my Grafana graph of the power consumption to look weird as it never goes to zero (see attached screenshot).

I dont know if this is caused by Shelly, HA, or InfluxDB, or perhaps there’s an easy fix I can do in Grafana, but hopefully someone here can help.

Just installed EM today… When my induction hob is off it reports -5w, so I thought I’d installed the CT the wrong way around, however when I use the hob it reports positive numbers!

There doesn’t seem to be a calibration option. Does anyone know why this might be and how to fix it?

Same here, did you find a solution? I’d rather fix the hardware than write an offset with a template, if that’s even possible?

Make sure there are no other conductors near the CT. Make sure you are using the same circuit to power your EM.

It’s wired at MCU so probably is a bit cramped in there, and I’ve powered it from a random breaker that only had the one cable so that won’t be helping either then.

Can I offset the value when it reaches HA?

Sure you can use a template sensor, but it would be better to fix the hardware.

1 Like

How’s this look to you?

Hi all,

Just installed my Shelly EM and successfully linked it to HA using core integration.

As there are times where my HA installation is not powered on, will HA be able to backfill data from the device’s stored data?

No. Why won’t it be powered on?

Thanks in advance to the experts here advising on HA + Shelly EM stuff.
I live in the U.S. so my home has incoming split-phase (+110 | - 110v ) service. From what I have read, the way to get whole-house energy monitoring is to use the Shelly EM and add a 120a clamp on each of the 2 incoming wires (each phase; one of them turned around, to work with the 180degree phase difference). I will connect the ShellyEM power to one of the 110v circuits to power the device (understanding that any imbalance on the phases voltage might lead to incorrect readings…but I’ll have to live with that).

QUESTION
I have used the built-in Shelly integration to add the device to HA. Since I have two separate entities (each of the clamps on each incoming grid wire), how do I add these to the Energy configuration…since it only allows choosing one entity for Grid (just like Grid Return).

Do I need to create a Template sensor to combine these?

sensor.shelly_em_channel_1_energy
sensor.shelly_em_channel_2_energy

I checked this thread and don’t see any mention of needing to do this, so maybe I’m going down the wrong path. Thanks for the guidance!

So it turns out the Config section of Energy does allow multiple entities to be added to the “Grid consumption” and “Return to grid” sections.

I added my 2 “Energy” to the Grid consumption section and my 2 “Energy Returned” entities to the Return to grid section and it seems to be working as expected. Hopefully this helps some other folks trying to figure out how to set up Shelly EM with a U.S. home electrical panel (which has the split 2-phase setup).

Is there a way to combine the 2 phase sensors of the Shelly EM into a single “total”? I see mentions in older posts from before Energy was added to Core, but my Shelly EM does not show a total of all sensors, just total per sensor. I am using it in a North American style 2 phase install.

Try creating a template sensor like this…
Replace my sensor entities (sensor.daily_energy_peak and sensor.daily_energy_offpeak ) with yours.

  - platform: template
    sensors:
      total_energy:
        unique_id: total_energy
        friendly_name: Total Energy
        unit_of_measurement: kWh
        device_class: energy
        value_template: "{{ states('sensor.daily_energy_peak')|float + (states('sensor.daily_energy_offpeak')|float) }}"

Hi all, I’ve recently (today!) installed two Shelly EMs to give a total of three monitored circuits (three, single-phase circuits to be precise). I’m using the built-in integration and after adding them manually (the discovery does not work with authentication enabled), I can see two devices and a stack of sensors.

My problem is that I am unable to add these new devices as “grid consumption” under the energy tab in HA. There are no sensors shown, and just “no matching statistics” is given.

I believe that this should use the energy sensors from the Shellys, and under the developer tab, these are the attributes for the three energy sensors. All have data available:

state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: House Energy

state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: Car Charger Energy

state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: Garage Energy

Any idea what’s going on here? If I look in statistics_meta, it looks like it’s not calculating statistics for these sensors even though I believe it should be based on the device_class, state_class and unit_of_measure:

id;statistic_id;source;unit_of_measurement;has_mean;has_sum;name
56;sensor.car_charger_power;recorder;W;1;0;\N
57;sensor.car_charger_voltage;recorder;V;1;0;\N
58;sensor.car_charger_power_factor;recorder;%;1;0;\N
59;sensor.garage_power;recorder;W;1;0;\N
60;sensor.garage_voltage;recorder;V;1;0;\N
61;sensor.garage_power_factor;recorder;%;1;0;\N
62;sensor.house_power;recorder;W;1;0;\N
63;sensor.house_voltage;recorder;V;1;0;\N
64;sensor.house_power_factor;recorder;%;1;0;\N

Any idea what’s going on here?

They look to have the required attributes.

Check Developer Tools > Statistics for any issues you can fix.

Thanks! This pointed out what I should have spotted earlier - I had *energy* in the recorder entity exclusion from ages ago when I was having performance issues and trying to reduce the recorder DB size. It goes without saying that it doesn’t work well with this in place!

I’ve removed and been able to configure the grid consumption. It’s now waiting for some data, but looking much healthier now…

1 Like

Thanks, all working splendidly and getting some solid data back now. Added a standing charge feed using this kludge (which I have to admit is pretty damn ingenious!) and now starting to ponder where that 300w overnight usage is being used…

Very impressed with the Shelly hardware. Didn’t bother with the app - just set it up as I would a Tasmota device, using a direct wifi connection and local web interface to provision. Extremely smooth process, which bodes well for the general reliability of product. It’s taken a few months to get this up and running due to a shortage of 120A current transformers in Europe, but I’m glad I stuck it out as it’s another piece of very useful data to use, not least when comparing different energy tariffs that offer different overnight rates - I should now have accurate data to use in the calculation!

Hi Tom,

this appears to be a hardware/firmware issue in the shelly EM and is something that is widely discussed. In my case I present the results.

The problem is not only the negative value, it is that it is not measuring the correct value of standby either. In my case, two Mitsubishi ducted air conditioning machines return -5W continuously. When these machines are consuming 10W each in standby, which is 10+10+5= 25W/h less in total accumulated energy. They should be able to solve this “serious” problem. Besides, my unit measures 1.2V more than what smart meter of the electric company. and it is not possible to calibrate it.