converting my own Elk M1 script for Homeseer to Housebot

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
electron
Member
Posts: 4
Joined: Thu Jun 29, 2006 2:03 pm
Contact:

converting my own Elk M1 script for Homeseer to Housebot

Post by electron »

So I decided to take another look at HouseBot now that it is seperate from Meedio again, and realized that HouseBot supports VB scripting.

I currently use Homeseer, so I wrote my own driver (VB script) for the Elk M1 system. Most of the functions are just VB functions, but others, such as the serial port opening/processing are Homeseer specific, so I would like to see what others think here about how hard it would be to convert this script. You can find it here:

http://www.cocoontech.com/index.php?showtopic=2353

Thanks!
CocoonTech.com
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I just finished integrating the ELK M1 using vbscript for HouseBot. I handles just about all ELK M1 functions and more. PLC codes are not supported since I don't use that.

By looking at your script, I see that we are coding a bit differently and there is some stuff I don't recognise. Not sure if you can port this easy to HouseBot or if it is easier to start over. My script should be pretty alround however it does use many properties and has some specific code to suit my own needs.
electron
Member
Posts: 4
Joined: Thu Jun 29, 2006 2:03 pm
Contact:

Post by electron »

I guess I will have to try to locate the scripting documentation and see how things are done. At least it looks like it is possible.
CocoonTech.com
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Yes... It's possible!!!

Post by Timoh »

So I pretty much am working on the same thing for my caddx panel. I was on homeseer before and decided to find something else mostly due to price & interface. HS was just getting expensive and really had no nice interface.

I find Housebot much more powerful in how you can design your tasks, devices, etc. Very very flexible and the ability to design your own themes is exactly what I wanted.

For HouseBot, the serial interface is handled through Housebot not directly through a script or a seperate call. In HB, I created a generic serial interface for reading and writing to the com port. From there, I created a device based on the generic serial interface. This device receives the serial data from the caddx panel. I have a script the executes everytime new data is received. The script reads the value from HB, parses it and sets the appropriate property values in a null device such as zone status, armed, etc.

Sending serial data is just as easy. On the Generic serial interface you can either hardcode the commands (ascii or hex) you want to send over the com port or you can include property values from HB.

I suspect most of the porting you will have to do will be to read/write the serial data from HB. Other than that, I suspect it'll be fairly easy to port. (Actually thinking about it further, you can still do your serial port stuff in your script and just set the properties in a null device in HB. You wouldn't even need the generic serial interface if your script can do com stuff standalone.)

Tim
electron
Member
Posts: 4
Joined: Thu Jun 29, 2006 2:03 pm
Contact:

Post by electron »

I have been doing some experimenting during the last few days, and looks like the generic serial device is the easiest way of dealing with incoming data. Not sure yet about sending commands, looks like I will have to create a property, and then monitor it using a task. My script also stored a bunch of settings in a INI file, but I don't see any internal support for INI files, so properties would be the next best thing. It would be great if there was an internal function to create new devices/properties to make setup more user friendly.
CocoonTech.com
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

One for feature request...

Post by Timoh »

Yep.. I agree that it'd be very useful to create properties from scripts. I only have 24 zones in my panel and ideally would like to create boolean properties for each state Faulted, Bypassed, Last Alarm. But that would give me 72 properties to manually create! It'd be nice to use a "CreateProperty" function to do it.

If I store my states in a single property per zone, then I have to test for stuff like

If Zone1="Faulted" or Zone1="Faulted-Bypassed" or Zone1="Faulted-Bypassed-Last Alarm" then
Do something

Just to check to see if a door was opened ir PIR sensor was tripped!

Tim
electron
Member
Posts: 4
Joined: Thu Jun 29, 2006 2:03 pm
Contact:

Post by electron »

I guess you could store the zone status as a numeric value, then you could use the "greater than"/"less than" condition to trigger alarms. Of course, it won't look as pretty. I have 16 zones, and use tons of outputs, so I need to figure something out for sure.
CocoonTech.com
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Richard Naninck wrote:I just finished integrating the ELK M1 using vbscript for HouseBot. I handles just about all ELK M1 functions and more. PLC codes are not supported since I don't use that.
Hey Richard, would you be willing to share your script? I just got an M1 and was looking into integrating it with HB too...

Thanks,
lazyone
Member
Posts: 2
Joined: Mon Aug 07, 2006 1:12 am

Script Help

Post by lazyone »

OK - I'm new to Housebot. I would like to run the Elk script to monitor and log my Elk contacts and TS temperatures.

I installed Richard's Elk script as a script device, after that I am lost. Can someone give me a basic outline of what is required to have the Elk script monitor and log my Elk devices.

Thanks,
lz
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Required is a NULL device with all the properties that go with it.

A theme panel would be nice to be able to see what is happening and to produce some form of control.

Setting up the global variables in the beginning of the script to your own settings.

Basic knowledge of housebot is probably the most important one.

I could probably set it up with you, but I would like to do that in a separate thread so others may join in and look up later how it was done.
I won't be writing a complete 'howto install' guide because I don't have the time. I do have time however to answer questions and help with other stuff.
For starters, you can send me a PM with your email address and I will forward you two extensive mails I wrote to Alan Cheslow concerning installation of this plugin. If you would, start a new thread to discuss this topic.

And finally; this is not going to be very easy if you are new to housebot I suppose.
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Somewhat of a general question- it seems pretty easy to export a device that can then be read in so that people don't need to re-create all the properties. . . is there some reason that this isn't done when posting a script?

Thanks

Markd
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I guess that could be done, however the section we talk about is a scripts section and not a plugin section. Getting lots of scripts to work which are not meant to be a generic plugin just won't work because of all the integration of own specifics into the script. Meaning the script won't work if you have lots of other things running in your setup as well. The alarm script is pretty generic, however the null device is setup for my own needs. It carries my amount of users, zones etc etc. If lots of these scripts need to become generic so other may use them, some extra work needs to be done.
lazyone
Member
Posts: 2
Joined: Mon Aug 07, 2006 1:12 am

Post by lazyone »

Richard -

Thank you very much for the offer, but it sounds like this may take more time than what I have at the moment. Hopefully, someone else will take you up on this offer.
Post Reply