Page 1 of 1

converting my own Elk M1 script for Homeseer to Housebot

Posted: Sun Jul 02, 2006 8:55 pm
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!

Posted: Mon Jul 03, 2006 1:50 pm
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.

Posted: Mon Jul 03, 2006 3:57 pm
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.

Yes... It's possible!!!

Posted: Wed Jul 05, 2006 10:29 am
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

Posted: Wed Jul 05, 2006 10:46 am
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.

One for feature request...

Posted: Wed Jul 05, 2006 12:07 pm
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

Posted: Wed Jul 05, 2006 1:06 pm
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.

Posted: Fri Aug 04, 2006 4:13 pm
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,

Script Help

Posted: Sat Aug 12, 2006 12:10 pm
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

Posted: Sat Aug 12, 2006 7:42 pm
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.

Posted: Sun Aug 13, 2006 7:54 am
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

Posted: Sun Aug 13, 2006 9:13 am
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.

Posted: Mon Aug 14, 2006 12:18 am
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.