mruettgers / SMLReader

ESP8266 based smart meter (SML) to MQTT gateway
GNU General Public License v3.0
289 stars 67 forks source link

No readout #46

Open kitt2011 opened 2 years ago

kitt2011 commented 2 years ago

Hello again,

i tried the programm with a self compiled and you finish generatet Binary. Both of them dosnt have a readout to my mqtt server. The only message is a "hello start up message" to my mqtt server. I have a smart meter from Landis&Gyr the E320. Actually i use a Wemos with Tasmota and the SML driver an this works perfectly. The only reason why its so important for me to use youre programm is the live sending intervall. My tasmota solution only send all 10 seconds. I control my photovoltaic system (grid tie inverter) with my server but 10 seconds to late for zero feed. I use the serial monitorbut there are also no messages.

mruettgers commented 2 years ago

From what I could find out about the E320, there should be no problem running it with SMLReader. Did you use the circuit that you had in use with Tasmota? Or did you build it exactly as in my documentation? When SML data is recognized, the built-in LED of the Wemos D1 should blink several times.

You could also try to activate the flags -DSERIAL_DEBUG=true -DSERIAL_DEBUG_VERBOSE=true in the build target in platformio.ini and then have another look at the output of the serial monitor.

kitt2011 commented 2 years ago

Exactly like your documentation. I have flashed your compiled binary. The LED is on input D2 The Internal LED from my Wemos light all the time after startup, no blinking

kitt2011 commented 2 years ago

now ive testet it only the wemos with your binary, no resistor and no IR LED. The internal LED continusly lightning

Jabberwock-v6 commented 1 year ago

Hallo, I have exactly the same behavior on my miniD1 with just fototransistor and resistor. I get the hello messages from it but the led is on all the time. The meter is a eBZ DD3

kitt2011 commented 1 year ago

You need a IR lED no phototransistor

Jabberwock-v6 commented 1 year ago

Why? I mean BPW40 is a phototransistor and it's used at the example circuit! But I tried it with IR receiver led and different resistors. I saw 0.5 volts between 3.3v and D2 if I moved the led on the interface and 0.01 without receiving anything. But I have given up now and ordert a BPW40. Will see if it works than...

michaelosthege commented 1 year ago

Hi @Jabberwock-v6, did you make any progress here? We confirmed the voltage changes with our PT333-3C on an eBZ DD3 too.

michaelosthege commented 1 year ago

According to the eBZ DD3 documentation section 6.1 we ~might~ need to use a different setting for the software serial: SWSERIAL_7E1.

However, with either setting we never get the expected start sequence.

By printing the read data with Serial.printf("%02x", this->buffer[this->position]); we can see the received bytes. And even better: Serial.write(this->buffer[this->position]); gives a very nicely interpretable output on the serial debugger.

~Even though there's a repetitive pattern, this is dependent on the resistor, and in no case we saw the start/end sequences.~

To summarize: The eBZ DD3 sends one message every second, containing all information at the same time. This message looks like this 👇

âš  Interestingly, depending on the photodiod circuit, there appears to be a difference between the LED ports on the front vs. the top. (The top works.)

/EBZ5DD3BZ06ETA_107

1-0:0.0.0*255(1EBZxxxxxxxxxx)          👈 xxxxxxxx is the serial number
1-0:96.1.0*255(1EBZxxxxxxxxxx)
1-0:1.8.0*255(000208.68432723*kWh)
1-0:16.7.0*255(000371.37*W)
1-0:36.7.0*255(000038.74*W)
1-0:56.7.0*255(000284.72*W)
1-0:76.7.0*255(000047.91*W)
1-0:32.7.0*255(233.9*V)
1-0:52.7.0*255(233.2*V)
1-0:72.7.0*255(234.2*V)
1-0:96.5.0*255(001C0104)
0-0:96.8.0*255(002FFAF6)
!

We have a second meter of type EasyMeter ESY11 Q3DA1002 V3.04 which blinks the same OBIS format:

/ESY5Q3DA1002 V3.04

1-0:0.0.0*255(1ESY11xxxxxxxx)          👈 xxxxxxxx is the serial number
1-0:1.8.0*255(00001258.5124432*kWh)
1-0:21.7.0*255(000003.00*W)
1-0:41.7.0*255(000001.71*W)
1-0:61.7.0*255(000000.00*W)
1-0:1.7.0*255(000004.71*W)
1-0:96.5.5*255(80)
0-0:96.1.255*255(1ESY11xxxxxxxx)
!
michaelosthege commented 1 year ago

We got things working: https://github.com/michaelosthege/obis_exporter

Learned a lot from the SMLReader project structure! We ended up writing something from scratch because the protocol is different, and we wanted to export the data as Prometheus metrics instead of MQTT messages.