Announcement

Collapse
No announcement yet.

Zwave GE 14295 resume dim

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Zwave GE 14295 resume dim

    I just started expanding out my zwave network and tried out a few GE 14295 switches. I like them because the screw terminals and toggle switches work better for me in certain spots.

    The issue I have is that the switches resume their last dim level-not really my favorite scenario and I was hoping to work around this by either finding a code to turn it off (default to full on) or to catch a group 2 (double tap) or group 3 (triple tap) event and trigger 100% brightness on that - (double taps would be my preference since this is how my insteon switches work).

    It would be my preference to keep the activity on the zwave network (group/association/whatever...) rather than to wait for HomeSeer events to respond.

    I realize I can just ON commands received over a period to trigger a double tap event but these types of setups tend to be a bit slow for my tastes.

    Anyone have any hidden parameters or a way to do this efficiently?

    Thanks in advance

    #2
    I wasn't aware of the GE switches supporting a central scene; double/triple tap.

    If the GE switches do that great, if not you may want to get the homeseer switches instead.

    I use a script that I trigger using the homeseer central scene. But any switch which supports instant status should work fine.

    My network is fast enough that the light control is seamless. It helps that the lights dim up and down as they go from on/off.

    If a light is off, it defaults to on regardless of previous level, if dimmed and you hit the top paddle it goes to on. I change the default to dim after a certain time of night but you could easily strip that part out if you don't want it.

    Code:
    Public Sub Main(ByVal Parms As Object)
            '' This script intended for dimmer switches that support instant status, it should be called by an event which passes the device ref as it's parameter
            '' If the device is dimmed set to 'on' (override), If 'off' we want to set to either 'on' or dimmed depending on the time.
            '' nightmode = when lights should be dimmed when turned on
            '' daymode = when lights should be set to 'on' when turned on
    
    
            Dim deviceRef As Integer = Integer.Parse(CType(Parms, String))
            Dim startingDeviceValue As Integer = hs.DeviceValue(deviceRef)
            Dim endingDeviceValue As Integer = 0
    
            '' the start and end of the day need to be in 24 hour time format; ie 10pm would be 2200.  The variable can be hard coded if you prefer
            ''Dim nightmode = New DateTime(Now.Year, Now.Month, Now.Day, 22, 00, 0)
            ''Dim daymode = New DateTime(Now.Year, Now.Month, Now.Day, 07, 00, 0)
    
            '' I prefer to store the variable in a virtual device; so lets get the value and make sure the it has 4 places, if not prefix with 0's
            Dim virtualdevicevalue As String = hs.DeviceValue(93).ToString.PadLeft(4, "0")
    
            '' we can now split the string into hours and minutes and insert into our time variable
            Dim nightmode = New DateTime(Now.Year, Now.Month, Now.Day, Left(virtualdevicevalue, 2), Right(virtualdevicevalue, 2), 0)
    
            ''repeat for the next value
            virtualdevicevalue = hs.DeviceValue(94).ToString.PadLeft(4, "0")
            Dim daymode = New DateTime(Now.Year, Now.Month, Now.Day, Left(virtualdevicevalue, 2), Right(virtualdevicevalue, 2), 0)
    
            '' set the dimmed level we wish to use for nightmode
            Dim dimmed As Integer = hs.DeviceValue(95)
    
            '' check to see if the device is currently dimmed; if dimmed override and set to 'on'
            If startingDeviceValue <> 0 AndAlso startingDeviceValue < 99 Then
                endingDeviceValue = 99
            End If
    
            '' check to see if we're in night mode, if so and the device is off set to dimmed
            If (DateTime.Now >= nightmode Or DateTime.Now <= daymode) AndAlso startingDeviceValue = 0 Then
                endingDeviceValue = dimmed
            Else endingDeviceValue = 99
            End If
    
            '' if we've changed something lets set the new value, otherwise exit
            If startingDeviceValue <> endingDeviceValue Then
    
                Dim cc As HomeSeerAPI.CAPIControl = hs.CAPIGetSingleControl(deviceRef, True, "Dim (value)%", False, False)
                cc.ControlValue = endingDeviceValue
                Dim cr As HomeSeerAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            End If
        End Sub
    HS4 Pro on Shuttle NC10U, Win10; Z-NET
    Number of Devices: 1005
    Number of Events: 293

    Plug-Ins: BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, Marquis monoprice Amp, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, rnbWeather, Worx Landroid, Z-Wave

    External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

    Comment


      #3
      Thanks for the well documented code....I will load it into my test events collection and build off it.....But I found a way with events that works really well.

      I can trigger an event on the device "LAST" command. Turning on the the switch puts a last command on the wire and the event immediately fires and sets the switch to "ON"

      When I tested it I expected the light to come on to the last brightness level and then get bumped up to 100....but it doesn't...well maybe it does but it happens so quickly that the event action fires during the ramp up. I had to introduce a delay in the event just so see it clearly.

      Comment


        #4
        Originally posted by kamishki View Post
        Thanks for the well documented code....I will load it into my test events collection and build off it.....But I found a way with events that works really well.

        I can trigger an event on the device "LAST" command. Turning on the the switch puts a last command on the wire and the event immediately fires and sets the switch to "ON"

        When I tested it I expected the light to come on to the last brightness level and then get bumped up to 100....but it doesn't...well maybe it does but it happens so quickly that the event action fires during the ramp up. I had to introduce a delay in the event just so see it clearly.
        What did you do to make it work, and can you share any screen shots?

        Comment


          #5
          Maybe this will help..
          Attached Files

          Comment

          Working...
          X