Connecting MT681 (energy meeter from enbw) to fhem with a esp8266

Begonnen von immi, 30 April 2016, 11:56:40

Vorheriges Thema - Nächstes Thema

immi

MT681 has an optical interface in the front, transmitting SML telegrams every 500..1000 ms.
A smal circuit board can be fixed with a ring magnet.
You can buy a professional board from Udo or DIY
http://wiki.volkszaehler.org/_media/hardware/controllers/ir_schreib_lesekopf_ttl_neu_v1_stromlaufplan.png

I chosed DIY for 2 boards ( I have 2 meeters).
You only need the receiving part (top part of the image). I changed the components like this.

  • fototransistor BPW40 (it has 2 pins like a diode)
  • 2 resistors 30kohm
  • 1 npn transistor bc546
  • 1 or 2 capacitor 1µF; the 1µF capacitor is very important.

  • You can (should) skip the schmitt trigger. The slow signal from MT681 is clean enough for the esp8266.
For power supply, I use the 3.3V of the esp8266.

The esp8266 has only one native hardware serial port available, which can be used with ser2net.
If you have 2 meeters, you need a simulated software serial port. I uploaded the sketch here.
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=1087#p5915
pinout of esp8266
for _P020_Ser2Net.ino use IO01(D10) and IO03(D9)
for my _P030_swser.ino use IO14(D5) and IO12(D6)

Assuming your esp82266 has 10.0.2.22 as IP, test with
nc 10.0.2.22 1234 | hexdump -C

start fhem with
define PowerMeter OBIS 10.0.2.22:1234
attr PowerMeter event-aggregator power:120:linear:mean,total_consumption:300:none:v,total_consumption_Ch1:300:none:v
attr PowerMeter event-on-change-reading .*
define PowerMeterDouble OBIS 10.0.2.22:4321
attr PowerMeterDouble event-aggregator power:120:linear:mean,total_consumption:300:none:v,total_consumption_Ch1:300:none:v,total_consumption_Ch2:300:none:v
attr PowerMeterDouble event-on-change-reading .*

immi

sprudelverduenner

Hallo immi,

ich habe den gleichen Zähler und würde gerne in FHEM die Daten meines eHZ mit einem ESP8266-01 übertragen.
Ich habe die Schaltung nach dem Plan und Deinen aufgeführten Bauteilen aufgebaut.
Den ESP mit ESPEASY geflasht und in FHEM ein Device angelegt.

Bei mir scheint es allerdings noch nicht zu laufen. Kannst Du mir Tipps für eine Fehlersuche geben?
Im Anhang mal meine Konfiguration von ESPEASY und FHEM.
Ich werde mir morgen auch nochmal meine Platine anschauen, ob ich dort evt, in der Hardware einen Fehler verbaut habe...

Würdest Du bitte mal über meine Konfiguration drüber schauen, ob das alles stimmig ist.

Vielen Dank vorab.

LG, Sprudelverduenner
FHEM @ RaspberryPi 3, HMLAN, HMUART + HMRS485, Homematic, ESPEasy @ Sonoff / Shelly / ESP8266, ZigBee @ CC2531
Echo Dot, Dreambox, Yamaha MusicCast, Logitech Hub, LW-12, LD382
FRITZ!Box 7590 AX, Mesh @ FRITZ!Repeater 2400, FRITZ!Fon, iPhone 13, iPad Air 5, AppleWatch 8

immi

Zitat von: sprudelverduenner am 16 Februar 2017, 22:30:16
Bei mir scheint es allerdings noch nicht zu laufen. Kannst Du mir Tipps für eine Fehlersuche geben?
as I wrote above start by testing if something comes out of your esp8266
in your case execute from command line
nc 192.168.1.102 23 | hexdump -C

sprudelverduenner

Danke für Deine Antwort,

es läuft bei mir nachdem ich den Fototransistor an die richtige Stelle des Stromzählers positioniert habe.

LG, Sprudelverduenner


Thank you for answering,

from now it's working. I choose the wrong position for the ir-receiver.

Best regards, Sprudelverduenner
FHEM @ RaspberryPi 3, HMLAN, HMUART + HMRS485, Homematic, ESPEasy @ Sonoff / Shelly / ESP8266, ZigBee @ CC2531
Echo Dot, Dreambox, Yamaha MusicCast, Logitech Hub, LW-12, LD382
FRITZ!Box 7590 AX, Mesh @ FRITZ!Repeater 2400, FRITZ!Fon, iPhone 13, iPad Air 5, AppleWatch 8

immi

Hi Sprudelverduenner
maybe you want to upload a picture of your circuit and/or explain in german what you have done
immi

cs-online

Hallo Sprudelverdünner,

ich habe einen Lesekopf an RX vom ESP angeschlossen und die R120 vom Espeasy installiert. Habe in der Config unter Devices das so eingerichtet, wie in Deinem Screenshot. Mein ESP hat die IP 192.168.2.61. Im FHEM habe ich das Device so definiert:


define Stronzaehler SML 192.168.2.61 23


und er legt dann auch ein Device an. Dieses bleibt aber bei INITIALIZE stehen.

