SMA Energy Meter in Home Assistant

Hi everyone,

I just stumbled open this add on here and it is working quite fine for me however the values differ from the ones I see on the online portal or the sunny app - especially the counter values (pconsume and psupply) and is there a way to also show the solar values? When looking at OpenWB or EVCC - which both read the SMA EM (and I think the inverter itself?) as well - they tell me the grid import (=solar) / export (= consumption - solar).

You need to consider that the values you receive from the SMA Integration in Homeassistant are live data. The values you get from the SMA Portal are delayed. Somethimes more than 30 minutes up to 60 minutes. If you compare the daily values from last day you see that it matches perfectly to the values the Energy Integration in home assistent shows you.

1 Like

the SMA EnergyMeter Integration cannot provide the Solar data. This is a different device (your inverter). I used the modbus integration to get the values but changed to NodeRed where I wrote my own code. It is all documented here in the forum.

Makes sense for the portal but OpenWB or evcc do also directly communicate with the EM2.0 (and the Inverter), so how come there is this difference?

Can you guide me towards your code? That sounds very helpful as I would prefer to grab the data I need with node red.

The node red way to get data from EnergyManager is here:SMA Energy Meter in Home Assistant - #73 by chris_ka
but I would recommend the newly available Add-In for Homemanager doing this perfectly: see here: SMA Energy Meter in Home Assistant - #120 by kellerza

The way to pulling data from the inverter via homeassistant is here: MODBUS data from SMA Inverter - #22 by chris_ka

and here with node red: Tutorial to read Modbus Registers in NodeRed and sent to MQTT

Hi,
I have energy meter 2.0 and I was able to get basic data from it. How do I get daily/monthly production of solarpanels numbers?

Simo

The Energy Meter is just that - a meter for inbound and outbound power including current values and the metered values. Solar production is coming from the inverter. Usually you need a to poll this via modbus. there are numerous integrations including a node-red implementation here in the forum.

Dear @Nicko1,

I was trying to reproduce your Energy setup and I currently don’t know what value/sensor I should use for the solar panels entry where your screenshot shows total_yield. I already have my pv data setup using modbus in addition to the smart meter. I just don’t get what value is needed here. Is it total_yield per day? Or does total_yield mean the overall yield of all time? Additionally, I’m unable to directly use my values because they are not setup as “statistics” how can I do that?

Sorry for all the questions. Home Assistant beginner here.

Hi Mate
My total_yield is “All time”
Im not sure about statistics sorry.
You might have to create a templet to covert the statistic value into a entity.
All HA needs is a value that increases over time. The energy dash board does all the resets each day for you.
Have a look at this link @kellerza provided.

Hi, I went through all the steps above, but now the Auto discover doesn’t present me the SMA EM integration.
I know my mqtt is working correctly and I have modified user name and password in the SMA Add-on configuration tab.
Any idea or suggestion would be highly appreciated?
Thank you very much in advance

Hi Mate did it work at all, its been a long time since your last post.

Can you access the SMA-EM through the web-UI
I would test that first Make sure it on the network

Hi there, yes it has been quite a long time, but in the meanwhile I tried a few times without any luck.
I can access the meter through the browser as in the picture you posted.
I followed all the steps, but it doesn’t automatically present me the SMA EM integration and so I’m stuck.
Thank you again for your time

Hi Jack can you screen shot the Add-on log


Do you mean this one?

Hi Jack this is my screen shot looks like the your add-on is not discovering the energy meter.
Ive added my config as well for you to check.

I have the same problem like @Jack97_13 . SMA EM is available via Webinterface. The Add-on log looks like Jacks one. Can anybody help please?

Can you send us a pic or info on your MQTT setup please

Ok Ive been reading a post about how the SMA-EM data is included in the SMA inverter integration.
Do you @wunni have The sma inverter integration
Screen Shot 2022-02-17 at 4.39.28 pm

ill take a screen shot of the entities


Maybe try that