How to get started if I want to program it myself...

fjc

New Member
Hello, first time poster here, so be gentle. :)

I'm looking to replace my current monitored alarm system with something with more capabilities, and that I can grow into a more expansive home automation system. I'm in the computer field by trade, and I'd like to write my own system to operate everything. I know there are fairly robust systems out there that will let me program them in their proprietary ways, but I want to do this all via Visual Basic and/or C#.

My first priority is alarm system. My existing system is all hard-wired to a box monitored by a service. What I'd like is some sort of system (ELK? Something else?) that can handle both hard-wired and wireless sensors (no sense wasting the good hard-wired door sensors). I'd like to be able to query the status of those sensors from my program, and send commands to the alarm system from my program. It's fine with me if I had to do SOME proprietary programming within some other system, but I want my separate application that I code to be able to interface with that system.

An example - if a door were opened, I'd like my application to be able to know, then based on the day/time text-message my cell phone. I could then decide if I wanted to set off the alarm by texting a command back to my application, which would then command the alarm system to sound an alarm. (Granted, a goofy example - I wouldn't necessarily want all that time to pass between a door opening and text messages flying around, but you get my point).

Later on I'll want to expand this with Insteon/X10/other home automation items.

Any suggestions? Will Elk with the tcp/ip add-in board do this, or something else that would be better?
 
Well I would suggest using a hardware based system for your alarm. The Elk is a great choice and lends itself to the DIY world with their support and documented protocols. I use Girder 5 myself for my home automation package which has a very robust Elk plugin available. You could write your application to interface with the Elk and the rest of the world. That pretty much what I do with Girder. Netremote allows me to have a very nice GUI interface for the Elk on my ELO touchscreen. Again you could do anything you want.
 
If you like to write in Visual Basic, check out HomeSeer. It has a VB.net backend and you can write custom scripts for your own apps.

There are already some interface apps for the Elk M1 as well as other security brands (such as the Caddx).
 
My perspective as an old programmer...

John is right, the M1 plus an automation system is a powerful combination and you don't need to invent anything. But if you insist on going it alone, you can link the M1 to your system with a serial connection or (more likely) via IP with the M1XEP. The M1 defines a robust set of strings to communicate conditions and accept commands (see the ASCII protocol manual).

Before you buy, you can readily see what the M1 can do on the control and security side just by spending time with the documentation. On the programming side, however, you don't really know what you're getting until you get the M1 installed. The automation language is rather thinly documented except in the ElkRP app (though I have tried to document it in the below post).
http://www.cocoontech.com/index.php?showto...ost&p=92718

In summary, the M1 has a programming space made up of "rules." The M1 will do a range of "WHENEVER condition occurs" AND "another condition exists" THEN "do list of actions." You can do a lot with rules but, generally, for anything more than simple trigger/response, you have to go outside the M1 itself. In particular, from a programming perspective, the M1 lacks any sort of higher-level functions, such as calculation ability or indexing. Internal storage is limited basically to a number of counters, "outputs" and timers, text strings are provided but are fixed, and the manipulation of these elements has some omissions that some of us think should be in there. In short, if you don't expect any high-level functionality from the M1 itself you will not be dissatisfied.

This is not a criticism on the M1, which I am happy with and have always said so. The M1 "does what it does" appropriately, and very well. This is just a level-set so your expectations are reasonable and you can do your research and planning in the right direction. Not to mention your time budget.
 
Are you the person who posted the same question on AVS Forum? If not, have a look here for additional answers.

I also recommend using the ELK M1 as the automation controller ... but then that'll be a common recommendation given that this forum attracts many ELK users. :) You'll also find several examples of M1 drivers, including source-code, that'll give you a head-start with the development of your custom application. Good luck!
 
Thanks for the info!

So Lagerhead, it sounds like what you are saying is that the M1's programming language does a good job, but as a programmer I'll find it frustratingly lacking in some areas. This is exactly why I want to "go it alone" and write my own home automation/security application that interfaces to it (that, and because I just want to).

I'll likely want to let the M1 handle some basic stuff - like basic "if the alarm is on, and someone enters a valid keypad code, shut if off." But I'd like the system to let my application know about that event happening. Because I may want to program something special that happens depending on various circumstances. An example - when my kids come home from school (and enter their alarm code), I may want my application to text-message me that they're home. That's a simple example that could likely be handled by the M1's language, but I'm just trying to get a feel for what I can do.

Looking at that ASCII protocol manual will be of help; unfortunately I'm getting a "500 Server Error" trying to get to the Elk products website at the moment. Does the M1XEP send out messages to announce events that my application could pick up on? Can I use that to query the M1 from my application and check a status on a sensor?
 
Does the M1XEP send out messages to announce events that my application could pick up on? Can I use that to query the M1 from my application and check a status on a sensor?

