SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ingo1977
New user
Posts: 5
Joined: 16 Feb 2018, 09:27

SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#1 Post by Ingo1977 » 19 Jul 2018, 15:18

Hallo,

habe folgendes Szenario aber bisher keine Lösung.

Ich habe folgenden IR Lesekopf: http://wiki.volkszaehler.org/hardware/c ... b-Lesekopf
Dieser besteht aus 4 Leitungen (+3,3V/+5V, TXD, RXD, GND)

Wie bekomme ich die Daten mittels ESP8266/ESPEasy (oder Tasmota) zum ioBroker geliefert und dort auch graphisch ausgewertet?
Evtl. via Serial Server? Wenn ja, an welchen PINs muss der Leser angeschlossen werden?

Die Beschreibung auf der Volkszähler Seite mittels ESPEasy ist sehr dürftig.

Kann mir jemand helfen? Eine Kollege von mir sucht ebenfalls nach einer Lösung...

Danke im Voraus,
Ingo

moebius
Normal user
Posts: 35
Joined: 22 May 2017, 19:36

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#2 Post by moebius » 20 Jul 2018, 08:55

You could use an orange pi zero.

It's only 12$ (with a nice case).

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#3 Post by Metatron » 23 Mar 2021, 19:38

Hallo,

an die Serielle Schnittstelle des ESP8266 anschließen geht.
Noch Interesse? dann gehe ich ins Detail.

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#4 Post by quorle » 25 Mar 2021, 16:16

@metatron
Hallo, ich hätte Interesse. Suche gerade eine Lösung um meinen Zähler mit ESPeasy auszulesen.
Würde gerne über die Rot markierte Schnittstelle alle Daten auslesen und per MQTT weiter reichen.
0CE86BA0-4CE0-4578-9DD9-C47C1D0E24D2.jpeg
0CE86BA0-4CE0-4578-9DD9-C47C1D0E24D2.jpeg (210.14 KiB) Viewed 11509 times
Last edited by quorle on 25 Mar 2021, 16:58, edited 2 times in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#5 Post by TD-er » 25 Mar 2021, 16:45

What information is present on the red marked points?
It looks like a IR LED + photo transistor.
I would expect the blue marked point to be easier as it is just flashing once per N Wh. (I assume 1000 imp/kWh, so 1 flash per Wh)

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#6 Post by quorle » 25 Mar 2021, 16:54

TD-er wrote: 25 Mar 2021, 16:45 What information is present on the red marked points?
It looks like a IR LED + photo transistor.
I would expect the blue marked point to be easier as it is just flashing once per N Wh. (I assume 1000 imp/kWh, so 1 flash per Wh)
in the appendix you can see what the red marked interface delivers. And since I also have a PV system and want to log all voltages and powers, the blue marked interface is unfortunately no longer sufficient.
427ECE7B-20EE-4746-A3FF-0010F3859A4A.jpeg
427ECE7B-20EE-4746-A3FF-0010F3859A4A.jpeg (1.05 MiB) Viewed 11510 times

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#7 Post by Metatron » 27 Mar 2021, 10:47

Hello,

ok, I know this meter. It works with push SML messages, that's fine.
With iobroker, you could easily use ser2net within ESPEasy, and pipe the serial messages into iobroker.
This is no MQTT, but works without problems.
It you want to use MQTT, you could use SMLReader from github. But this is no ESPEasy obviously.
I sell a plug and play solution on ebay, but I am also happy to help you. No problem.
I check, I might have a manual for this.

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#8 Post by Metatron » 27 Mar 2021, 14:38

First of all, the wiring:

For ESPEasy/ser2net, you need to connect to the Tx/Rx Pins, GND to GND and the supply to either 3.3V or 5V. All these Pins exist for the ESP, look carefully, you should see them. They are marked.
This is it. If you don't get a signal, cross over Rx and Tx.
Because you will not need to send anything, and iobroker won't send anything anyway, as far as I know, you don't even have to connect anything to the ESP Tx pin.

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#9 Post by Metatron » 27 Mar 2021, 16:42

The configuration in ESPEasy looks like this:

Image

In Detail:

Image

In ioBroker, you use the smartmeter adapter and configure it like this:

Image

The parameters might vary slightly, this worked for me with my EMH smartmeter.
The TCP address is of the ESP8266, of course.
Does this help?

Regards, Metatron

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#10 Post by quorle » 02 Apr 2021, 11:51

hello, i have set everything as you wrote. EsSPeasy says "connected", but the Smart Meter adapter shows "not connected". I don't see any status in the ESPeasy log at ser2net either.

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#11 Post by Metatron » 02 Apr 2021, 20:17

Hello,

checking the information you posted above, you need to set the stop bit to "1".
Does this help?

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#12 Post by quorle » 02 Apr 2021, 21:33

