Git Product home page Git Product logo

emeterp1port's Introduction

e-Meter P1 port

ESP8266 Arduino sketch to read Dutch e-Meters and upload to ThingSpeak.

Introduction

In the Netherlands, new electricity meters (e-Meters) are being rolled out. These meters are referred to as smart. A smart meter is a digital (gas- or) electricity meter that can be remotely read, by the power company, using e.g. power line communication.

The Dutch government has standardized (v5) smart meters. I do have a v4.2 meter, and that older spec differs on details.

One interesting aspect is that Dutch smart meters are required to have a so-called P1 port. Basically, this is a (transmit-only) serial port, that spits out the meter readings regularly (every 10 seconds in v4.2, every second in V5.0).

This project uses an ESP8266 to receive the readings and to upload them to a webserver; this could be a Google docs spreadsheet, but I use the cloud service from ThingSpeak.

e-Meter system diagram

Generation 0

The P1 port standard requires the data line to be inverted. So all "normal" serial ports can't handle the P1 port.

If you have an FTDI cable you are in luck: it has hardware support to invert the data back.

See generation 0 for my first experiments.

Generation 1

If you want to use a bigger device like a Raspberry Pi, you can go for the FTDI cable. I wanted a lighter device: an ESP8266. I have written a generation 1 firmware that has been operational from April 2017 to may 2021. Then I had a power failure, which causes a telegram line to become so long that my firmware crashes on every telegram.

I do not recommend using the generation 1 firmware because it uses the SoftwareSerial library to invert the RX pin; this bit-bang approach is unreliable (many CRC errors). There is a better way: the ESP8266 has, like the FTDI cable, hardware support to invert the RX pin. This approach is taken in generation 2.

Generation 2

I went a whole year without logging, mainly because the SoftwareSerial gave too many errors when using it with the later ESP8266 Arduino releases.

Early 2022 I discovered that the ESP8266 also has hardware support to re-invert the data line. Then I developed generation 2.

(end)

emeterp1port's People

Contributors

maarten-pennings avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.