I have an Elk M1 security system that I like to monitor and record all the activity. It’s useful to know what doors are open and how long they have been open. For several years in the past I have use Homeseer to do the monitoring where I wrote VBScript files to push the activity and changes to my MySQL server. Honestly, I have never likes Homseer, it’s flaky and I prefer that I don’t depend on WinXP either.
About a year ago, James Russo released a script on Cocoontech to monitor and control your Elk M1 from a perl script. You can read the forum post for more details. Thanks to James and other Cocoontech members, it works fairly well.
But there have been no updates or bug fixes in over a year. Not wanting to relive my perl days (sorry, I never really liked perl), I decided to revive the project and give it a new home. I asked James for permission to take over the project and he gracefully agreed.
ElkM1::Control New Home on Github
Go check it out! ElkM1::Control on github.
Why github? First, I have stopped using SVN. And sourceforge, ElkM1::Control’s original home, doesn’t support git. Second, github makes it too easy to fork a project and make changes yourself, then push them back up so that I can integrate those changes. You really should try git if you haven’t before. And you don’t need git to download ElkM1::Control and install it.
Updates and Bug Fixes!
You read that right, I have made a few bug fixes and added a couple of new features. I have been running ElkM1::Control on my Ubuntu Hardy server for about a month with no problems. I have also run and do some debugging on OS X (10.5.x).
I also changed the version numbering system to the more common major.minor.release notation. We are not at version 0.1.0.
Quick Installation Instructions
- Goto the project home page and click the download button. Select the ZIP version (for some reason the TAR doesn’t work sometimes).
- Follow the README file, don’t forget the PREREQUISITES section. For those who don’t rtfm…
- From your favorite shell, you may need to add sudo in front of each: ‘perl Makefile.PL’
- ‘make’
- ‘make test’
- Then to install: ‘make install’
Next, you’ll need a little script to get going. There are several scripts posted on Cocoontech, but this one should get you started:
[source lang=’php’]
# Example 2: Display all M1 messages
use ElkM1::Control;
my $elk = ElkM1::Control->new(host => ‘192.168.0.251’, port => 2101);
while (1) { # Loop forever
while (my $msg = $elk->readMessage) { # Read the M1’s messages
print $msg->toString; # Print the messages
}
}
[/source]
Glad to see the project get some legs! Please keep it going. I hope others find it useful!
[…] received a request a couple of days ago from someone who saw my posts on the Elk–Control perl library that I took over responsibility for. I had mentioned that I logged every Elk event […]
Hi-
Looking at the script. There is one thing I can’t find – how to set the access code for the M1. Any ideas?
@Elmars:
You don’t set an access code. The script is accessing the M1 through TCPIP. You can choose the secure port or non-secure port. I use the non-secure port because everything I have is behind a firewall.
I’m not sure the secure port access works as I have never tested it. But I’m sure the non-secure works well.
BTW, you set which port you access the M1 through with the Elk software, ethernet module.
Silly me… If you can’t check spelling mistakes in the script, you shouldn’t do programming! It does not need the access code…