The new Home Seer switches are excellent dimmers and supported in XTension for their central scene capability. The following article also applies to their new HS-WD200+ dimmer as well as the HS-WS100+ non-dimmable relay switch. For more info on using the other capabilities of the HS-WD200+ dimmer click here
In order to use the Central Scene capability of these switches in XTension requires that you are using the new Vera UI7 interface and not the legacy UI5 interface.
These dimmers support Central Scene changes which means that they will update their value in XTension almost immediately upon a local change. Unlike other older 2-way switch communication systems you should not try to trigger other actions from the On script when the value changes. The value can chance several times as the switch is dimming itself to the new level so your On script would run multiple times. The correct way is to create an On script and add an on central scene handler to it as described in the above article.
This will be called almost immediately when the switch is tapped. Two values are sent to you in the handler, the button number and the gesture number. This lets you tell which paddle on the switch was tapped, up or down, and how it was tapped, single tap, double tap, tap and hold etc…
For the Home Seer switches the button index is always 1 for the up paddle and 2 for the down paddle. The following gestures are currently supported by the Vera:
|Release of Hold||129|
The HS-WD200+ dimmer also adds the following extra gestures
Yes, thats right you can do up to a 5 click macro for each button with the HS-WD200+!
When single tapping the default switch behavior is to control the local load as well as send the central scene information.
When performing a double or triple click the local load is not controlled, just the command is sent. So it is easy to create scripts that do things that do not affect the local load. Or if you wish to also control the local load from a double click command then just command the unit from the script as you would any other.
Though I believe the switch itself supports tap and hold gestures the Vera does not make any distinction between tap and hold and just hold. When you do either the switch will send which paddle you are holding along with the gesture code of 130. Then the paddle is released it will send the button code again with a gesture code of 129.
While you can’t tell the different between a hold and a local dim control in XTension, by doing a tap and hold on the switch it will send the same command to us, but will not control the local load. So it may be possible to use that to control other things if you don’t wish those same other things happening when you locally change the dim value at the switch.
Something like this example might be used to control all the rooms lighting with a double click while still being able to control the dimmer locally without affecting the whole room if you wish.
on centralScene( theButton, theGesture) if theButton is equal to 1 then write log “the top paddle was pushed" if theGesture is equal to 131 then -- the switch was double clicked on write log “double click ON, turning on room lights" -- since the switch doesn’t control it’s local load when doing a double click the first thing we should do is control it turnon (thisUnit) brighten “other room light” to 75 turnon “yet another light in the room" end if else if theButton is equal to 2 then write log “the bottom paddle was pushed" if theGesture is equal to 131 then write log “double click OFF. turning off the room lights" turnoff (thisUnit) turnoff other room light" turnoff “yet another light in the room" end if end if
As of XTension 9.4.6 the central scene events may be sent more than once. This is a known issue and as soon as I can figure out how to filter repeats of them I will do so. Until then your scripts may run more than once. This isn’t generally a problem as turning on or off a device that is already at the same level doesn’t cause any trouble except extra commands to the systems. If you wish you may be able to check the time delta of the unit and ignore a central scene event if it is less than say 2 seconds since it changed state. Or save off the current date in the central scene handler to a local script variable and compare that script variable with the current date when it’s called. If it’s less than 2 or 3 seconds since it last handled a central scene command then ignore it.