Wie hast Du denn die anderen Reiter im Espeasy configuriert ? Was hast Du denn als Protocol ausgewählt ? Unter Controler habe ich mal angenommen,daß der FHEM-Raspi mit gemeint ist oder ? Ich habe leider keine brauchbare Anleitung für das ESPeasy gefunden :-(

Kannst Du mir da ein wenig Schützenhilfe geben ?

Grüße

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

cs-online

Ha, ich hab's... wenn man den ersten Post liest, dann klappt das auch. Das Device ist ein OBIS, keine SML... :-) Cool wäre das, wenn man neben dem Zählerstand und der aktuellen Last auch noch andere schöne Werte auslesen könnte, die der Zähler so noch mit ausgibt... aber das wäre Luxis, erstmal bin ich bunnig zufrieden, Danke Euch allen !!!

Grüße

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 12 März 2017, 17:16:54Cool wäre das, wenn man neben dem Zählerstand und der aktuellen Last auch noch andere schöne Werte auslesen könnte, die der Zähler so noch mit ausgibt... aber das wäre Luxis, erstmal bin ich bunnig zufrieden, Danke Euch allen !!!
Ich bekomme auch der aktuellen Last

cs-online

Hallo Immi,

ja die aktuelle Last und den Zählerstand bekomme ich. Aber der Zähler kann ja noch viel mehr, z.B. Wochen- oder Monatsverbrauch, aktuelle Last auf den Phasen 1,2 und 3 u.s.w. Aber erstmal ist das super, daß die beiden Werte schon mal gehen, das ist ein riesen Schritt voran :-)

Grüße

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 12 März 2017, 21:01:01
ja die aktuelle Last und den Zählerstand bekomme ich. Aber der Zähler kann ja noch viel mehr, z.B. Wochen- oder Monatsverbrauch, aktuelle Last auf den Phasen 1,2 und 3 u.s.w. Aber erstmal ist das super, daß die beiden Werte schon mal gehen, das ist ein riesen Schritt voran :-)
HI Christian
I do not need "Wochen- oder Monatsverbrauch" because I just compute it in fhem.
But the power on the different phases could be interesting.
The OBIS module from Icinger is decoding all SML-info, which my meeter MT681 sends automatically.
Do you know how to get the further information? do you have to actively query the meeter?
immi

p.s. the esp8266 is almost always idle; therefore I use it to read 2 meeters and measure temperature humidity at the same time

p.s.2 sometimes you will lose the wifi-connection between the esp8266 and fhem. In this case fhem needs up to 1h before realizing it and reconnect. There is some potential for improvement :)

cs-online

Hi Immi,

how do you compute the values for day, week or month in FHEM ? And how can you read 2 meters with an ESP8266 ? I have ESPeasy with Serial_Server on it and the IR-Reader on RX. I tried to write a program in LUA on ESP for the meter to calculate the values I needed, but I had problems with the RX-connector to access with LUA...

Now I read in FHEM with OBIS-modul and from time to time it hangs up... Therefor I have a timer (AT), which reads the readingAge and if it's greater then 300 I let it write the defmod again, it seems, the device starts up again... with the same timer, every minute, it writes the values "power" and "total_consumption" to a dummy on which a log runs. So I get the values in realtime and a log every 60s, on which the charts run...

greetings Christian

FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 18 März 2017, 14:19:09
Hi Immi,
how do you compute the values for day, week or month in FHEM ?
Hi christian
https://wiki.fhem.de/wiki/Statistics

Zitat
And how can you read 2 meters with an ESP8266 ?
please read first post above
If you have 2 meeters, you need a simulated software serial port. I uploaded the sketch here.
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=1087#p5915
pinout of esp8266
for _P020_Ser2Net.ino use IO01(D10) and IO03(D9)
for my _P030_swser.ino use IO14(D5) and IO12(D6)


Zitat
Now I read in FHEM with OBIS-modul and from time to time it hangs up...
It does not hang-up; fhem loses the connection and does not realize it for more than 60 min.
The OBIS module has to be improved.

immi

immi

Hi Christian
today I went further with the connection host issue in OBIS module.

I send to the esp8266 a "new-line-feed" every 60 second. The esp8266 does not care in normal case.
If there is no connection, fhem understand very fast and reestablishes the connection immediately.

just make the following change at about line 140
change

"Unknown"       =>      ["",                        -1,    ""],
"SML"             =>      ["",                        -1,    ""],

with

"Unknown"       =>      ["/?!".chr(13).chr(10),    60,    chr(6)."0".$hash->{helper}{SPEED}."0".chr(13).chr(10)],
"SML"             =>      ["/?!".chr(13).chr(10),    60,    chr(6)."0".$hash->{helper}{SPEED}."0".chr(13).chr(10)],


I would appreciate a feedback if it fixes also your issue
immi

cs-online

Hi Immi,

I'll try as fast as I can, but it can take a few days...

Meanwhile I createt a timer (AT) which writes power, total_consumption and the age of the reading into a Dummy and if the Age is greater then 60 (s) then it sends a "modify Stromzaehler....." to FHEM and FHEM starts the connection again and I get within seconds new values from the meter... Since then I don't have the problem, but it "modifies" a few time a day...

But maybe, your idea is better. I'll try and will tell you afterwards,

thank you for your help,

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

AlfAb

