SMA Energy Meter

Post Reply
Zuikkis
Posts: 27
Joined: Monday 20 February 2017 18:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

SMA Energy Meter

Post by Zuikkis » Monday 20 February 2017 21:48

Hi,

I have SMA Energy Meter, like this one:

http://www.sma.de/en/products/monitorin ... meter.html

This is very good meter as it measures current direction as well. I can see how much surplus my solar plant has. Also it measures active, reactive and complex power separately!

Energy meter sends it's measurement in UDP multicast, every 20 seconds. I have used a python script I found from the internet:

https://github.com/datenschuft/SMA-EM

It's quite straight forward to use. It just loops and prints every packet received. This kind of output:

Code: Select all

----sum----
P: regard:2748W 12806kWh surplus:0W 42kWh
S: regard:2781VA 12936kVAh surplus:0VA 47VAh
Q: cap 426var 141kvarh ind 0var 1141kvarh
cos phi:0°
----L1----
P: regard:2223W 51007016kWh surplus:0W 51000008kWh
S: regard:2269VA 51007164kVAh surplus:0VA 51000011kVAh
Q: cap 453var 51000090kvarh ind 0var 51000907kvarh
U: 230V thd:10% cos phi:0°
----L2----
P: regard:15W 51001605kWh surplus:0W 51000061kWh
S: regard:36VA 51001675kVAh surplus:0VA 51000069kVAh
Q: cap 0var 51000003kvarh ind 33var 51000173kvarh
U: 236V thd:0% cos phi:0°
----L3----
P: regard:510W 51004240kWh surplus:0W 51000028kWh
S: regard:510VA 51004286kVAh surplus:0VA 51000030kVAh
Q: cap 5var 51000130kvarh ind 0var 51000142kvarh
U: 235V thd:2% cos phi:1°
It would be easy to send this data to Domoticz somehow, right?

Except, I'm clueless how to do it. :) I created dummy "electric" sensors in Domoticz.

I can update them with curl, but is there some cleaner approach?

pascalspits
Posts: 84
Joined: Tuesday 24 February 2015 17:14
Target OS: Raspberry Pi
Domoticz version:
Location: Belgium
Contact:

Re: SMA Energy Meter

Post by pascalspits » Thursday 06 April 2017 23:52

Hi, did you already get this up and running ?
I'm also looking into energy meters at the moment, so I'm very interested how it works out ...
RasPi2 - Aeotec Z-Stick S2 - Fibaro multisensors - Fibaro RGBW dimmers - ETH08 relais boards

Zuikkis
Posts: 27
Joined: Monday 20 February 2017 18:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: SMA Energy Meter

Post by Zuikkis » Friday 07 April 2017 7:43

Yes.. I made a small C program, that listens for the UDP messages from the energy meter, and then updates the values to Domoticz once per minute. It also controls the house heating based on surplus energy and temperature sensors..

It's not very clean code so I haven't released it to the public. Most of the config is done in the C source, so needs recompile if something is changed. :)

If you only need energy meter values, it's quite easy to modify the above python script so it sends the values to domoticz with curl..

SMA energy meter actually sends data once per second, not 20 seconds as I incorrectly said above. :) It's too fast to update Domoticz that often.

mzy2240
Posts: 3
Joined: Wednesday 27 June 2018 19:11
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: SMA Energy Meter

Post by mzy2240 » Wednesday 27 June 2018 19:12

check this out for a neat solution:
viewtopic.php?t=15131

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests