Updated the code to support the new ST App MultiTile User Interface. Now it shows the garage door status and level sensor battery status on the Main Tile.
Updated the layout and features and color coded the battery status.
@Ron I grabbed your code from github and Iām getting an error when I try to create the smartapp.
No signature of method: script1443374689069930624990.metadata() is applicable for argument types: (script1443374689069930624990$_run_closure1) values: [script1443374689069930624990$_run_closure1@4b13b986] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
Sadly it doesnāt seem to show where the error is in the code so Iām not sure what to change.
Iāve got a NGD00Z Garage Door Controller and HOPING this code will fix my problems. Iām REALLY looking for something to monitor my Garage Door being opened, if itās open for over X amount of time, close the door and send me a text. Some of the code Iāve found works SOMEtimes but not everytime, not even over 50% of the time which kills me.
If I need to buy another āactiveā sensor I will but Iām getting desperate to get this working. Weāve already ālossā (stolen) a 500$ bicycle cuz the door was open.
Itās not a smartapp, itās a device.
ide->my device types->+New Device Types
From Code Tab
Paste code
save
Ahhh perfect, so now that itās published what do I do next? Sorry still VERY new to all this, as my other post stated iām looking to automate the door as a CYA. I went ahead and ordered a Ecolink z-wave wireless tilt sensor after reading that this sensor for this GD00Z is not an active sensor but more of a passive sensor.
Just really need to make sure itās notifying us / closes the door, one of the drawbacks to living is a less than great neighborhood.
Hmm looks like it took some time but finally updated the Garage Door control screen on my mobile. I now have a āpower likeā button that goes with the door being open/closed.
No problem, this stuff it tricky
You then need to change the device type for your door.
-My Devices
-Click Display Name of your Garage Device, to open device page
-On device page click āEditā
-Select āDevice Typeā dropdown and pick āRG Linear GD00Z Garage Door Openerā (unless you renamed it then select that name)
Done and DONE! Yeah Iām kinda keeping track of what I do, once I get it working constantly with automation I want to do a āComplete N00bie Guideā to getting it working. Most of the time you just need to spoon people once then theyāll 1) understand a lot clearer 2) able to do more things which in turn helps grow the product.
I assume that NOW that I have the Device setup I need to find the corresponding SmartApp to load. The two working together will allow full functionality?
Thank you for your replies, it has helped me a lot already!
This might help:
You are correct.
I have two but any smart app that controls a Thermostat should work.
Set ZXT-120 based on schedue.
Set ZXT-120 based on temp.
Sweet making progress!
Using your Device Code + Loaded the Ridiculously Automated Garage Door template, from there I modified the doorOpenCheck. Looking at the code I didnāt want to kick off the doorClose() operation until AFTER the first messages fired, once all of those actions are done I then added the modified code to shut the door.
CODE
def doorOpenCheck()
{
final thresholdMinutes = openThreshold
if (thresholdMinutes) {
def currentState = doorSensor.contactState
log.debug "doorOpenCheck"
if (currentState?.value == āopenā) {
log.debug "open for ${now() - currentState.date.time}, openDoorNotificationSent: ${state.openDoorNotificationSent}"
if (!state.openDoorNotificationSent && now() - currentState.date.time > thresholdMinutes * 60 *1000) {
def msg = "${doorSwitch.displayName} has been open for ${thresholdMinutes} minutes"
log.info msg
if (location.contactBookEnabled) {
sendNotificationToContacts(msg, recipients)
}
else {
sendPush msg
if (phone) {
sendSms phone, msg
}
}
state.openDoorNotificationSent = true
}
}
else {
state.openDoorNotificationSent = false
}
/### Code to close door if itās left open./
closeDoor()
log.info "Closing ${doorSwitch.displayName} has been open for ${thresholdMinutes} minutes"
sendPush(āClosing ${doorSwitch.displayName} has been open for ${thresholdMinutes} minutesā)
/### End of Code to close door if itās left open./
}
}
/CODE
So far iāve tested with phone opening within the ST app, opening with using the button. Also confirmed that if something prevents the door closing (breaking the door beam) it will try to close the door after the next doorOpenCheck runs again.
So far so good! Going to continue to test until my neighbors start wondering WTH Iām doing with the garage door.
Can someone post the finalized code so I can use it once I get the device.
Thanks
ditto!
Please post the final code!
Folks this code is available on the RBoy server at http://smartthings.rboyapps.com
This is a paid service which gives you access to all of our the apps/devices. It is not free to redistribute. There are other versions around the forums (as you would have seen), this one is actively maintained by my and my team.
Please refer to the first post for details:
How did your final tweaks come out? I would like to try this out if you think it has been working well for you. I was thinking how do keep the garage door open if you wanted to override the software timer completely and put it in manual until I manually close it? For example I am working/cleaning out the garage which is normal so I want to completely override the timer from closing the door and in effect keep it in manual mode.
My version can be found here. Itās free. And is maintained by me and ⦠my dog
Iām using a Rons driver code for my door and itā's been PERFECT! Iāve added to the SmartApp the ability to Auto shut or not the door. So if Iāve gotta keep the door open longer I can turn the auto shut off.
I added the code to my Noob guide. N00bs guide to ST & GD00Z (Garage Door Controller)
Also I found that getting an more āactiveā sensor helped make sure the door was shut or open. Ecolink Z-Wave Wireless Tilt Sensor - ECO-TILT-US Itās only 32$ on amazon, since I got that iāve had zero problems with the code / sensors / door controller.
If you want to keep the door open, just change the setting in the SmartApp, when youāre done change the setting back and it will start doing the checks, the SmartApps seem to handle live changes without a problem.
@Taco Thank you , Thank you !! As a newbie to ST, I truly appreciate the simple steps you lined out so well.
Thanks for the device Ron, but I have a question. what is the outlet icon/button for? All I can see is that toggling it will open the door.
This lets you use the ādoorā as a āswitchā. In other words if you have a smart app that only controls a switch you can control the door using that app. It is just a convenience feature and can be safely removed/commented out.