Hallo immi, cs_online,
ich schreibe in deutsch da ich in englisch schreiben nicht kann, lesen geht aber. Ich hoffe das ist ok.
Ich habe auch einen Mt681 mit  esp8266 (D1-Mini) und FHEM auf einem RPi3. Ich verwende eine ser2net-Anwendung von Daniel Parnell (https://github.com/dparnell/esp8266-ser2net) und die Konfiguration, die immi im Beitrag "OBIS_V2-mit SML-Unterstützung" vorgeschalgen hat. Ich lese alle Werte, die mein MT681 liefert (consumption total/HT/NT/, power total/Phase1..3).
Bei mir treten die Verbindungsverluste ebenfalls auf, auch nachdem ich von immi vorgeschalgenen Intervall-Timer mit 30 s im OBIS-Modul eingetragen habe.
Ich bin TCP-Laie, meinem Sohn ist aufgefallen, dass FHEM auch nach Verbindungsverlust weiter versucht die Nachricht (2F3F210D0A) zu senden.
Im Log-File "SW: 2F3F210d0A" durch DevIo-Modul und "WROTE /?!" durch Obis-Modul. Selbst " syswrite($hash->{TCPDev}, $msg);" (aufgerufen von DevIo_SimpleWrite() liefert als Returncode 5 (5 Bytes gesendet), (wird aber von den FHEM-Modulen nicht verwendet).
"tcptrack" auf dem RPi "sieht" aber keine TCP-Nachricht. Wie auch, ohne Verbindung.
Mein Sohn stellte fest, dass erst ein Read, initiiert durch wen/was weiß ich nicht, dazu führt, dass FHEM den Verbindungsverlust erkennt (und sofort einen reconnect durchführt).
Mir fehlen die Kenntnisse um in diesen Ebenen etwas zu finden. Vielleicht helfen diese Infos euch eine Lösung zu finden, dass FHEM den Verbindungsverlust sofort bemerkt wie dies in FHEM-WEB ja perfekt fu nktioniert.
Gruß
Alfons

immi

Hi Alfons & Christian
probiere folgende version zu verwenden mit folgende file (nicht vergessen fhem neue zu starten

define PowerMeter OBIS 10.0.2.22:1234
attr PowerMeter event-aggregator power:120:linear:mean,total_consumption:300:none:v,total_consumption_Ch1:300:none:v
attr PowerMeter event-on-change-reading .*


die verbindungsprobleme werden behoben: d.h. fhem wird "reconnect" zeigen in log

cs-online

Hallo Alfons,

wie bekommst Du denn denn die anderen Werte ? Ich bekomme nur power und total_consumption, hätte aber auch gerne die Werte wie Spannung und Phasen u.s.w.

Grüße Christian

Hi Immi,

I'll try your file and will Report, if the issue is fixed with it

Greetings Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

cs-online

Hi Immi,

if I replace the original-file with yours and send "shutdown restart" to FHEM, I don't get new states, all values freeze. if I copy the old one and restart FHEM, all values run again.... I'm sorry.... my trick with the timer with "defmod..." the OBIS-device runs fine ;-)

Greetings Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

AlfAb

Hallo Christian,
ich wohne im Saarland und der dortige Versorger (Energis/VSE) stellt auch die Leistungswerte (gesamt, L1, L2, L2) bereit. Mein Sohn wohnt in der Nähe von Stuttgart (Versorger EnBw) erhält mit gleichem EHZ nur die aktuelle Leistung, nicht aber die Phasen getrennt. Es liegt also am Versorger, welche Daten der Kunde an der optischen Schnittstelle erhält.
Mein MT681 liefert also (in binärer Form) auch die OBIS-Werte: 0100100700FF (P-total), 0100240700FF (P-L1), 0100380700FF (P-L2) und 01004C0700FF (P-L3). Um zu sehen was der MT681 liefert habe ich den Lesekopf über einen Ser-USB-Wandler (CP2104) am PC angeschlossen und mit HTERM ausgelesen. Dann mit Speicherformat "hex" das Logging gespeichert. Die Datei ist dann mit normalem Editor (npp) lesbar.
Gruß
Alfons

immi

Zitat von: cs-online am 24 März 2017, 21:31:45
Hi Immi,
if I replace the original-file with yours and send "shutdown restart" to FHEM, I don't get new states, all values freeze. if I copy the old one and restart FHEM, all values run again.... I'm sorry.... my trick with the timer with "defmod..." the OBIS-device runs fine ;-)
Greetings Christian
Hi Christian,
may I ask you to check again, because it is not plausible.
the only difference in my file is that fhem is sending a carriage return to the meeter every 60 or 120 seconds. Your wrote that you have not connected the tx (like i did), so on the worst  case it should not have any influence.
Can you also please post the config you use with my file?
thanks immi

ps could be that you have not waited enough. With my file you have a standard refresh interval of 120s
you can shorten it with the attribute intervall; e.g. for having a refreshperiod of 15 seconds
attr yourmeetername interval 15

AlfAb

Hallo immi,
der Intervall-Timer bringt tatsächlich nichts. Ich habe das interval auf 15 s gesetzt. Nach "lost connection" dauert es immer ca. 17 Minuten bis FHEM (DevIo-Obis) "lost connection" erkennt und dann sofort ein reconnect durchführt. icinger hat im Obis-Modul den Eintrag bei für den Timer bei "SML" eingetragen. Aber, wie schon gesagt, FHEM erkennt bei einem "write" nicht ob ein Server connected ist.

Hallo Christian,
ich würde gerne Deine Lösung bei mir einbauen, bin aber tatsächlich ein newbie was die Nutzung von FHEM-Funktionen betrifft. Könntest Du mir Deine Lösung zur Verfügung stellen. Gerne auch per E-Mail, wenn solche Sachen im Forum stören.

Grüße
Alfons

immi

Zitat von: AlfAb am 27 März 2017, 23:25:48
Hallo immi,
der Intervall-Timer bringt tatsächlich nichts.
Hi Alfons
have you used my file with intervall 30?
if it is the case, and still you do not see improvements, you should work on your esp8266 firmware. For me works very well with espeasy.
immi

cs-online

Hallo Alfons,

hier meine Timerdefinition, direkt aus der fhem.cfg:

define Stromwerte_Timer at +*00:01:00 {\

my $d3 = ReadingsAge("Stromzaehler","power",0);;\
if ($d3 >= 60) {fhem ("defmod Stromzaehler OBIS 192.168.2.61:23");;;;\
my $d4 = ReadingsVal("Stromzaehler","Anzahl_Neustarts",0);;\
$d4 = $d4 + 1;;\
fhem ("setreading Stromzaehler Anzahl_Neustarts $d4");;;;\
fhem ("setreading Stromzaehler Neustart ".TimeNow());;;;\
}\
#fhem ("set Stromdummy_HH Datenalter: $d3 s");;
}


Da wird also einmal pro Minute drauf geschaut, ob das Alter vom Reading >60s ist, dann wird über defmod die Defnition des OBIS "verändert", tatsächlich wieder mit den selben Parametern gespeichert, dann läuft der sofort wieder los. Wenn Du die # vor dem Stromdummy entfernst, dann wird, bei vorhandenem Stromdummy das Datenalter geschrieben, darauf habe ich ein LOG mit einem Chart

Damit habe ich dann die Werte in Echtzeit und nach spätestens einer Minute auch wieder aktuelle Werte.

@Immi: Is there another way to restart OBIS by Perl ?

Grüße

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 29 März 2017, 08:51:57
@Immi: Is there another way to restart OBIS by Perl ?
yes there are other ways e.g. with doif... but not much better than yours.

Please consider that restarting OBIS every 60 seconds is a pragmatic solution, but not a good one.
The real solution is to restart the IP-connection in obis if lost. The OBIS module should control the connection to the esp8266
Stefan (aka icinger)  has implemented a first fix.
In oder to use it,

update
shutdown restart
define Stromzaehler OBIS 192.168.2.61:23 SML
attr  Stromzaehler interval 15

immi

cs-online

Hi Immi,

I don't restart OBIS every 60s, only if the readingAge is greater than 60s. Restarts about 4-6 times a day. Without "interval" I get power and total_consumption in realtime, Switch something on and I see what power it has... that's nice

greetings Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 29 März 2017, 19:27:52
Without "interval" I get power and total_consumption in realtime, Switch something on and I see what power it has... that's nice
for this feature set interval to 1s when you want to monitor in real time.
For the rest of the year
- I use interval 30s
- I store the avarage of power over 2 min.
- I store the energy every 5 min.
- I make some statistics on energy (month, year...)


define PowerMeter OBIS 10.0.2.2:1234 SML
attr PowerMeter event-aggregator power:120:linear:mean,total_consumption:300:none:v,total_consumption_Ch1:300:none:v
attr PowerMeter event-on-change-reading .*
attr PowerMeter interval 30
define PowerMeterLOG FileLog /opt/fhem/log/powerSingle-%Y-%m.log PowerMeter
attr PowerMeterLOG room energy
define SVG_PowerMeter SVG PowerMeterLOG:SVG_PowerMeterLOG_1:CURRENT
attr SVG_PowerMeter  title "TodayEnergy ".ceil($data{sum1}).", MaxPower $data{max1}, CurrentPower $data{currval1}"


define PowerMeterDouble OBIS 10.0.2.2:4321 SML
attr PowerMeterDouble event-aggregator power:120:linear:mean,total_consumption:300:none:v,total_consumption_Ch1:300:none:v,total_consumption_Ch2:300:none:v
attr PowerMeterDouble event-on-change-reading .*
attr PowerMeter interval 30
define PowerMeterDoubleLOG FileLog /opt/fhem/log/powerDouble-%Y-%m.log PowerMeterDouble

define PowerStats statistics PowerM.*
attr deltaReadings total_consumption,total_consumption_Ch1,total_consumption_Ch2
attr ignoreDefaultAssignments 1

cs-online

Hi Immi,

what happens when running the command "get <devicename> update" within the OBIS-Device ? would that be an alternate to the modify command ?
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

immi

Zitat von: cs-online am 01 April 2017, 23:35:47
Hi Immi,
what happens when running the command "get <devicename> update" within the OBIS-Device ? would that be an alternate to the modify command ?
no, it does not reopen the interface; some work should be done

cs-online

FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

jack_1

Danke, hat mir sehr geholfen. :) Funktioniert auch mit Easymeter Q3D.

