Premise [download] Module: DoorMinder - intelligent monitoring of doors and windows

Motorola Premise
That's good. I saw your other post you deleted. I bet you forgot to copy the mdb file? I did the same thing when I first used 123's module ;)

It sounds like speach is working now?

Nope, didnt forget to load the .mdb file. This problem was also solved when I restarted the SYS service. What strange is that I could watch the web browser update, when I opened a door, etc, but it wouldnt speak. It appears to me that once you add a module, etc, you should probably restart the SYS service. Strange, but this seemed to have solved the problem.

Now that I know how it works, now Ive just gotta figure out if Ill actually use it :)
 
OK I have a new question. I have created the voice string for the Elk M1 for kitchen door, garage door, front door. I can get the reminder to play when the kitchen door is open, and the garage door, but cannot get it to play for the front door. I added a line to the Script, which I thought was appropriate, but obviously not. The line I added is in BOLD text.

with Devices.CustomDevices.M1_Panel.Voice
if this.IsOfExplicitType("sys://Schema/Device/doorsensor") then
.Kitchen_Door.Play = true
elseif this.IsOfExplicitType("sys://Schema/Device/doorsensor") then
.Front_Door.Play = true

elseif this.IsOfExplicitType("sys://Schema/Device/GarageDoorSensor") then
.Garage_Door.Play = true
elseif this.IsOfExplicitType("sys://Schema/Device/WindowSensor") then
.WindowLeftOpen.Play = true
end if
end with

Can I not add a separate voice message for each door, window, etc in my home?

Thanks
 
Your modified script does this:

If the object's type is a doorsensor, then play the Kitchen Door message
Otherwise
If the object's type is a doorsensor, then play the Front Door message
Otherwise
etc

Since your Kitchen Door and Front Door are both "doorsensor" objects they'll be handled by the first line in the script. In effect, the second section of code is redundant and will never be executed. Simply put, you can't test for the same condition twice.

This script example attempts to be generic because it plays specific messages based on an object's type. You don't need to use it and can simply do what you've already suggested: create a unique script for each individual object.
 
OK thanks for the explanation.
So then my next questions are

1. I need to add a script to each individual object under (in my case) Home > First Floor > Entry > Front Door > New > Script> Property Change? Is this where I add this?

2. I guess I then need to tell it that when this point is unsecure, then start a timer. Upon that timer expiring, and the door is sill unsecure, then play voice message xx? Repeat voice message every x minutes when door is unsecure?

3. I hate to ask this, BUT what would this script look like

Thanks
Brian
 
You've got the right idea but if you follow through with it, using scripts and timers for each object, you will essentially duplicate DoorMinder's core features and not require the module!

Here's what I suggest: continue to use a single script (activated by the module's PlayReminder property) and have it check the object's name, instead of its type. Here's what I mean:


Code:
with Devices.CustomDevices.M1_Panel.Voice
	select case this.Name
		case "Kitchen_Door"
			.Kitchen_Door.Play = true
		case "Front_Door"
			.Front_Door.Play = true
		case "Garage_Door"
			.Garage_Door.Play = true
		case else
			.Unknown_Object.Play = true
	end select
end with
The "case else" statement is a catch-all. If the "select" statement doesn't find a match for the object's name, it'll play the "Unknown_Object" message (you'll need to create one, of course).

So if you have a Home object called "PatioDoor", create an appropriate voice message called:
Devices.CustomDevices.M1_Panel.Voice.PatioDoor

and then add the following two lines before the "case else" statement:
Code:
		case "PatioDoor"
			.PatioDoor.Play = true


FWIW, if all you want to do is know when someone has opened/closed a door, and you have an ELK M1, don't bother with the DoorMinder Module and simply use the M1 for annunciation.
 
Thanks 123
I dont really care when someone opened the door, but would like to know if something was left open. My wife has a bad habit of leaving things open such as my garage door, and I just want to bug her with a reminder that its open.

I am starting to see how the scripts control the objects, but I still cant figure out where you get stuff like else, else if, case, etc. Looking through VBScript books, I dont see where this kind of stuff is noted. Im still reading, and trying to learn, its just gonna take me some time.

Thanks again for all the help, Im sure Ill have more questions as things pop up.

Brian
 
Hmm,
When adding that script to the door minders PLAY REMINDER, nothing happens, and I get a script sub system error. Any ideas?
 
Have you modified the script to conform to your Premise system? The script refers to devices and objects that may not exist like "M1_Panel" and "Voice.Unknown_Object", etc. What were the details of the error message (check Premise Events)?
 
Runtime Error in Script:
Error: Object doesn't support this property or method: 'Unknown_Object'
Line: 76
Text:

I have changed the code to reflect my object names, and my voice (Sentence) Names.

This is why my script looks like.


with Devices.CustomDevices.M1_Panel.Voice
select case this.Name
case "Kitchen_Door"
.KitchenDoor.Play = true
case "Front_Door"
.FrontDoor.Play = true
case "Garage_Door"
.GarageDoor.Play = true
case else
.Unknown_Object.Play = true
end select
end with
 
Like I said in my previous post:

it'll play the "Unknown_Object" message (you'll need to create one, of course).

Did you create a Voice item called "Devices.CustomDevices.M1_Panel.Voice.Unknown_Object"? If not, either create one or discard the entire "case else" choice from "select/end select".
 
Anyone know why this doesnt work?

with Devices.CustomDevices.M1_Panel.Voice
select case this.Name
case "Kitchen_Door"
.KitchenDoor.Play = true
case "Front_Door"
.FrontDoor.Play = true
case "Garage_Door"
.GarageDoor.Play = true
case else
.Unknown_Object.Play = true
end select
end with

Thanks
 
Back
Top