I would be interested in seeing a Tridium driver for the EKM meters! Here is a web link to the Niagara community where one can find resources and attend classes. Hope it helps.
https://community.niagara-central.com/o ... vices_Home
EKM-Omnimeter RS-485 Data
Re: EKM-Omnimeter RS-485 Data
I wanted to follow up and let everyone know where this stands. We have had some conversations with Tridium and based on the time and the price they quoted us, we will have to hold off on paying them to integrate for now. We would have to see a lot more demand for this before we will be able to justify (mostly the expense) of getting our meters to work with Tridium Jace.
So please let us know if this is a need that you have, if we get enough of a response we will bump it up the list of priorities.
Thanks,
So please let us know if this is a need that you have, if we get enough of a response we will bump it up the list of priorities.
Thanks,
Re: EKM-Omnimeter RS-485 Data
LabVIEW was mentioned earlier in this thread, so I thought someone here might be interested in this link to a LabVIEW driver for the v.3 Omnimeters: http://forum.ekmmetering.com/viewtopic.php?f=1&t=3429
Re: EKM-Omnimeter RS-485 Data
I think this is the proper place for this comment.
I have written C++ code to read my v.4 Omnimeter and store the responses in a database.
This is a Qt project, so it is full of Qt specific stuff.
These links will take you to the sources.
https://github.com/MojaveTom/QtReadEkm
https://github.com/MojaveTom/QtSupportRoutines
Since I have only a v.4 meter, there are stubs for some of the v.3 specific functions.
Smiles,
Tom
I have written C++ code to read my v.4 Omnimeter and store the responses in a database.
This is a Qt project, so it is full of Qt specific stuff.
These links will take you to the sources.
https://github.com/MojaveTom/QtReadEkm
https://github.com/MojaveTom/QtSupportRoutines
Since I have only a v.4 meter, there are stubs for some of the v.3 specific functions.
Smiles,
Tom
Re: EKM-Omnimeter RS-485 Data
Jameson wrote: Here is our CRC code... This is a standard lookup table implementation with the standard CRC16 polynomial, the differences in computation are in the code, dealing with the initial value, endianness, and 7-bit encoding.
static const uint16_t const ekmCrcLut[256] = {
<snip>
};
uint16_t ekmCheckCrc(
const uint8_t const*dat,
uint16_t len
) {
uint16_t crc = 0xffff;
while (len--) {
crc = (crc >> 8) ^ ekmCrcLut[(crc ^ *dat++) & 0xff];
}
crc = (crc << 8) | (crc >> 8);
crc &= 0x7f7f;
return crc;
}
Thank you for sharing this! Saved me a bunch of time....
Re: EKM-Omnimeter RS-485 Data
Hi Jameson,
I'm trying to get data from the sensor v.3, I'm using arduino microcontroller and I would like to know if there is a ('\n') at the end of each line.
I'm trying to get data from the sensor v.3, I'm using arduino microcontroller and I would like to know if there is a ('\n') at the end of each line.
Re: EKM-Omnimeter RS-485 Data
Hello Daniel,
There is not an ASCII "\n" at the end of each line, the HEX Meter Request and HEX Meter Return are just as you have posted them. The nice part about HEX is there are no hidden ASCII characters. If you convert ASCII "\n" to HEX you would get 5c 6e.
I can see that this meter request is for Omnimeter II v.3 UL #10001320, and I can see your full meter response with checksum 1A 44. Let me know if you are having trouble parsing the data.
Hope this helps.
There is not an ASCII "\n" at the end of each line, the HEX Meter Request and HEX Meter Return are just as you have posted them. The nice part about HEX is there are no hidden ASCII characters. If you convert ASCII "\n" to HEX you would get 5c 6e.
I can see that this meter request is for Omnimeter II v.3 UL #10001320, and I can see your full meter response with checksum 1A 44. Let me know if you are having trouble parsing the data.
Hope this helps.
Re: EKM-Omnimeter RS-485 Data
I want to make an alert when there is overload detected and make a signal to turn off some machines, so I bought a max485 to convert rs485 data from meter, it is connected in serial with the push system, I pretend to read the request and response.
I'm using SerialEvent code to read the Rx port in arduino, I think I've solved 7E1 serial configuration, but I need to make sure if I will get data as the strings I uploaded in post above, my purpose is to read the electric power, I need to keep data in a register and get access to an specific line.
After that, I compare it with a constant value to activate the signal I am looking for, so I need to make sure that data will look like those strings.
One more thing, the ekm meter is reading every minute, the boud rate is 9600 independently ?
I wasn't aware about 7E1 configuration, this was the result in serial monitor.
I expect better results next time.
I'm using SerialEvent code to read the Rx port in arduino, I think I've solved 7E1 serial configuration, but I need to make sure if I will get data as the strings I uploaded in post above, my purpose is to read the electric power, I need to keep data in a register and get access to an specific line.
After that, I compare it with a constant value to activate the signal I am looking for, so I need to make sure that data will look like those strings.
One more thing, the ekm meter is reading every minute, the boud rate is 9600 independently ?
I wasn't aware about 7E1 configuration, this was the result in serial monitor.
I expect better results next time.
- Attachments
-
- serialdata.png (30.26 KiB) Viewed 91465 times
Last edited by Daniel_Ch on Tue Jan 26, 2016 8:21 am, edited 1 time in total.
Re: EKM-Omnimeter RS-485 Data
It looks like you are interpreting data in ASCII, we tend to recommend you keep in in HEX. Otherwise you will get the symbols and unprintable characters that are impossible to interpret.
Can I ask: Seeing as you already have an EKM Push reading your meter, why trigger based on the RS485 data and not use the EKM Push data API directly? Does your Arduino have an ethernet port or only a serial port?
http://www.ekmmetering.com/developer-portal/
Yes, the meter always communicates at 9600 baud, 7 data bits, Even Parity, 1 Stop Bit, and No Flow Control.
Good luck, sounds like a fun project! Let us know how it turns out![Smile :)](./images/smilies/icon_e_smile.gif)
Can I ask: Seeing as you already have an EKM Push reading your meter, why trigger based on the RS485 data and not use the EKM Push data API directly? Does your Arduino have an ethernet port or only a serial port?
http://www.ekmmetering.com/developer-portal/
Yes, the meter always communicates at 9600 baud, 7 data bits, Even Parity, 1 Stop Bit, and No Flow Control.
Good luck, sounds like a fun project! Let us know how it turns out
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: EKM-Omnimeter RS-485 Data
Yes, only serial port.
I just modify my code to print in HEX, and 7E1 configuration not 8E1, do you think that I can read data properly using the max485 which converts from rs485 to ttl ?
Thank you so much,
Daniel
I just modify my code to print in HEX, and 7E1 configuration not 8E1, do you think that I can read data properly using the max485 which converts from rs485 to ttl ?
Thank you so much,
Daniel