Multi Sensor


(Solardave1) #1

So I’m trying to use the multi sensor to determine open/close on the garage door. I’ve gotten some PM’s saying I can only do it with the magnet and others saying I can just mount the sensor and trip a smartapp based on angle change. Can I get a definitive answer from ST - can I configure it in the IDE for tilt and drive a smartapp or not? Thanks.


(Chrisb) #2

In the IDE change the type from SmartSense Multi to SmartSense Virtual Open/Close or SmartSense Garage Door Multi.

The Virtual Open/Close uses position to tell if the door is open or close instead of the magnet.

The Garage Door Multi does the same, plus it changes the icon to look like a Garage door and allows you to tap the tile as if it was a button. You can capture this button press and have it run programs:

/**
 *  Virtual Garage Triggers Outlet
 *
 *  Author: chrisb
 */
preferences {
	section("When a Virtual Garage Door is tapped..."){
		input "GarageSensor1", "capability.contactSensor", title: "Which?"
	}
	section("Trigger which outlet?"){
		input "switches", "capability.switch"
	}
}

def installed()
{
	subscribe(GarageSensor1, "buttonpress.true", contactOpenHandler)
}

def updated()
{
	unsubscribe()
	subscribe(GarageSensor1, "buttonpress.true", contactOpenHandler)
}

def contactOpenHandler(evt) {
	log.debug "$evt.value: $evt, $settings"
	log.trace "Turning on switches: $switches"
	switches.on()
    log.trace "Turning off switches: $switches"
    switches.off(delay: 4000)
}

(Solardave1) #3

But will it trip without a press? I.e., if the angle changes, will it be a able to send a signal to either action a switch or trip a smartapp?


(Solardave1) #4

Bump


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #5

The answer is YES, absolutely, as the Garage Door Multi is a substitute Device Type Handler which utilizes the Z-Axis angle to decide if the state is open or closed, rather than relying on the magnetic contact switch.

Feel free to follow-up with me for further info / clarification.

…CP / Terry.