jantenhove/P1-Meter-ESP8266

No serial output, yet meter sends data

Opened this issue · 7 comments

Hi @jantenhove,

I have tried this project and it seems great, because no extra components such as resistors seem needed.

Unfortunately, my ESP (Wemos D1 Mini) does not receive any data from the smart meter. I suspect the bug is somewhere in SoftwareSerial, because when I connect the RxD pin to the TX pin, the Arduino serial console shows garbage every 10s, so the meter seems to send data.

My wiring is the same as your example. I've created simpler code to troubleshoot further:

#include <SoftwareSerial.h>

#define MAXLINELENGTH 64
#define PIN_RX D5

#define BAUDRATE 115200

SoftwareSerial softSerial(PIN_RX, -1, true, MAXLINELENGTH);

void setup() {
  
  Serial.begin(BAUDRATE);
  softSerial.begin(BAUDRATE);
  
  Serial.println("Running at baudrate " + (String)BAUDRATE + " and RX pin " + (String)PIN_RX + "...");
}

void loop() {
  if (softSerial.available()) {
    Serial.write("Available");
    Serial.write(softSerial.read());
  }
}

Apart from the Running at baudrate 115200 and RX pin 14... message, nothing happens. When I manually disconnect GND, Available can be read so the SoftSerial interrupts seem to be handled correctly.

I'm at a loss here! Is there anything I'm doing wrong?

Hi @WeeJeWel ,

Sorry for my late response. Which meter are you using?
I've used this sketch on multiple meters. Some meters use 9600n8, some 9600e7, some are inverted, and some are not.

Hi,
I get the error TimeLib.h: no such file or directory can you help me?
Regards,
Patrick

Can be found: TimeLib

Hi @WeeJeWel ,

Sorry for my late response. Which meter are you using?
I've used this sketch on multiple meters. Some meters use 9600n8, some 9600e7, some are inverted, and some are not.

@jantenhove
Dear jan, I have the same trouble with getting readable output. my meter(Iskra | MT 382) uses 9600 7E1 protocol. do i need to change something in code ? I am struggling to get the 7 bit part right. attached the output I am getting.
Thank you for your reply in advance!

BR Frans

output p1
output.txt

Hi @WeeJeWel ,

Rather a late response but I thought perhaps it can help others with the same issue...
I was struggling with the same problems as you described. Placing a 1K resistor between RTS and RxD resolved the issue for me.

What Smart Meter do you have at your home? Is it by coincidence a Landis+Gyr ZCF110/ZMF110?
What did you use for SerialConfig? SWSERIAL_8E1? and what baudrate? @marsman007

I have a Landis+Gyr ZMF110CCtFs2
I pretty much used the code from: http://domoticx.com/p1-poort-slimme-meter-data-naar-domoticz-esp8266/