masl

Ich versuche gerade meinen ISKRA Stromzähler ans FHEM zu bringen.
Jetzt habe ich schon tausend sachen gelesen...
Problem ist dass der Raspi zu weit entfernt ist. Hierfür habe ich einen ESP8266 besorgt. Wollte diesen auf Tasmita flashen Allerdings gibt es die Vorlage der SML wohl nicht mehr.

Mit einem Phototransitor wäre ein Auslesen wohl möglich.
Hat hier irgendwer eine Anleitung oder könnte mir helfen dies einzusetzen?

sprudelverduenner

Hi masl

Der 1. Link im ersten Post zeigt den Schaltplan.
Das ganze habe ich an einem ESP-01 dran.
Der ESP ist mit ESPEASY geflasht.

Im 2. Post - der ist zufälligerweise von mir - ist die Konfiguration von ESPEASY zu sehen.

Die ganze Sache läuft bei mir seit knapp 3 Jahren stabil.

FHEM @ RaspberryPi 3, HMLAN, HMUART + HMRS485, Homematic, ESPEasy @ Sonoff / Shelly / ESP8266, ZigBee @ CC2531
Echo Dot, Dreambox, Yamaha MusicCast, Logitech Hub, LW-12, LD382
FRITZ!Box 7590 AX, Mesh @ FRITZ!Repeater 2400, FRITZ!Fon, iPhone 13, iPad Air 5, AppleWatch 8

