New library for receiving ECM-1240 packets written in C

Post any 3rd party software here.
Post Reply
Peter_V
Posts: 23
Joined: Sat Feb 19, 2011 10:03 am

New library for receiving ECM-1240 packets written in C

Post by Peter_V » Sat Dec 15, 2018 10:52 pm

I just posted my new library for receiving and accessing ECM-1240 packets. It's currently intended to run on Linux, using something like a raspberry pi.
In addition to processing the packets, this library can also make the data available in real time to other applications on the same server using POSIX shared memory. The same library can be linked to those other applications for accessing the shared memory.

https://github.com/pvanderwal/ecmR-libr ... h-ECM-1240

Included in the above is a sample application that can built run as a service under systemD or linux daemon under init.d, etc.
The application can save ECM data to both a RRDtool database an a new time series data base that I'm working on that is designed overcome some problems I have with RRDtool.
Specifically; while RRDtool is designed to save rates, etsd is designed to save quantities which is more appropriate for energy data. ETSD is also designed to save data one sector at a time and only write each sector once, which reduces wear on flash memory (microSD cards, etc.).

Finally where RRDtool appears to save data as floating point values, which makes databases written on 32 bit systems incompatible with 64 bit systems and vice versa, ETSD saves data primarily as unsigned integers of fixed size so it's compatible with either.

I originally wrote ETSD use fixed 10 second intervals with 10 streams of data each containing 16 bits per interval, and one 1/2 channel that I used to save AC voltage readings.
I've since changed it to work with any size intervals from 1 to 65,535 seconds (~18 hours). t can also work with anything from 4 streams to 63 streams and each stream can have a variable resolution of 2, 4, 6, 8, 10, 16, or 18 bits

Currently the ETSD library for saving data is fully functional, but I'm still working on the library for searching for data in the database as well as calculating averages, etc.
https://github.com/pvanderwal/ETSD-Time-Series-Database
Post Reply