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…
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.
I just got a Shelly EM and I can’t get it to work. Their instructions for “initial inclusion” aren’t terribly clear.
Wrote to Shelly two days ago, waiting for reply. Phone number for US support just has a recording that says to email them.
Can anyone help me?
I’m confident that it’s wired correctly.
The LED is blinking red.
It is not broadcasting a wifi network. I hold down the button for 10 seconds; the light starts to blink more quickly, and I let go. The EM makes a click-click-click (5 times?) sound, which I assume is a Reset indicator.
Then I see a SHELLY-xxxx wifi broadcast.
Now the instructions are unclear. Am I supposed to try to connect to this wifi network? When I try, my phone (android) says “unable to connect.”
I tried using the Shelly app instead. It asks me to tell it which SSID is my home network (I did), and then click Add Device. I do that, and it opens a black window as if searching for devices… and it finds nothing.
So I’m stumped.
Any help?
- Connect to the Shelly device’s wifi AP (SHELLY-xxxx)
- Configure the Shelly to use your wifi using a web browser (not the Shelly app).
- Connect to the Shelly via local network using the IP address and configure everything else.
So I just hooked up my Shelly EM 2, setup the IP address for my WiFi network along with the WPA2 PW, added the integration and see ch1 & ch2 Volts and Power, but no Energy for the last 3 hours Energy Dashboard either). What did I miss, also can not http into the unit via IP address. Need some help to finish up.
Edit: Went back to the Shelly EM via phone and went through the setup again. Set a ID and PW this time, set a SNTP other than time.google.com (use 0.pool.ntp.gov). Set the correct mcast (used: IP address of HA:5683). Also set the correct coils as the default was the 50 Amp set (mine are the 120 Amp set).
Save and everything started up. I could now access the Shelly EM-2 by the web using the IP address assigned to the Shelly EM-2 and also ping it now.
Now seeing data (charts and under Energy)
New HA user here. I have a ShellyEM using the default integration and it’s working fine however I would like to have the “instantaneous power” reading update more frequently (so I can better investigate the power draw of appliances). I enabled MQTT on the ShellyEM, changed the “mqtt_update_period” to 2 seconds and added a sensor to HA; it works as expected. My question is, does HA save all those messages in its database and am I thereby inflating it at a faster rate?
I have found that using the energy setup in HA more than sufficient to get the whole draw. I then have certain items on the eWeLink/Sonoff s31 smart plugs on (refrigerators(2), 1 large freezer, 1 sump pump, 4 on air circulation fans in my basement. Using the eWeLink HA integration and the AlexxIT Sonoff for HACS to get near real time current draws plus history has helped me to balance the electric system(load) in my house. So far no special coding. But will need some for the up coming Summer to pause the circulation fans during high peak demand hours. May also put the refrigerators/freezer on some sort of delay too.
Yes. You can exclude this sensor from the recorder however then you would not get history charts.
Thanks a bunch for sharing this, took me ages to find out why on earth my Shelly EM could properly read from L1 (which it was powering from) but not from L2 or L3. Not an easy find on Google.
… continuing my read, I see you still have issues. I must say that by keeping my ct measurement on the same phase as which the Shelly is powered on was a solution for my misreadings.
Just seen this thread the Rssi is a value that is already available on the dashboard, (sorry if I have repeated what someone has already stated)
Is is now. It wasn’t, four years ago when that post was written.
I will try relocating the CT tomorrow but suspect I may be suffering the same issue as others with the Shelly reporting roughly 20W below what other devices are measuring. The Shelly is wired to the same circuit as the EM115 that my GivEnergy device uses.
Hi
Propertie Total include Total_returned?
Hi! I have several Shelly devices I use for power monitoring (Pro 2PM, Pro 4PM, Pro 3EM). They’re set up with Shelly Cloud and I’m using the Shelly integration. The Pro 2PMs and 4PMs are reporting Energy properly for all circuits. The Pro 3EMs though aren’t reporting Energy.
After installing them, I changed them from Triphase to Monophase (in the ‘Device profile’ section in the Shelly app) since they’re really monitoring 3 separate circuits each, which I understand is ok. The Shelly app shows these circuits sensibly and graphs energy usage separately.
Home Assistant now shows some sensors which I think are left over from when the 3EMs were set to triphase, e.g. “phase a active power” shows “This entity is no longer being provided by the shelly integration”. That’s ok and expected.
All it shows now though is “EM0 Apparent Power”, “EM0 power” and “EM0 power factor” (and the same for EM1 and EM2), but no energy sensors.
What do I need to do to get an energy sensor for each of the circuits on the Pro 3EMs? Should I consider configuring MQTT on them? Do I need some script to calculate the energy?
Thanks! And thanks for the excellent integration
hi I have a shelly em that measures the inputs and withdrawals from the shelly network.
How can I get two graphs, but in a positive way?