Barionet + Elk M1

I like the idea of using the Barionet with the M1.

I am looking for example code to learn how to send and retrieve data with the M1. Please post some examples

I have a number of questions.
- How can I check the state of a zone?
- In the temperature example above what is the purpose of the "09st01500BA\r\n" string when it is written to the M1?
- Is there documentation on the M1 that details the data I can read/write over Ethernet?
- If I am connected to the M1 over Ethernet via ElkRP, does this block Barionet from connecting at the same time?
 
- Is there documentation on the M1 that details the data I can read/write over Ethernet?
You will need the M1 ASCII Protocol Manual for development. Everything else depends upon your having this information handy, and code examples will not be very useful without it. In addition, the "M1_SDK.exe" tool is important for diagnosis and debugging.

This is not difficult, but the Barionet has no "driver" for the M1, so you have to handle everything in BCL. Generally speaking --
- open a TCP connection with the M1 (I do this at Barionet boot time, and leave it open)
- send whatever ASCII strings over the TCP port to the M1 - these are no more or less complicated than the temperature example below, i.e., this is a simple dialog with no complicating headers, etc.
- wait for the response from the M1 and decode it
- in some cases, specifically where you have strings that can vary, you have to compute the checksum for your send string
- in all cases (highly recommeded) you should run a timer and retry or bail out if for some reason you miss the M1 response
- remember that the M1 will be sending messages to your program on its own, so you have to be prepared to act on them or discard them, and anticipate that they may be interspersed with your queries

- How can I check the state of a zone?
(1) The M1 will asynchronously (spontaneously) send a ZC Zone Change message every time a zone changes if you have enabled Global 36. Your program is informed of zone status immediately with these messages.
(2) You can query the status of zones as needed with the zs command.

- In the temperature example above what is the purpose of the "09st01500BA\r\n" string when it is written to the M1?
This is the request for the current temperature reading of the M1ZTS on zone 15. The M1 reply to this message will contain the temperature value.

- If I am connected to the M1 over Ethernet via ElkRP, does this block Barionet from connecting at the same time?
Yes. The M1XEP sends status messages when RP is connected and when the connection is ended. You can manage this situation by (1) keeping your RP sessions (or more accurately, your connections) short, and (2) having code that is robust enough to recognize and deal with these momentary interruptions.
 
If anyone is interested, I can post the code here.
@RHughes -

I know this is an old thread, but I'm hoping Randy's going to see this...

I, too, use an ISY. I'm looking seriously at getting a Barionet to integrate several water meters (offloading the running totals from the ISY using the Barionet's internal counters), a solar H2O controller (via RS-485) and an Ademco alarm panel via Nu Tech's AD2USB adapter (configured for RS-232, despite the name :) ). Obviously, the ability to use BCL to interface these into the ISY is key to this approach.

I'd love to be able to learn from your BCL programs to help bootstrap my own efforts.

Thanks in advance,
Peter
 
Back
Top