cs-online

Ich habe den TTL-IR-Kopf von UDOs Volkszähler über RX/TX an dem ESP8266 und dann ESPLink drauf, weil ESPEasy da nicht stabil lief (ist schon etwas her, ist mit den neuen Versionen evtl. stabiler). Das läuft sehr stabil. Wichtig ist die richtigen Werte (Baud und Co) einzustellen. Dann mit dem OBIS-Modul

define Stromzaehler OBIS <IP des ESP>:23

in FHEM eingebunden

Grüße

Christian
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

Maista

#33
Hallo zusammen,

Alternativ gibt es das
http://forum.creationx.de/forum/index.php?thread/1095-d0-z%C3%A4hler-sml-auslesen-mit-tasmota/&postID=19422#post19422

Sourcen mit SML-Treiber (xsns_53_sml.ino):
https://github.com/gemu2015/Sonoff-Tasmota

Doku wie man es hin bekommt (Doku SML-Treiber WGS Zähler.pdf) :)
http://forum.creationx.de/forum/index.php?thread/1095-d0-z%C3%A4hler-sml-auslesen-mit-tasmota/&postID=26926#post26926

Compiliert & geflasht hab ich das schon mal, aber wie immer mangelt es an Zeit, Lust und Motivation  :o

Gruss Gerd

Heiner

Hi,

I have a similar problem.

I have a Energy Meter 6EHZ0300E which as per manual send with:
9600 bd, Datenbit = 7, Parität = gerade, Stoppbits = 1, Flusssteuerung = kein.
Im Fall des SML-Datentelegramms ist zur Interpretation der Daten ein Parser erforderlich und
die Einstellung ist: 9600 bd, Datenbit = 8, Parität = kein, Stoppbits = 1, Flusssteuerung = kein.

Then I use a IR TTL Platine from Hichi at a ESP 8266 (NodeMcu).

Based on a Ardunio Testscript I can recieve Data from the Meter .

Now I load ESPEasy on the ESP and configure with Serial Server and without FHEM HTTP Controller, but othing seems to be recieved by ESP Easy. There is nothing in the log neither  I recive anything based on nc ip:port |hexdump -c

What could the probem be?

The logical next and final step would be to add into fhem the define Stromzaehler obis ip:port SML line to recieve the data. This one shows opened but receive nothing.

I am not married to espEasy , but like to keep the IR TTL and my ESP8266 as devices to transmit the serial signal into fhem.

Can you help me?

Many Thanks already

Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Zitat von: Heiner am 19 Juli 2021, 17:48:15
Based on a Ardunio Testscript I can recieve Data from the Meter .
Now I load ESPEasy on the ESP and configure with Serial Server and without FHEM HTTP Controller, but othing seems to be recieved by ESP Easy. There is nothing in the log neither  I recive anything based on nc ip:port |hexdump -c
Hi Heiner
first hint:
no ":" --> nc ip port |hexdump -c

second hint:
my 2 meeters are on an esp8266 running stable since years (including a temp/humidity). Nevertheless I will change to esp32: I want 2 meters and the thz on the same device.
I helped them in april 2021 to change ESPEasy ser2net in order to support for 3 ser2net connections on esp32.
Have you compiled yourself the espeasy from github and when?

third hint:
are you sure you have the right pin number in espeasy?
immi

Heiner

Hi Immi, good to hear form you.

Sorry you are right the command was in my note written worng I mean "nc ip port |hexdump"

I would have a esp32 for test as well available but prefer to have a usecase for the simpler 8266.

I did take a compiled Version and flashed it. The Version and flashing is now about 1 week ago.
ESP Easy is showing this:
   Firmware
   Build:⋄   20113 - Mega
   System Libraries:⋄   ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
   Git Build:⋄   
   Plugin Count:⋄   47 [Normal]
   Build Origin:   Travis
   Build Time:⋄   May 3 2021 11:31:57
   Binary Filename:⋄   ESP_Easy_mega_20210503_normal_ESP8266_4M1M
   Build Platform:⋄   Linux-5.4.0-54-generic-x86_64-with-glibc2.29
   Git HEAD:⋄   mega-20210503_aacae49

I tried various PINs exchanged  RX and TX.

I would expect via the webaccess to ESPEasy to see in the log something - but here nothing from the IR-TTL comes in.
MQTT for the 8266 Systeminfo runs perfect.

For my Serial signal I use just the Devices Configuration of a Serial Communication Server.
In there i tried HW Serial 0, 0 swap, 1 and SoftwareSerial
I tried with and without Controller : Fhem HTTP

to be sure the 8266 and the IR TTL and the Meter is working I used a simple Arduino script with SoftwareSerial which showed the reciving characters on the serial connection to the laptop. which means as well that by 9600,8,N,1 must e correct.

I really struggle why the Logfile of ESPEasy is not showing anything...


