EKM-Omnimeter RS-485 Data

For more advanced meter data users. Learn from others and ask questions about how to read meters, how to use the EKM Push Data, and how to display the meter data in useful ways.
Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: EKM-Omnimeter RS-485 Data

Post by Jameson » Sun Jul 29, 2012 1:31 pm

Hello Taranar,

Ooops sorry about that, here is the link to the meter settings/commands protocol pdf:

http://documents.ekmmetering.com/EKM-Om ... ol_v.3.pdf

The easiest way to learn how the settings are made will be to download the new EKM Dash software here: http://www.ekmmetering.com/ekmdash
We have a section under Help>Hex Inspector that will show you the hex as you make settings in your meter and the order of request: response: command: close string

=========

We implemented a meter discover scheme a while back, it was surprisingly fast at "discovering" the meters on the bus. We essentially found them by brute force. We started at meter # 000000000001 and sent a meter request for every number after this up to 10s of thousands. You can request super fast and if you do not detect the start of a meter response, you can move on to the next meter number. From what I remember we could go through thousands of meter numbers in a few minutes.

There is not a request that will make all of the meters on the bus respond in an organized way.

And just so you know, if you only have 1 meter attached you can send meter # 999999999999 and the attached meter will respond with a full response including it's meter number. This will not work if you have more than one meter attached to the bus.

Best regards,
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

ianf
Posts: 7
Joined: Fri Jul 06, 2012 12:01 am

Re: EKM-Omnimeter RS-485 Data

Post by ianf » Fri Jan 04, 2013 4:28 am

Jameson wrote:
ianf wrote:2. The Maximum Demand field is 8 bytes, not 7.
EKM-- 2. Thank you very much for catching the typo! The Maximum Demand is 8 bytes in the EKM-Omnimeter return string. We really appreciate the heads up and will update this document.
I'd like to correct this further. It appears that the Maximum Demand field *is* in fact 7 bytes. What's missing is the Pad byte between the Maximum Demand and Demand Period field. The field is out by an order of magnitude if the Pad is ignored. I use the following to decode the meter response:

Code: Select all

struct _tou_meter {
        char     total_kwh[8];
        char     tou[4][8];
} __attribute__ ((packed));

/*
 * Meter response to Open
 */
struct _ekmv3reply {
        char                     start;
        char                     model[2];
        char                     firmware;
        char                     address[12];
        struct _tou_meter        total;
        struct _tou_meter        reverse;
        char                     volts[3][4];
        char                     amps[3][5];
        char                     power[3][7];
        char                     total_power[7];
        char                     pf[3][4];
        char                     max_demand[7];
        char                     pad1;
        char                     demand_period;
        char                     date[14];
        char                     ct_size[4];
        char                     pulse[3][8];
        char                     pulseratio[3][4];
        char                     pad2[3];
        char                     pulse_h_l[3];
        char                     reserved1[17];
        char                     pad3[3];
        char                     end[1];
        u_int16_t                crc;
} __attribute__ ((packed));
Hopefully one of these days I'll be able to share my program.

Karan
Posts: 1
Joined: Mon Mar 18, 2013 5:11 am

Re: EKM-Omnimeter RS-485 Data

Post by Karan » Mon Mar 18, 2013 5:15 am

Hi Jameson,

This is Karan Panchal from Energos.

Please tell me how are the TOU's configured in the meter.

As I am configuring your meters in our Application, I need the Time slots that are configured.

Regards,

Karan

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: EKM-Omnimeter RS-485 Data

Post by Jameson » Mon Mar 18, 2013 9:40 am

Hello Karan,

The easiest way to learn this is to change the TOU settings in an Omnimeter using the EKM Dash. You then use the "Hex Inspector" to see how we do this.

Here is what it looks like (in hex inspector) when I change Omnimeter v.3 # 10001320 TOUs. I set TOU 1 to 09:00 and TOU 2 to 21:00


Send (full meter request)
2F 3F 30 30 30 30 31 30 30 30 31 33 32 30 21 0D
0A

Receive (full meter response)
02 10 22 14 30 30 30 30 31 30 30 30 31 33 32 30
30 30 30 32 35 33 32 35 30 30 30 31 36 38 38 37
30 30 30 30 38 34 33 38 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 30
30 30 30 30 30 30 31 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
31 32 32 37 31 32 32 39 30 30 30 30 30 30 30 32
32 30 30 30 32 34 30 30 30 30 30 30 30 30 30 32
35 34 30 30 30 30 32 31 34 30 30 30 30 30 30 30
30 30 30 30 34 37 30 43 30 39 38 43 30 39 39 43
30 30 30 30 30 30 32 36 31 30 30 31 31 33 30 33
31 38 30 32 30 39 31 38 32 30 30 32 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 21 0D 0A 03 1A 44

Send (Password)
01 50 31 02 28 30 30 30 30 30 30 30 30 29 03 32
44

