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
./buildin 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
Run the app by specifying the configuration file as the first parameter:
Press [ESC] to stop.
p1reader needs to store the received telegrams. You can set the storage through the
The currently supported storagedrivers are:
log- Write an csv file. Specify the filename with the
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
mysql55connimport and the
TMySQL55Connectionclassname. A table scheme can be found in
external- Starts an external tool and passes the telegram in csv form through stdin. Use the
argsconfiguration options to specifify a program. See my related project Piphome for an example.
The parser currently reads the following DSMR4 field:
You can add more fields in the
TelegramParser class (look for the
- Synapse v40 (modified) for serial communication http://synapse.ararat.cz/
- Demon version (or just run it in a screen session)