Questions on GE/Jasco switches?

Okay, two question here:

First, can SmartThings, using an app, set a level on a GE dimmer? I know that GE/Jasco is somewhat limited in terms of communication to the Hub because they don’t using the Lutron license/patent, but I think I can still tell it to turn on to a certain level.

Second, can GE/Jasco do a double tap? It seems like it can because if I double tab a switch it does NOT turn on or off. But the one program I’ve tested it with does not respond to double taps. Just wondering before I do too much trouble shooting if this is possible with GE/Jasco.

Yes, you can set the dimmer level in an app with .setLevel(percentage). There’s also a slider in the device details, though it can be hard to use in its current form.

I think some people have had limited success getting double tap to work with Jasco switches, but it doesn’t work very well. The switch would at least have to be in direct range of the hub (not routed through the mesh) since they don’t actively report.

I’ve been asked to write a review of smartthings for a HA publication but in the mean time I would suggest directing your questions to supporrt@smartthings.com to get an official unbiased answer.

Thanks for the info @duncan .

A related question to the .setLevel(percentage)… What I’m looking to do it program my hallway light by my bedrooms to turn on if motion is sensed between like 10pm and 5am but at a low level, like 10%. Basically as a night light in case I get up to use the bathroom or something and I just want the lights on dimly. Then after a few minutes the lights will turn off by themselves.

But what I’m wondering now is if that dimmer-level is saved. If when I get up at 6:30 to start my day and I turn on the switch, will the lights go to 100% or will they go to 10%? I suppose related to that, does the setLevel turn on the light or only set the level? Could I do this:

switch.setLevel(10)
switch.on
switch.off(delay: 30000)
switch.setLevel(100)

Would that leave the switch off but set the level to 100% for the next time the light was turned on?

-=-=-=-=-=-=-=-=-=-=-=-

As for the double tap part, I’ve had success with this on two different switches I’ve tried… or at least some success. I’ve modified the example Double Tap program in the Demo area so that when I double tap ‘on’ my switch at by backdoor it activates my garage door outlet to open or close the garage door.

The problem is that because GE/Jasco doesn’t report back you can’t do what I suspect is the traditional double tap. Like I indicated above if I do two rapped tabs the switch doesn’t act as if it’s been turned on or off. I think the switch is recognizing that it’s been double tapped and knows it needs to respond differently to this. But because it isn’t allowed to respond to the Hub re: physical activity at the swtich (stupid Lutron patent), the hub never knows this happened.

However, the demo app seems to take this into consideration. If I tap-pause-tap rather than tap-tap, then the Hub see this and the program can read it. The program appears to be looking for a sequence of turning on twice in a row or off twice in a row in a short period of time. So instead of doing a double tap, I’m turning on and the switch, and then turning on the switch again. The Hub can see this and therefore the program and use this interaction.

There are two problems with this though: First, because dimmers don’t respond/report properly to the Hub when they are turned off. Double Tap off will likely fail. On/Off switch work. I haven’t tried dimmers, but I suspect it won’t work.

Second, because the switch is seeing two ‘on’ or ‘off’ commands in a row it thinks it’s being turned on. Where as a tap-tap does not turn on or off the switch it’s done on, tap-pause-tap DOES turn it on or off. In my case of my garage door I don’t want the light turned with the switch that I’m using. I had to add a command to turn off the light in my double-tap program.

The on/off state and level aren’t independent, unfortunately. That setLevel(10) command will turn the switch on, so the next switch.on() is unnecessary. Then the switch.setLevel(100) would fire right away because it’s not delayed and set the level to full brightness.

What I would try is to do both after the delay:

def turnOn() {                     
  switch.setLevel(10)              
  runIn(30, "resetLevelAndTurnOff")
}                                  
                                   
def resetLevelAndTurnOff() {       
  switch.setLevel(99)              
  switch.off()                     
}                                  

It might be annoying to briefly shine the light brightly before it turns off, but this is the only reliable way to set the next-turn-on level.

I was afraid you were going to say that. Yeah, I think that’s what I’ll have to do, just turn it up to full brightness, then turn off. As long as I do it long enough after that would be enough time to get up, visit the bathroom, and then get back into bed. Not a big deal really.

