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.