Skip to content
P1 Reader build with Freepascal
HTML Pascal C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

P1 Reader

A simple P1 Reader build with Freepascal.


  • Install Freepascal apt-get install fpc (Version 2.6.4 of higher)
  • Install mariadb client apt-get install libmariadb-client-lgpl-dev-compat
  • run ./build in the project root


p1reader needs an configuration file in order to run. Look for an example and a description of all the options in the conf directory.


Run the app by specifying the configuration file as the first parameter:

p1reader ../myconfig.ini

Press [ESC] to stop.

Storage Drivers

p1reader needs to store the received telegrams. You can set the storage through the option.

The currently supported storagedrivers are:

  • log - Write an csv file. Specify the filename with the generic.log entry.
  • mysql - Use this option to save the readout in an MySQL or MariaDB database. The app is linked againts the mysql 5.5 lib but you can change this in unit src/Storage/MySQL.pas. Look for the mysql55conn import and the TMySQL55Connection classname. A table scheme can be found in conf/db/meter_readings.sql.
  • external - Starts an external tool and passes the telegram in csv form through stdin. Use the cmd and args configuration options to specifify a program. See my related project Piphome for an example.

Meter fields

The parser currently reads the following DSMR4 field:

  • 1-3:0.2.8
  • 1-0:1.8.1
  • 1-0:1.8.2
  • 1-0:1.7.0
  • 1-0:21.7.0

You can add more fields in the TelegramParser class (look for the ParseLine method).



  • Demon version (or just run it in a screen session)
You can’t perform that action at this time.