Question: I know that (delay: xxxx) is milliseconds, ie (delay: 1000) will delay one second. What does the runIn count at? Does the 30 in your example = 30 seconds, milliseconds, or what?

Another thought I just had: Does physically turning on the switch and software-wise turning on the switch count as different activities? For example, if I wrote a program like this:

preferences {
    section("Turn on switch to 100%?"){
		input "switch", "capability.switch"
    }
}

def installed()
{
	subscribe(switch, "switch.on", switchOnHandler)
}

def updated()
{
	unsubscribe()
	subscribe(switch, "switch.on", switchOnHandler)
}

def switchOnHandler(evt) {
 	switches.setLevel(99)
}

Would a smartapp turning on the switch trigger this app to run?

Yeah, runIn takes seconds whereas the command delay parameter is in milliseconds. It’s annoying.

Your switch watching app might work. You can try checking if evt.isPhysical() in the switchOnHandler – the undocumented method .isPhysical() is supposed to return true when the event originated from the device not SmartThings. Since the GE/Jasco switches don’t report state changes properly, this will only work if the switch is in direct range of the hub, otherwise we don’t get the switch change event until we poll the switch.

I modified the “Light Follow Me” app to allow a Setlevel command. The way I use it is when the mode is set to “Home” I have it maxed at 99 brightness. But, when the mode change sto “Night” the level will change to 10%. It requires a motion sensor, but it is nice in that it will not turn on the lights when the mode is changed like some others.

Then when the mode is changed to “Home” it just resets the level at 99 (you have to install the app once for each mode you want to use it in). Make sure you only put the dimmers in the dimmers box and no both the “Turn on these lights” and the dimmer section though.

/**
 *  Light Follows Me
 *
 *  Author: SmartThings & CoryS
 */

preferences {
	section("Turn on when there's movement..."){
		input "motion1", "capability.motionSensor", title: "Where?"
	}
	section("And off when there's been no movement for..."){
		input "minutes1", "number", title: "Minutes?"
	}
	section("Turn on/off light(s)..."){
		input "switches", "capability.switch", multiple: true, required: false 
	}
   
        section("Dim These Lights") {
        input "MultilevelSwitch", "capability.switchLevel", multiple: true, required: false
        }
   
   
    section("How Bright?"){
     input "number", "number", title: "Percentage, 0-99", required: false
    }
}

def installed()
{
	subscribe(motion1, "motion", motionHandler)
	schedule("0 * * * * ?", "scheduleCheck")
}

def updated()
{
	unsubscribe()
	subscribe(motion1, "motion", motionHandler)
	unschedule()
	schedule("0 * * * * ?", "scheduleCheck")
}

def motionHandler(evt) {
	log.debug "$evt.name: $evt.value"

	if (evt.value == "active") {
		log.debug "turning on lights"
		switches.on()
                settings.MultilevelSwitch?.setLevel(number)
		state.inactiveAt = null
	} else if (evt.value == "inactive") {
		if (!state.inactiveAt) {
			state.inactiveAt = now()
		}
	}
}

def scheduleCheck() {
	log.debug "schedule check, ts = ${state.inactiveAt}"
	if (state.inactiveAt) {
		def elapsed = now() - state.inactiveAt
		def threshold = 1000 * 60 * minutes1
		if (elapsed >= threshold) {
			log.debug "turning off lights"
			switches.off()
            MultilevelSwitch.off()
			state.inactiveAt = null
		}
		else {
			log.debug "${elapsed / 1000} sec since motion stopped"
		}
	}
}

Unfortunately that won’t do what I’m looking for though.

In short, what I want is this:

If I physically turn on the switch, I want brightness at full (99%).
If:
A.) The lights are off
B.) It’s between 10:00pm and 5:30am
C.) Motion is detected
Then: I want the light on at 10-20% for x number of minutes, then auto off.

I’ll have to mess around with this to figure out the best way to do it. I strongly suspect I’ll just need to jump to 99% brightness, then turn off as this is going to be a 3-way and the Master reports badly and the AUX even worse. I don’t think the isPhysical() will work for me.

The other plan will work just fine… I just know that my wife will be walking back to bed exactly when it ramps up to 99% and she’ll complain about it! :slight_smile: It’s a 2 second walk from the bathroom to the bedroom and I’m sure the process will last one 1 second… but mark my words… it’ll happen!