Hello, I did. Unfortunately no change. There is also no data record from the read head in the ESPeasy log. And the connection does not turn green with the ioBroker adapter either. Do you have to adjust something in ESPeasy? Except for the settings you described above?

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#13 Post by Metatron » 02 Apr 2021, 23:08

You have tried both? Connecting tx or rx to rx of the esp?
I will check mine within the next days.
Does your meter send signals? Have you checked with a digital camera?

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#14 Post by quorle » 04 Apr 2021, 11:59

Hello, yes I tried everything. RX and TX swapped times. The meter sends (checked with camera and pin entered on meter). Nothing is displayed in the ESPeasy's LOG.

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#15 Post by Metatron » 07 Apr 2021, 14:30

Hello,

just to let you know, it seems, that he has solved his issue.
With the right config and wiring, all seems to work.
I see no difference to what I advised above.
I know from the iobroker forum.

Regards, Metatron

quorle
New user
Posts: 9
Joined: 14 Sep 2018, 19:58

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#16 Post by quorle » 09 Apr 2021, 13:54

Hello, I checked everything again. However, I have now noticed in the LOG that ESPeasy has a memory overflow if there is too much data. That's why everything always hangs up.

User avatar
Metatron
Normal user
Posts: 39
Joined: 20 Mar 2021, 09:38

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#17 Post by Metatron » 09 Apr 2021, 14:08

You could try esplink, instead.
Same Hardware setting, a bit tedious to flash.

Or change wiring, use SMLReader. I have the confirmation of someone with the same meter, that it works without issues.

User avatar
Regolsis
Normal user
Posts: 41
Joined: 08 Oct 2022, 13:07

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#18 Post by Regolsis » 14 Oct 2022, 12:03

Hi,

I built this simple smartmeter reader:
https://www.mwinklerblog.de/smarthome/a ... r-digital/

With telnet I get the raw data, but when I tried to get these serial2net data with openHAB I missed, because their binding (https://www.openhab.org/addons/bindings/smartmeter/) only supports real com-ports (I ran openHAB on Windows). So what could I do to get the serial stream from my ESPeasy device to openHAB?

I also tried ioBroker, but this system is a nightmare under Windows and I do not really want to use this. Any other ideas? Thanks

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#19 Post by TD-er » 14 Oct 2022, 13:31

Hmm the SerialProxy could maybe of use here, as it allows to receive an ASCII string (terminated with a newline) and send it to the first enabled MQTT controller. (which must be OpenHAB/HomeAssistant MQTT controller)
But I doubt it will be useful here as you mention the controller only allows for real serial ports.

I do have enough ideas of how it could be done, but all require new features/plugins for ESPEasy, so right now I don't think it can be done using ESPEasy. (e.g. making Ser2Net also working in "reverse" so you can actually make a WiFi serial bridge)

Maybe implementing to decode the protocol in an ESPEasy plugin would be the best fix?

User avatar
Regolsis
Normal user
Posts: 41
Joined: 08 Oct 2022, 13:07

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#20 Post by Regolsis » 14 Oct 2022, 13:39

TD-er wrote: 14 Oct 2022, 13:31 Maybe implementing to decode the protocol in an ESPEasy plugin would be the best fix?
So that the ESP can send the decrypted data by MQTT? Would be an option. But how? :(

Seems that someone did this in Tasmota:
https://forum.creationx.de/forum/index. ... #post14823

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#21 Post by TD-er » 14 Oct 2022, 13:44

Well it shouldn't really be rocket science to decode these.
Wouldn't be surprised if someone already made a library for it to make it easier to implement.

User avatar
Regolsis
Normal user
Posts: 41
Joined: 08 Oct 2022, 13:07

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#22 Post by Regolsis » 14 Oct 2022, 13:50

TD-er wrote: 14 Oct 2022, 13:44 Well it shouldn't really be rocket science to decode these.
Wouldn't be surprised if someone already made a library for it to make it easier to implement.
Something like this?
https://github.com/mruettgers/SMLReader

I am very new to ESPeasy, so I don't have any idea how to build a plugin or how to get this functionality inside ESPeasy.

User avatar
Regolsis
Normal user
Posts: 41
Joined: 08 Oct 2022, 13:07

Re: SML-Stromzähler (Volkszähler) Datenübermittlung mittels ESP8266

#23 Post by Regolsis » 14 Oct 2022, 19:21

I now use https://github.com/esplesekopf/Tasmota which is described here https://tasmota.github.io/docs/Smart-Meter-Interface/

Works fine:

photo_2022-10-14_19-13-02.jpg
photo_2022-10-14_19-13-02.jpg (31.62 KiB) Viewed 4397 times
photo_2022-10-14_19-17-03.jpg
photo_2022-10-14_19-17-03.jpg (78.5 KiB) Viewed 4397 times

But my other sensors will be ESPeasy :ugeek:

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests