Premise Learning Premise

Motorola Premise
OK I created two home objects that are appliances(Relay Device). When I arm the elk, the home object changes from false to true, so they appear to be working.

So now, I dont know how to create scripts as I dont know VB (I know i need to learn)

Also, where do I create and store all my different emails?

Any help again would be appreciated!

Thanks
Brian

OK another issue with adding things to home is that they show up on the browser screen. Anyway to add these outputs somewhere else so they dont show up on the main screen of the browser?
 
Right click on one of the home objects go to New Script -> Property Change. Now double click State since you want to write a script when state changes.

Type a single ' inside the OnChangeState script.

Now paste this code on the next line under the '

Code:
with Devices.CustomDevices.SSMTP
			.MailSubject =  this.Name & " is disarmed."
			.MailHTMLBody = this.Name & " was disarmed by xxx"
			.MailSend = true
end with

Lastly, hit the commit to server button found near the top of the window. Looks like a little yellow arrow pointed at a box with lines of text behind it.
 
OK another issue with adding things to home is that they show up on the browser screen. Anyway to add these outputs somewhere else so they dont show up on the main screen of the browser?



For each object you put under home, look in the properties window on the right. You'll see a property called 'navigation', with the value 'default'. Select it (its a drop-down box), and set it to hidden. Now look at your browser window. You'll see the device is 'gone'. Yet, all of the functionality will be accessible. Very useful for working with objects that don't need to be seen by the users....
 
Thanks
You guys are awesome!
I can see how the name of the object or whatever is constructed in VB, just dont know all the ' and other formats needed. Still need to learn that!

So the other question is this, WHERE do I create all the different email messages? Do I need to create different SMTP objects, or do the scripts take care of that and use the single SMTP object?
 
Yes, "the scripts take care of that and use the single SMTP object."

' just means there's a comment on this line. The initial ' is so Premise won't delete the onchangescript if you navigate from it and the script contains no text.
 
OK, So if I use the ' mark, I can type anything after it as notes?

or does everyline need something?

Next Ive got to try and tackle the script that 123 kinda gave me hints on. the one so if my garage door is left open after the house is armed and 3 minutes has passed, it sends me an email. I just dont know where to start? I guess I need to do something like this?
1. Look at the state of the alarm system for that zone
2. If the zone is armed or 0 then start a timer and let it run for 3 min.
3. If the garage door closes within that 3 minutes, and that door sensor become true(secure), then stop the timer.
4. If the door sensor is false(unsecure) after the three minutes, then send an email?

I think Im on the right track, just not sure how to start it, or what commands to use in VB. I looked online tonight for a tutorial, but didnt find anything that I thought would help me. Anyone got any resources?

Thanks
Brian
 
OK got the email to send with the garage door. I ate up 2 outputs in the ELK rules, but oh well, Ive got 208 of them available, and am only using 4. Hmm, the possibilities! Still gotta learn VB, I think it will make my life easier. Also need to learn all these classes, and what alot of these things in Premise do.
 
So Im looking at this VB Script online tutorial. It doesnt seem to be the same from what Im seeing here in Premise. Am I missing something? Does anyone have a reference for the type of scripting here in Premise?

Thanks
Brian
 
The syntax used in Builder should be the same as vbscript, but the classes Premise uses will be unique so you need to study both. I don't have a good reference, but if you google vbscript (one word, not two), something should come up. If you're typing two words, you are probably reading a tutorial on how to script in VB (visual basic). The syntax is different compared to vbscript depending on the version of VB, so make sure it says vbscript :)

Disclaimer:
I'm not a programmer so I could be wrong...
 
Back
Top