Anyone want a HS script made?

Squintz

Senior Member
If anyone needs a scipt made let me know. I am trying to get some practice so that I can be more fluent with HS and VBScript. Let me know what you need and i will take a stab at it.
 
Can't think of anything right now. But what would be really cool is if you do write one for someone, how about within the script you put comments like what something does and why. My scripting skills are minimal and would like to look inside one with comments such as that.

I know it would be a ton more work though..
 
I' will clean up the one i did last night and post it here. I was keeping good notes with it until I ran into a small limitation of the protocol. I wanted to send On and Off commands to multiple house codes using a single hs.ExecX10NoLog function but the protocol does not allow it to happen. In other words i wante to send A1+B2+C3 but the protocol onl allows for A1+2+3
 
I have attached the code to this post. If you have any questions or suggestions post the lines in question. I have to warn everyone reading my scripts. I am a new scripter so you may pick up some bad habbits from me. Learn from my examples at your own risk. The hardest part about learning how to program the right way is forgeting the wrong way.
 

Attachments

  • BellsBedTime2.vb
    6.7 KB · Views: 23
OK Squintz I'll take you up on that. I am working on my security system and finally decided on the logic I need whenever a device (door/window) is faulted.

This script might be good for other people who use say Homeseer to monitor their security system.

Code:
(This script gets triggered when Den Door (z11) changes its status.  In other words opens or closes)

z11 is Den Door
z29 is Armed Away (Alarm System Armed when nobody home)
z30 is Armed Stay (Alarm System Armed at nightime which bypasses motion detectors)

If z11 is on and z30 is off then speak "Den Door Opened"  (Speak only when not armed in stay mode)
If z11 is off and z30 is off then speak "Den Door Closed"

If z11 is ON set z11 device string to "Open" (instead of the default ON)
If z11 is OFF set z11 device string to "Closed" (instead of the default OFF)

If z29 is on then wait 10 seconds (entry delay time when system armed in away mode)  
If z29 is still on after 10 seconds (nobody disarmed the system) then run the "Device Fault" Subroutine below

If z30 is on (armed in stay mode) then run the "Device Fault" Subroutine below (want to run immediately with no entry delay).
	


"Device Fault" Subroutine:
	Play wave file (in Homeseer Directory) alert.wav
	speak "Den Door Security Fault, Den Door Security Fault"
	Turn Den Lights (device C10) ON
	Send Email to [email protected], [email protected], and [email protected]	
  Email Subject: "Security, Den Door"
  Email Body: "Den Door Security Fault"
End of subroutine

Edit: Additional Info.

If this is to trivial what would be really neat is a way to make just one script that would handle all the security devices for the above conditions. In other words, right now I would have to create an event for each zone and trigger the script when the zone changed state. Well I have 24 zones. What would be better is to have one script which triggered on any zone change and extract the needed info into the above logic.

Now this would be VERY handy for anyone who had a security system monitored by Homeseer.
 
I saw your post on the HS board squintz. Also say the bad news :huh:
I'll look at it tomorrow. Getting kind of late now.
 
Haven't figured out how to automate that yet. For now I just yell out to my 5 year old son. He'll grab me a beer and himself a sippy drink.
 
I'll try and take a stab at that BSR. I dont have a security system monitored by HS yet so i will be working blind but i should be able to figure out something from your logic above.
 
BSR,

Can you give me a complete list of all your Doors, Windows and other devices you want monitored along with their House and Device codes. I am going to use my Laptop to setup another HS enviroment. This way i can visualize what it is your want and also so i can test the script as i am writing. Also if there are any wav files that you want upload them so i can use them.

Once i get some code started im gonna start another post so that you can keep track of the progress. This sounds like its gonna be a fun script to write.
 
You are asking someone to post the house and unit codes of all their security devices? :huh:
 
BraveSirRobbin said:
<snip>
This script might be good for other people who use say Homeseer to monitor their security system.
<snip>
Not to rob this thread, or steal thunder from Squintz...

But I have it from an extremely reliable source that that there will be a new plug-in for the Caddx alarm very soon. (probably 4-6 weeks) I can assure you this plug-in will be very feature rich and have a TON of options. Nothing like the current one, which in my opinion is more of a script than a plug-in (no offense to Nitrox)

The author has written many plug-ins for HS and in my opinion is one of the better plug-in authors, and I have to admit I am a tough critic on software.

:huh:
 
Hmmm, well its your call Squintz, but maybe we should wait a little on this one.
Maybe you could just do the script for the first option (the one where I will just create an event for each zone).

This is exciting news sbessel. I have used Nitrox's plugin for a long time and it was bulletproof! The main reason I even have Homeseer is so I can use the Caddx Plugin by Nitrox, the mcsOcelot plugin my Michael McSharry, and the Main Lobby plugin by Krumpy.

So you are saying Nitrox will NOT be the author of this plugin? Will this plugin will be dedicated to the Caddx security systems (especially my NX8E model)? Will the plugin really be out in a month or so? Also, one advantage Nitrox's plugin has is the price, FREE! I don't know if this will be the case after the new plugin pricing structure is in place for Homeseer though. What will be the cost of this new plugin?

Regards,

BSR
 
sbessel said:
But I have it from an extremely reliable source that that there will be a new plug-in for the Caddx alarm very soon. (probably 4-6 weeks)
Do you have any inside knowledge if this will be a free or paid plug-in?
 
BSR I am going forward with the Script anyways. I need the practice. I keep learning programming languages and then i dont use them so i forget them. I am determined to become fluent in atleast one language even if its a scripting language. I figured since I can use VB script in places other than HS I should just practice that.

Once done the script you can test it for me and let me know how i did. It wont hurt my feelings if something better comes out because i will have gained experience from writing it.
 
Back
Top