162626594: SYS : 2710.00,16.40,-65.00
162626603: MQTT : ESP_Easy/SystemInfo/uptime 2710.00
162626605: MQTT : ESP_Easy/SystemInfo/load 16.40
162626607: MQTT : ESP_Easy/SystemInfo/rssi -65.00
162632189: WD : Uptime 2711 ConnectFailures 0 FreeMem 17016 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
162633078: LoopStats: shortestLoop: 483 longestLoop: 8056061 avgLoopDuration: 627.06 loopCounterMax: 62111 loopCounterLast: 47453
162633079: Scheduler stats: (called/tasks/max_length/idle%) 47453/1977/9/83.23
162646957: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
162647085: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
162662188: WD : Uptime 2711 ConnectFailures 0 FreeMem 17016 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
162663078: LoopStats: shortestLoop: 483 longestLoop: 8056061 avgLoopDuration: 625.12 loopCounterMax: 62111 loopCounterLast: 47601
162663078: Scheduler stats: (called/tasks/max_length/idle%) 47601/1983/9/82.75
162686595: SYS : 2711.00,17.25,-64.00
162686604: MQTT : ESP_Easy/SystemInfo/uptime 2711.00
162686606: MQTT : ESP_Easy/SystemInfo/load 17.25
162686608: MQTT : ESP_Easy/SystemInfo/rssi -64.00
162692189: WD : Uptime 2712 ConnectFailures 0 FreeMem 17184 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
162693077: LoopStats: shortestLoop: 483 longestLoop: 8056061 avgLoopDuration: 625.41 loopCounterMax: 62111 loopCounterLast: 47575
162693077: Scheduler stats: (called/tasks/max_length/idle%) 47575/1985/9/82.95




Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Hi Heiner
do not worry, we get it working.

ZitatI tried with and without Controller : Fhem HTTP
no need for controllers; it is not related to ser2net
further hint; forget FHEM untill you receive stable data with "nc"

Zitatto be sure the 8266 and the IR TTL and the Meter is working I used a simple Arduino script with SoftwareSerial
ESP8266 has one hardware serial; the second hardware serial should not be accessible.
I have 2 meters therefore I use both software and standard serial on the ESP8266. My software serial is not very stable and loses 30% of the packets.
If you have only 1 meter, stick to the standard serial of the ESP8266.
With ESP32 you have more hardware serial available.

Summary:
start the hardware serial server.
Avoid "swap" and consider turning off log to serial.
Connect with nc from your computer.
Conncet the pins to something reliabe, which deliver a stable serial 3V signal. (5V will kill your pin on the esp)
try different pins untill you get someting in nc

immi

Heiner

Hi Immi,

ok HW Serial configured GPIO3 and 1 or D9 and D10 or better the pins written with RX and TX
ESPEasy, Tools, Advanced Settings, Log Settings, Serial LogLevel: none
ESPEasy, Tools, Advanced Settings, Log Settings, Web LogLevel: Debug more
ESPEasy, Tools, Advanced Settings, Serial Settings, enable Serial Port: yes
ESPEasy, Tools, Advanced Settings, Serial Settings, Baudrate: 9600

still nothing even if exchanging TX with RX.

Next I will bridge TX and RX for some seconds which could do something outside the IR_TTL

Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

Heiner

Hi, connected TX with RX and opened it again,
connected TX with 3 V then with Gnd then RX with 3V then RX with Gnd

hexdump was the entire time running - no response at all.
:(
Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Zitat von: Heiner am 21 Juli 2021, 15:39:01
Hi, connected TX with RX and opened it again,
connected TX with 3 V then with Gnd then RX with 3V then RX with Gnd
When I wrote a stable serial 3V signal, I meant something like a usb2serial interface (or a gpio of a raspi)  sending constantly something at 9600; you will never see a DC

Nevermind, maybe the problem is in the firmware you are using.
If I find time and you do not find a solution, I compile you a working espeasy firmware during the weekend for your esp8266.

immi

immi

Dear Heiner
I compiled right now the espeasy for 8266 and 32 (find enclosed)

The espeasy32 works well (2,5 HardwareSerial possible at the same time)

The espeasy8266 has currently a problem with the HardwareSerial.

I fixed the espeasy8266 HardwareSerial; the SoftwareSerial works also ok 
(see config as picture of both sending to fhem obis at the same time the IR of my 2 meeters)

immi

Heiner

Hi Immi,
I uploaded the 8266, use same ports then you suggeted and nothing  :-\

Now I prepared a old Ardunio Nano just saying Hello over Serial line once per second, upload and as per serail monitor it works, as well the RX LED blinks every second. So I connect this RX pin with my ESP8266 and nothing again, neither on my WebLog which is on debug mode, nor arriving in the fhem OBIS device, nor on fhem event Monitor.
The logfile in fhem shows  this:
2021.07.27 17:03:35 5:  OBIS (Stromzaehler) - Opening device...
2021.07.27 17:03:35 3:  Opening Stromzaehler device 192.168.178.41:23
2021.07.27 17:03:35 5:  HttpUtils url=http://192.168.178.41:23/ NonBlocking via http
2021.07.27 17:03:35 4:  IP: 192.168.178.41 -> 192.168.178.41
2021.07.27 17:03:38 1:  Stromzaehler: Can't connect to 192.168.178.41:23: connect to http://192.168.178.41:23 timed out
2021.07.27 17:03:38 4:  OBIS (Stromzaehler) - error while connecting: connect to http://192.168.178.41:23 timed out
2021.07.27 17:03:58 5:  SW:
2021.07.27 17:03:58 4:  OBIS (Stromzaehler) - Wrote
2021.07.27 17:04:00 5:  SW:
2021.07.27 17:04:00 4:  OBIS (Stromzaehler) - Wrote
2021.07.27 17:04:39 5:  HttpUtils url=http://192.168.178.41:23/ NonBlocking via http
2021.07.27 17:04:39 4:  IP: 192.168.178.41 -> 192.168.178.41
2021.07.27 17:04:39 3:  OBIS (Stromzaehler) - Init done
2021.07.27 17:04:39 1:  192.168.178.41:23 reappeared (Stromzaehler)


Do I have hear a problem with the port I used (23) ?

Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Zitat von: Heiner am 27 Juli 2021, 17:14:55
Do I have hear a problem with the port I used (23) ?
Hi Heiner
port 23 is for telnet, therefore I prefer other ports.
I have not understood.
1) have you cofigured your esp8266 like I said and succesfully received the "hello" from the UNO in the "nc 192.168.178.41 1234" ?
if no, try other pins
if yes
2) Have you received the data from your meter via "nc ip port |hexdump -c"?
I receive a long SML sequence starting with 1B1B1B1B01010101..............
if no check your IR2ttl  circuit
if yes
3) go to FHEM check if you need to specify SML in your config "define PowerMeter OBIS 192.168.178.41:1234 SML" 

