jantenhove / P1-Meter-ESP8266

Software for the ESP8266 that sends P1 smart meter data to Domoticz (with CRC checking)
GNU General Public License v3.0
79 stars 38 forks source link

Garbage output on Serial #3

Open jeroenvanpelt opened 8 years ago

jeroenvanpelt commented 8 years ago

Trying to replace a RaspberryPi with ser2net with a NodeMCU module with this sketch to report P1 meter readings.

Connected the P1 Meter as described in the Readme. Compiled and flashed the sketch succesfully. NodeMCU module is connecting to the configured WiFi. On the Serial output I just see blocks of "garbage" data though. They appear every 10s, which indicates it is displaying the telegrams.

No other output on Serial. Any ideas?

lxz81 commented 8 years ago

Which meter do you have? I have a meter with 8N1 output and it works properly. My parents however have a meter with an 7E1 output, and all I see is garbage.

It has something to do with softwareserial not supporting anything other than 8N1.

jeroenvanpelt commented 8 years ago

Hmm, that might be the reason. For my (working) ser2net RaspberryPi setup I have to use this in the config to make things work: 10002:telnet:600:/dev/ttyUSB0:9600 7DATABITS EVEN 1STOPBIT banner

7E1 indeed...

jeroenvanpelt commented 8 years ago

I found this sevene1serial.h file here: https://gist.github.com/narrowtux/4e8213db2b817fdfe863

Not sure how to add this to mix to test it out.

martijnvwezel commented 1 year ago

If you did not figure it out: buffer[i] = input_char&127;