Receive ("OK" from meter)
06

Send (Schedule1 TOU values to set)
01 57 31 02 30 30 37 30 28 30 39 30 30 30 31 32
31 30 30 30 32 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 29 03 21 6B

Receive ("OK" from meter)
06

Send (close string)
01 42 30 03 75
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

stelip
Posts: 6
Joined: Sat Mar 30, 2013 2:58 am

EKM-25EDSP-N V.2 - Data Format

Post by stelip » Sat Mar 30, 2013 5:47 am

Hi,

Does anyone have the specification on the data format for the EKM-25EDSP-N V.2
It seems similar to the V3 but not quite the same

Best regards
Steve

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: EKM-Omnimeter RS-485 Data

Post by Jameson » Sun Mar 31, 2013 8:23 pm

Hello Steve,

Welcome to the forum.

v.2 meters (including the 25EDSP-N) use these serial settings: 1200 baud, 7 data bits, Even Parity, 1 Stop Bit, No Flow Control

Here is how a v.2 meter return string is parsed: http://documents.ekmmetering.com/Meter_ ... AMR_v2.pdf

It will be easiest to use the EKM Dash > Hex Inspector to see how we communicate and parse the v.2 meter data. Just a heads up: the EKM-EDSP-N meter has been replaced by the new EKM-Omnimeter Pulse v.4.

If you have any questions, please let us know.

Regards,
Last edited by Jameson on Tue Apr 02, 2013 11:05 am, edited 1 time in total.
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

stelip
Posts: 6
Joined: Sat Mar 30, 2013 2:58 am

Re: EKM-Omnimeter RS-485 Data

Post by stelip » Tue Apr 02, 2013 3:10 am

Hi Jameson,

Thanks, I am much closer than before, I have two questions:
A) The document doesn't show whats after the time, (I want to read the 3 pulse counters on the meter)?
(Looks like 8 bytes of unknown then Pulse1(8B) Pulse2(9B) pulse3(8B))
B) How does the check sum work with this meter, doesn't seem to be the crc16 as it appears to be 1 byte?

Many thanks
Steve

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: EKM-Omnimeter RS-485 Data

Post by Jameson » Tue Apr 02, 2013 11:17 am

Here is a better document to use: http://documents.ekmmetering.com/v.2-Co ... tering.pdf

This one includes the Pulse Counts and the Pulse Input Ratios.

The v.2 meter checksum is Mod 128 of all characters from the second character to the last character before the checksum.

Thanks, let me know if you have any questions.
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

stelip
Posts: 6
Joined: Sat Mar 30, 2013 2:58 am

Re: EKM-Omnimeter RS-485 Data

Post by stelip » Thu Apr 04, 2013 8:54 am

Hi,

Thanks for the info, I have the checksum working ok. I am still not sure I have the correct format, after the time I have

2B of ??
8B Pulse count 1
8B Pulse count 2
8B Pulse count 3
2B of ??
4B Pulse ratio1
4B Pulse ratio2
4B Pulse ratio3


Here is a dump which may help:-

02102012303030303030303032323634 .. .000000002264
30303730363639393030353230353037 0070669900520507
30303138363139323030303030303030 0018619200000000
30303030303030303030313030323838 0000000000100288
30303039363638373030303033363031 0009668700003601
30303030303030303030303030303030 0000000000000000
32343731303030303030303030303830 2471000000000080
30303830303030303030303937313030 0080000000097100
30393731303030303030303030303030 0971000000000000
20313030433030303030303030353232 100C00000000522
35303131333034303430343135333830 5011304040415380
31303030303733303036353030313438 1000073006500148
36393630303030303030343030303030 6960000000400000
31303030313030303131313130303030 1000100011110000
30303030303030303030303030303030 0000000000000000
30303030303030303030210D0A0375 0000000000!...u


One more question, I have found I need a delay before sending the password after reading the values of 600ms, do you have a more accurate figure?

Best regards
Steve
:D

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: EKM-Omnimeter RS-485 Data

Post by Jameson » Thu Apr 04, 2013 10:00 am

Hi Steve,

Here is the sequence (this is for a v.2 meter only, the 25EDSP-N is a discontinued meter, replaced by the Omnimeter Pulse v.4):

Time (14 bytes)
CT Ratio (4 bytes)
Pulse Count 1 (8 bytes)
Pulse Count 2 (8 bytes)
Pulse Count 3 (8 bytes)
Pulse Ratio 1 (4 bytes) -- yours is set to 1:1
Pulse Ratio 2 (4 bytes) -- yours is set to 1:1
Pulse Ratio 3 (4 bytes) -- yours is set to 1:1

I would verify your data with the EKM Dash > Hex Inspector

I was not aware of the need for the delay to be honest, but it does make sense. Thanks for bringing it up. 600 ms seems a bit long to me, best I can say is play with it until it works. Make sure you send the close string (01 42 30 03 75)

Good luck!!
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

Post Reply