immi

Heiner

Hi Immi,

you were right, I did not check with "nc ip port |hexdump -c"

so i've done it again:

Exact as per your sample for the 8266 config and same pins, this time based on Port 4321
This time I even not only connect the TX from the Nano, as well the RX and tried it in both ways(TX/RX exchange) to the 8266.

"nc ip port |hexdump -c" deliver now incoming data when Nano RX  connected to D6 -Hurra  ;D
To note, the 8266 WebLog in debug mode shows me incoming data as well, no details but at least that something is coming.

Now I replaced the Nano with the IR Head tried again both connection RX/TX and flipped, and tried same on the Photocell / IR LED from the meter in both directions and.... hurra get some data here as well.

What I receive is this ( extract as constantly data come in):

0000440   ▒   Z   A   ▒   0 215  \n 215  \n   ▒   -   0   :   0 .   0
0000450   .   0   ▒   ▒   5   5   (   ▒   9   ▒   ▒   0   ▒   - 5   0
0000460   ▒   ▒   ▒   5   3   ▒ 215  \n   ▒   -   0   :   ▒   . ▒   .
0000470   ▒   ▒   ▒   5   5   (   0   ▒   6   9   9   ▒   .   6 6   ▒
0000480   9   ▒ 215  \n   ▒   -   0   :   ▒   .   ▒   .   ▒   ▒ ▒   5
0000490   5   (   0   3   ▒   9   5   5   .   ▒   6   ▒   6   ▒ 215  \n
00004a0   ▒   -   0   :   9   6   .   5   .   5   ▒   ▒   5   5 (   ▒
00004b0   ▒   ▒ 215  \n   0   -   0   :   9   6   .   ▒   .   ▒ 5   5
00004c0   ▒   ▒   5   5   (   0   0   0   0   ▒   0   ▒   ▒   ▒ 5   ▒
00004d0 215  \n   ! 215  \n   ▒   H   A   G   5   e   H   Z   0 ▒   0
00004e0   ▒   _   ▒   ▒   ▒   ▒   Z   A   ▒   0 215  \n 215  \n ▒   -
00004f0   0   :   0   .   0   .   0   ▒   ▒   5   5   (   ▒   9 ▒   ▒
0000500   0   ▒   -   5   0   ▒   ▒   ▒   5   3   ▒ 215  \n   ▒ -   0
0000510   :   ▒   .   ▒   .   ▒   ▒   ▒   5   5   (   0   ▒   6 9   9
0000520   ▒   .   6   6   ▒   9   ▒ 215  \n   ▒   -   0   :   ▒ .   ▒
0000530   .   ▒   ▒   ▒   5   5   (   0   3   ▒   9   5   5   . ▒   6
0000540   ▒   ▒   ▒ 215  \n   ▒   -   0   :   9   6   .   5   . 5   ▒
0000550   ▒   5   5   (   ▒   ▒   ▒ 215  \n   0   -   0   :   9 6   .
0000560   ▒   .   ▒   5   5   ▒   ▒   5   5   (   0   0   0   0 ▒   0


Now I take my fhem and add this command:
define Stromzaehler OBIS 192.168.xxx.xx:4321 SML

the only reading I got is the state which is opened.
I tried to add some attributes but no change:
ignoreUnknown    off
resetAfterNoDataTime   30
verbose                  5


Logfile is fhem shows nothing ( i tried based on Standard and SML in the definition)
2021.07.28 11:30:42 5:  OBIS (Stromzaehler) - Opening device...
2021.07.28 11:30:42 3:  Opening Stromzaehler device 192.168.xxx.xx:4321
2021.07.28 11:30:42 5:  HttpUtils url=http://192.168.xxx.xx:4321/ NonBlocking via http
2021.07.28 11:30:42 4:  IP: 192.168.xxx.xx -> 192.168.xxx.xx
2021.07.28 11:30:42 3:  OBIS (Stromzaehler) - Init done
2021.07.28 11:30:42 3:  Stromzaehler device opened
2021.07.28 11:30:46 5:  SW:
2021.07.28 11:30:46 4:  OBIS (Stromzaehler) - Wrote


I tried the "list Stromzaehler" command, which shows thet fhem get something in the buffer:

Internals:
   CFGFN     
   DEF        192.168.xxx.xx:4321 SML
   DeviceName 192.168.xxx.xx:4321
   FD         39
   FUUID      6101217c-f33f-845e-7af3-15abaf529882ad39
   MeterType  SML
   NAME       Stromzaehler
   NR         12581
   PARTIAL   
   STATE      opened
   TYPE       OBIS
   READINGS:
     2021-07-28 13:24:15   state           opened
   helper:
     BUFFER     �55(0000�0���5��
!�
�HAG5eHZ0�0�_��űZA�0�

�-0:0.0.0��55(�9��0�-50���53��
�-0:�.�.���55(0�699�.�0�3��
�-0:�.�.���55(03�95�.�0����
�-0:96.5.5��55(����
0-0:96.�.�55��55(0000�0���5��
!�
�HAG5eHZ0�0�_��űZA�0�

�-0:0.0.0��55(�9��0�-50���53��
�-0:�.�.���55(0�699�.�0�3��
�-0:�.�.���55(03�95�.�09���
�-0:96.5.5��55(����
0-0:96.�.�55��55(0000�0���5��
!�


I read modifying the device would help, but not in my case....


What can i do now?

Many Thanks for your helping hand again.


Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Hi Heiner
good job so far.

the clear text in "nc ip port |hexdump -c" (...HAG5eHZ0..) let me think that you do not have an SML meeter like me; therefore try without the SML option.
Verbose 5 can help you debugging.
for other options https://fhem.de/commandref_DE.html#OBIS
or mabe contact the module owner (Maintainer: gvzdus Forum: Sonstige Systeme)

p.s. pay attention the software serial is very sensitive to noise. You will get lots of messages full with errors which cannot be interpreted. By trial and error you can find out which pin is more stable on your esp8266 or the positioning of the IR. The buffer you are showing below looks quite damaged. But also if you receive 1 correct message evry 10 is OK.

Heiner

Hi, after several trails i was able to upload (using the new Web-flash funktion) the ESP32 und used HW Serial2 and it works perfectly.

obis device worls fine as well.

to note 8266 with espEasy did not work neither hw serial, nor HSswap serial. only SW Serial with errors. Tasmota on the 8266 worked on HW serial without problem but not on SW serial, but tasmota need mqtt to Feedback which is complex as well.
Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Happy you made it with the esp32.
I fixed the hardwareserial on the esp8266 (if you want to try).
https://forum.fhem.de/index.php/topic,52843.msg1167780.html#msg1167780

I will send the bugfix to the espeasy guys...

Heiner

Hi,
Immi, I can confirm your fix is working so 8266 with HW serial is working fine now.
5 Stars for Immi.

Many Thanks.
Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

Desedo

Hallo zusammen,
auch wenn das hema schon etwas älter ist, hoffe ich noch auf eine Antwort. Leider scheint der Link mit den .ino Dateien nicht mehr aktuell zu sein.
Ich möchte ebenfalls meinen elektronischen Zähler (EHZ DD3 2R10 ETA ODZ1) mit einem ESP01 auszulesen und die Daten per MQTT an einen Raspberry MQTT-Broker zu senden und in FHEM einzulesen.
Dazu habe ich einen Sketch für den ESP01 geschrieben, der soweit funktioniert, das er Daten an den MQTT-Broker sendet, allerdings nur Fragmente der OBIS-Meldung.
Beispiel:
Pufferlänge: 462 Zeichen
Pufferlänge: 270 Zeichen
Hex-Wert: 0x2E 0x30 0x2A 0x32 0x35 0x35 0x28 0x30 0x30 0x30 0x30 0x30 0x31 0x2A
Pufferlänge: 267 Zeichen
Hex-Wert: 0x32 0x35 0x35 0x28 0x30 0x30 0x30 0x30 0x30 0x31 0x2A
Pufferlänge: 267 Zeichen
Hex-Wert: 0x32 0x35 0x35 0x28 0x30 0x30 0x30 0x30 0x30 0x31 0x2A
Pufferlänge: 459 Zeichen
Pufferlänge: 270 Zeichen
Hex-Wert: 0x2E 0x30 0x2A 0x32 0x35 0x35 0x28 0x30 0x30 0x30 0x30 0x30 0x31 0x2A
                     .      0     *      2     5     5     (      0     0     0     0    0      1     *
Pufferlänge: 289 Zeichen
Hex-Wert: 0x30 0x30 0x33 0x38 0x33 0x2A 0x6B 0x57 0x68 0x29 0x0D 0x0A 0x31 0x2D
                    0      0     3      8     3     *      k     W    h     )     CR   LF    1     -
0x30 0x3A 0x32 0x2E 0x38 0x2E 0x30 0x2A 0x32 0x35 0x35 0x28 0x30 0x30 0x30 0x30
    0     :      2     .      8     .     0     *     2     5     5     (      0     0     0     0
0x30 0x31 0x2A
    0     1     *


Obwohl meist so um die 270 Zeichen gelesen werden und manchmal auch über 400, erscheinen in der MQTT-Broker-Ausgabe nur wenige Zeichen, aber nicht immer die gleiche Anzahl. Manchmal werden Zeichen gelesen, aber es gibt keine Ausgabe.
Bei der letzten und vorletzten Hex-Ausgabe habe mal den Hex-Code in Ascii umgewandelt und erkenne dort Teile des OBIS-Codes. Dabei sind ,,00383*kWh)" der aktuelle Zählerstand für den Bezug und ,,1-0:2.8.0*255(000001*" der Zählerstand für die Einspeisung.

Gerne würde ich mir die .ino-Dateien aus dem Link ansehen oder einen Hinweis bekommen, wo ich bei mir suchen kann. Besten Dank.

Gruß,
desedo

immi

Hi Desedo
ich verstehe nicht warum MQTT.
espeasy installieren  (in github gibt es bereit compilierte versionen https://github.com/letscontrolit/ESPEasy)
ser2net einschalten
fhem  verbinden

l.g.
immi