Page 1 of 1

C code/library for EKM Omnimeter

Posted: Mon May 10, 2021 1:35 pm
by ianf
Hi

This is something that I meant to make publicly available around 7 years ago. Hopefully it will help someone here read data from the meters. Originally, I intended to add support for several meters, but I only ever had access to the Omnimeter 1v.3. The intention was to use unions to handle multiple meter versions defined in ekmprivate.h. Anyway, it should provide a good starting point for people wishing to write their own code to read the meters. The library will can set the meter's RTC according to the computer time.

Several functions are missing:
1. read/set TOU rates.
2. read/set holidays.
3. read/set TOU schedule.

https://github.com/ifreislich/EKM-Metering

The compiled program will produce text output as follows:

1414409580
meter: 11766 19
L1 Volts: 241.8
L1 Amps: 0.0
L1 Power: 0
L1 PF: -0.00
CT Size: 200
Frw kWh: 533.0
Rev kWh: 0.0
Demand: 6915
Demand Period: 1
1414409581
meter: 12000 19
L1 Volts: 229.6
L1 Amps: 2.6
L1 Power: 596
L1 PF: -0.98
CT Size: 200
Frw kWh: 15397.9
Rev kWh: 0.0
Demand: 6435
Demand Period: 1

I'm adapting this code to run on an ESP8266 board for data logging.

Ian