The answer is yes to both questions. Most (but not all) of the M1's activities are broadcasted (assuming you configure it to do so). Some of my experiences developing an M1 driver are documented here:

http://www.cocoontech.com/index.php?showtopic=9899
http://www.cocoontech.com/index.php?showtopic=9558
http://www.cocoontech.com/index.php?showtopic=9981
http://www.cocoontech.com/index.php?showtopic=10162
http://www.cocoontech.com/index.php?showtopic=10373
 
If I am allowed to promote my own product here I would like to give another option.
My series of I/O boards (www.brightan.com) would allow you to have from 1 to 127
boards, each automatically networked together, and each board allows you to choose
the firmware that it runs, which, in turn, configures the I/O pins for different functionality.
With a USB interface, all of the data on the network can be read and written by simple
DLL function calls from your choose of language, VB6, C# etc. It only takes a few lines
of code to get started because the DLL does all the work.
If you are so inclined, you can even write your own C code to run on the boards if
you wanted to create some custom interface to peripheral hardware that I don't current support.
(this would require a C compiler for the Freescale HCS12 processor - $249)
I don't have my website complete so it is still lacking the SDK pages but if there is
something there that interests you, please feel free to contact me. Also, I have a
CQC driver if you decide to switch later on.
 
It sounds like what you are saying is that the M1's programming language does a good job, but as a programmer I'll find it frustratingly lacking in some areas.

Yes. Within the M1 security/control scope, this language has reasonable power.

I'll likely want to let the M1 handle some basic stuff - like basic "if the alarm is on, and someone enters a valid keypad code, shut if off." But I'd like the system to let my application know about that event happening. Because I may want to program something special that happens depending on various circumstances.

Exactly. And you are expressing one good reason to use rules to handle the security functions and other critical situations -- the M1 is tested, power-supply-safe, largely bulletproof, and overall dependable. If your server or app fails, you can still count on the Elk where it matters most.

Looking at that ASCII protocol manual will be of help; unfortunately I'm getting a "500 Server Error" trying to get to the Elk products website at the moment.

It seems the dealer portion of their website is (or was) down.
 
I too am in a similar position as the OP, however, I am not a programmer. I thought it best to piggyback on this thread rather than start another thread. If its best for me to start my own thread, Mod please advise. I was pointed to this forum by one of your members so decided to give it a try as I need help.

I currently have Networx Nx6 security system and planning to buy my way out of the contract with provider (local+crappy service) to go with another option.
I've seen mention of Elk M1, Homeseer and CQC and I know these are more for automation than mere security, though I want the functionality they offer. My home came with the MX6 system installed and I am assuming I get to keep the hardware when I ditch the provider. One option is to get a cheap provider like Comcast then get one of the aforementioned to take over. What do you guys suggest is my best move, I want to end the contract as soon as I have a plan in place.
Is the learning curve for Elk M1 steep? Can I use this or other automation software if I decide to use Comcast as provider?
 
... One option is to get a cheap provider like Comcast then get one of the aforementioned to take over...
What is your goal?
  1. Switch to a less expensive monitoring service.
  2. Have Home Automation software interact with the Networx NX6.
  3. All of the above.
 
... One option is to get a cheap provider like Comcast then get one of the aforementioned to take over...
What is your goal?
  1. Switch to a less expensive monitoring service.
  2. Have Home Automation software interact with the Networx NX6.
  3. All of the above.
All of the above... kinda. Not necessarily cheaper option, just want to add automation functionality and really want to get rid of the provider I am using now. Terrible service. As for the NX6, if they let me keep it, then I will build on it, if not, then I replace, hence the need for suggestions.
 
fjc - don't take this the wrong way... but it sounds like you're entirely optimistic or young and have more time than money on your hands... Writing your own system can be fun, but with everything going on in your life, do you have 1,000 hours to devote to this, or would you be better off with 100 and moving on to the next most important thing in your life?

Of course, if I had more time than money, I'd like to write my own - but in my life, that'd take 4 years minimum... I'd rather pay $300 and be up and running this weekend.

Just another perspective - I mean no offense.
 
fjc - don't take this the wrong way... but it sounds like you're entirely optimistic or young and have more time than money on your hands...
Just another perspective - I mean no offense.

LOL no offense taken. I'm 44, been in the computer field all my life (heck I even worked for Microsoft for 5 years). I'm fully aware that I could plop down some cash and get something very good running in a few days.

The reason I want to do this is manyfold - the two main reasons are for the flexibility it'll give me, and for the challenge. I don't want to completely write everything from scratch - if I did, I'd just be looking for some I/O controllers and wire my sensors directly to them. I'll let something like the Elk handle the basic functionality, but I want to have my custom programming handle the higher level functions and other home automation stuff.
 
Back
Top