Announcement

Collapse
No announcement yet.

HS-WD100+ Ramp Rate Question

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

    #16
    Originally posted by whydna View Post
    I've setup the the exact same configuration that wsume99 has:
    - hs-wd100+, running 5.19, with remote ramp rates set to 99/1.

    Like wsume99, I'm trying to configure it so that I can manually dim the light as needed, but pressing the switch on or off will cause the light to immediately go to fullly on or fully off, respectively.

    Like others have recommended, I have two events: one for handling the Scene 001 Key press to turn the light on, one for handling the Scene 002 Key press to trun the light off.

    Here they are:
    - IF Lighting Den Den Central Scene had its value set to Scene 001 Key Pressed
    - Then Set Device Lighting Den Den Light to On

    - IF Lighting Den Den Central Scene had its value set to Scene 002 Key Pressed
    - The Set Device Lighting Den Den Light to Off

    When I press the switch on, the light immediately turns on with no ramping, yay! When I press the switch off, the light fades off instead of turning off instantly.

    Thoughts?
    I've got the same issue, were you able to figure out a way for the off without fading?

    Comment


      #17
      This is not what I expected

      This isn't good.
      I just installed a 5-Pack of these and in 2 locations - I Do Not Want a Ramp - At All. There will be additional locations that also should not have a ramp.

      The switches these are replacing (Leviton Vizia RF +) were able to be set "at the switch".

      Perhaps these have the same ability but it isn't publicized? I can't hardly imagine I would be moving backwards by installing these. I'm going to drop a but-load of cash on new switches but they need to have the basics!

      Are there comparable switches from another vendor? I was able to find another brand but they appear to be the same switch (Only Less $$ Cheaper). I went ahead and bought one to check it out.

      Comment


        #18
        Originally posted by Monk View Post
        This isn't good.
        I just installed a 5-Pack of these and in 2 locations - I Do Not Want a Ramp - At All. There will be additional locations that also should not have a ramp.

        The switches these are replacing (Leviton Vizia RF +) were able to be set "at the switch".

        Perhaps these have the same ability but it isn't publicized? I can't hardly imagine I would be moving backwards by installing these. I'm going to drop a but-load of cash on new switches but they need to have the basics!

        Are there comparable switches from another vendor? I was able to find another brand but they appear to be the same switch (Only Less $$ Cheaper). I went ahead and bought one to check it out.
        you can adjust this via parameters

        https://forums.homeseer.com/showpost...5&postcount=36
        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


          #19
          Originally posted by wsume99 View Post
          ...when anyone else in my house turns the switch on or off they think it is not working and they hit it again, multiple times. Often they end up activating the dim function when doing this...
          I have a similar problem when I have guests over. I normally like having my lights dim up and down but it can confuse guests. My roadmap includes creating a script to cycle through every hs-wd100 and set the parameter for the local dim rate to mimic instant on/off or back to default. This would let me toggle a guest mode on and off again.
          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


            #20
            Originally posted by jmaddox View Post
            Yes - I found I could set them at 1 step and 1 ms which helps and is ALMOST instant. Still looking forward to the new one I ordered - see just how similar they are / are not.

            Comment


              #21
              SOLVED

              Originally posted by whydna View Post
              When I press the switch on, the light immediately turns on with no ramping, yay! When I press the switch off, the light fades off instead of turning off instantly.

              Thoughts?
              TL/DR: send "Dim 1%" or "Last" command and then "Off".

              I had the exact same issue. I have a callback script which watches for the tap up and tap down events on the central scene, looks up the dimmer associated with the scene device, and sends a remote on or off command. Same behavior: On works instantly, but Off slowly ramps down. The issue here is that you have to change the state with your remote command for it to have any effect. When you tap the switch up, the device is processing the "Last" command, so a remote command of "On" will override that and count as a remote command, using the remote ramp rate. BUT, when you tap the switch down, the switch is processing the "Off" command, and sending another "Off" command remotely is ignored because it's already performing an "Off" command.

              The solution is to send another, different command, and then "Off", so that the "Off" counts as a remote command. I've tried both "Off" and "Dim 1%", and they both work great. I recommend putting another filter on your event to check that the device isn't already off, or it will turn it on/off again. In my script, I just check that the device value is non-zero.

              Comment


                #22
                Originally posted by zanfur View Post
                I have a callback script which watches for the tap up and tap down events on the central scene, looks up the dimmer associated with the scene device, and sends a remote on or off command.
                Would you be able to share that script?

                Comment


                  #23
                  Room management callback script

                  Originally posted by dhennen View Post
                  Would you be able to share that script?
                  The script I have has a lot more functionality than that, but sure I'll share. It's a callback script, that gives the following functionality:

                  * Every switch and dimmer has two "scene" settings, "High" and "Low", defaulting to "On" and "Off" respectively
                  * Tapping Up/Down sets it to the "High"/"Off" setting, unless it's already there, in which case it's set to "On"/"Low"
                  * Double tap Up/Down sets everything in the room to the "High"/"Low" scene
                  * Triple tap Up/Down sets the saved "High"/"Low" setting for that switch or dimmer to its current setting

                  This lets me set an entire room to all the High scene (which defaults to On), or all the Low scene (which defaults to Off), with just one double tap on any switch for that room. If I want to override any particular switch's behavior for a scene, I can change it directly from the switch or dimmer, no code or even homeseer config changes necessary. For instance, I set the cabinet underlighting to always stay on by setting its "Low" value to "On", and I set my super-bright dining chandelier to only go to 70% by setting its "High" value to "Dim 70%", all from the switches themselves.

                  I bothered to code this all up because the new house I bought has switches in the most horrible of locations -- In every common room, in order to turn all the lights on or off, I'd have to walk around the entire room to all the switch banks. The house has 73 switches...I don't know what the electrician was thinking.

                  I'm not particularly proud of the code, but it works. Here's its current incarnation (just run the Main function in startup.vb to register it as the callback):

                  Code:
                  Imports System.Collections.Generic
                  Imports Scheduler.Classes
                  
                  Sub Main(parm As Object)
                      hs.WriteLog("callback", "Registering status change callback")
                      hs.RegisterStatusChangeCB("callback.vb", "StatusChangeCB")
                  End Sub
                  
                  Function GetRoomSwitchRefsProxy(ByVal Parms as String)
                      Dim Location As String() = Split(Parms, "|")
                      GetRoomSwitchRefsProxy = GetRoomSwitchRefs(Location(0), Location(1), CBool(Location(2)))
                  End Function
                  
                  Function GetMatchingDeviceRefs(ByVal Predicate As Func(Of DeviceClass, Boolean)) As Integer()
                      Dim Refs As List(Of Integer) = New List(Of Integer)
                      Dim Devices As clsDeviceEnumeration = hs.GetDeviceEnumerator
                      Do
                          Dim Dev As DeviceClass = Devices.GetNext
                          If Predicate(Dev) Then Refs.Add(Dev.Ref(hs))
                      Loop Until Devices.Finished
                      Return Refs.ToArray()
                  End Function
                  
                  ' Predicates for switch types
                  Function IsDimmer(ByVal Dev As DeviceClass) As Boolean
                      Return Dev.Device_Type_String(hs) = "Z-Wave Switch Multilevel"
                  End Function
                  Function IsBinary(ByVal Dev As DeviceClass) As Boolean
                      Return Dev.Device_Type_String(hs) = "Z-Wave Switch Binary"
                  End Function
                  Function IsSwitch(ByVal Dev As DeviceClass) As Boolean
                      Return IsDimmer(Dev) Or IsSwitch(Dev)
                  End Function
                  
                  Function GetRoomSwitchRefs( _
                          ByVal Floor As String, _
                          ByVal Room As String, _
                          Optional ByVal IncludeBinary As Boolean = false)
                      Dim Refs As List(Of Integer) = New List(Of Integer)
                      Dim Devices As clsDeviceEnumeration = hs.GetDeviceEnumerator
                      Do
                          Dim Dev as Classes.DeviceClass = Devices.GetNext
                          If Dev.Location(hs) = Room And Dev.Location2(hs) = Floor
                              If IsDimmer(Dev) Or (IncludeBinary And IsBinary(Dev)) Then Refs.Add(Dev.Ref(hs))
                          End If
                      Loop Until Devices.Finished
                      Return Refs
                  End Function
                  
                  ' Finds a particular device type in a device group.  Returns first match.
                  Function GetRelatedDeviceRef(ByVal Ref As Integer, ByVal DeviceTypes As String()) As Integer
                      ' Find the parent device
                      Dim pRef As Integer = hs.GetDeviceParentRefByRef(Ref)
                      If pRef = 0 Then pRef = Ref
                      Dim pDev = hs.GetDeviceByRef(pRef)
                  
                      ' Find the corresponding device, if any
                      Dim cRefs = pDev.AssociatedDevices(hs)
                      For Each cRef As Integer In cRefs
                          Dim cDev As DeviceClass = hs.GetDeviceByRef(cRef)
                          Dim cDeviceType As String = cDev.Device_Type_String(hs)
                          For Each DeviceType As String In DeviceTypes
                              If DeviceType = cDeviceType Then Return cRef
                          Next
                      Next
                      Return 0
                  End Function
                  
                  Function GetSwitchRef(ByVal Ref As Integer, Optional ByVal IncludeBinary As Boolean = true) As Integer
                      Dim DeviceTypes As String()
                      If IncludeBinary
                          Dim DeviceTypes As String() = {"Z-Wave Switch Multilevel", "Z-Wave Switch Binary"}
                          Return GetRelatedDeviceRef(Ref, DeviceTypes)
                      Else
                          Dim DeviceTypes As String() = {"Z-Wave Switch Multilevel"}
                          Return GetRelatedDeviceRef(Ref, DeviceTypes)
                      End If
                  End Function
                  
                  Function ControlDevice(ByVal Ref As Integer, ByVal Status As String) As CAPIControlResponse
                      Dim Control As CAPI.CAPIControl = hs.CAPIGetSingleControl(Ref, false, Status, false, false)
                      Dim Current As CAPI.CAPIStatus = GetStatus(Ref)
                  
                      'hs.WriteLog("callback", "ControlDevice: Setting device " & Ref & " from " & Current.Status & " to " & Status)
                  
                      ' Short circuit on invalid status or no-op
                      If Control is Nothing
                          hs.WriteLog("callback", "ControlDevice: Device " & CStr(Ref) & " unknown control: " & Status)
                          Return CAPIControlResponse.All_Failed
                      End If
                      If Control.Label = Current.Status Then Return CAPIControlResponse.All_Success
                  
                      ' Actually set device to requested state
                      Return hs.CAPIControlHandler(Control)
                  End Function
                  
                  Function GetControl(ByVal Ref As Integer, ByVal Status As String) As CAPI.CAPIControl
                      Dim Control As CAPI.CAPIControl = hs.CAPIGetSingleControl(Ref, false, Status, false, false)
                      If Control is Nothing
                          hs.WriteLog("callback", "GetControl: Device " & CStr(Ref) & " unknown control: " & Status)
                      End If
                      Return Control
                  End Function
                  
                  Function GetStatus(ByVal Ref As Integer) As CAPI.CAPIStatus
                      Return hs.CAPIGetStatus(Ref)
                  End Function
                  
                  ' Save the current value of the device as the given scene
                  Sub SaveScene(ByVal Ref As Integer, ByVal Scene As String)
                      Dim Status As String = GetStatus(Ref).Status
                      Dim Dev = hs.GetDeviceByRef(Ref)
                      hs.WriteLog("callback", "Saving status """ & Status & """ as scene """ & Scene & """ for device " & _
                          CStr(Ref) & ": " & Dev.Location2(hs) & " " & Dev.Location(hs) & " " & Dev.Name(hs))
                      hs.SaveINISetting(CStr(Ref), Scene, Status, "callback.ini")
                  End Sub
                  
                  ' Get the control corresponding to the given device's given scene
                  Function GetSceneControl(ByVal Ref As Integer, ByVal Scene As String, ByVal Fallback As String) As CAPI.CAPIControl
                      Return GetControl(Ref, GetScene(Ref, Scene, Fallback))
                  End Function
                  
                  ' Retrieve the saved value of the device for the given scene, with given default
                  Function GetScene(ByVal Ref As Integer, ByVal Scene As String, ByVal Fallback As String) As String
                      Return hs.GetINISetting(CStr(Ref), Scene, Fallback, "callback.ini")
                  End Function
                  
                  Sub StatusChangeCB(ByVal Parm As Object())
                      'Parse the parameters
                      If Parm Is Nothing Then Exit Sub
                      If Parm.Length < 5 Then Exit Sub
                      Dim Code As String = ""
                      Dim Address As String = ""
                      Dim OldVal As Double
                      Dim NewVal As Double
                      Dim Ref As Integer
                      Dim Dev As Object
                      Try
                          Code = Parm(0).ToString
                          Address = Parm(1).ToString
                          NewVal = Parm(2)
                          OldVal = Math.Abs(Parm(3)) 'we set this to negative to trigger future callbacks
                          Ref = Parm(4)
                          Dev = hs.GetDeviceByRef(Ref)
                      Catch ex As Exception
                          hs.WriteLog("Stat_Change.VB", "Error, Exception parsing Parm: " & ex.Message)
                          Exit Sub
                      End Try
                  
                      ' We only care about the Scene management for HomeSeer dimmers 
                      If Dev.Device_Type_String(hs) <> "Z-Wave Central Scene" Then Exit Sub
                  
                      ' Single tap up/down will set switch to saved High/Off scene, or On/Low if already at scene
                      ' Double tap up/down will set room to High/Low scene
                      ' Triple tap up/down will save current switch value as High/Low scene setting for switch
                  
                      Try
                          ' Set the original scene to an the negation of the real value, so that future presses work.
                          ' (Callback is only called on *change* of the value). Don't trigger other events on this, though.
                          hs.SetDeviceValueByRef(Ref, -NewVal, False)
                  
                          ' Figure out what we want to do
                          Dim Controls As List(Of CAPI.CAPIControl) = New List(Of CAPI.CAPIControl)
                          Select Case NewVal
                              Case 1000 'single tap up
                                  Dim cRef = GetSwitchRef(Ref, false)
                                  If cRef = 0 Then Exit Sub
                                  Dim Status As String = GetStatus(cRef).Status
                                  Dim Scene As String = GetScene(cRef, "High", "On")
                                  If Scene = Status Then Scene = "On"
                                  Controls.Add(GetControl(cRef, Scene))
                              Case 2000 'single tap down
                                  Dim cRef = GetSwitchRef(Ref, false)
                                  If cRef = 0 Then Exit Sub
                                  Dim LastChanged As Date = hs.DeviceLastChangeRef(Ref)
                                  Dim cDev As DeviceClass = hs.GetDeviceByRef(cRef)
                                  Dim cValue As Double = cDev.devValue(Nothing)
                                  Dim cLastChanged As Date = cDev.Last_Change(Nothing)
                                  Dim Scene As String = GetScene(cRef, "Low", "Off")
                                  ' If on (or changed in the last 3 seconds), then turn it off
                                  If cValue <> 0 Or cLastChanged.AddSeconds(3) > LastChanged
                                      Scene = "Off"
                                      ' For "remote rate" dim to off we need to send a "different" intermediate command
                                      ' But don't bother if it's really close to off already anyway
                                      If cValue > 10
                                          Controls.Add(GetControl(cRef, "Last"))
                                      End If
                                  End If
                                  Controls.Add(GetControl(cRef, Scene))
                              Case 1003 'double tap up
                                  For Each cRef As Integer In GetRoomSwitchRefs(Dev.Location2(hs), Dev.Location(hs), true)
                                      Controls.Add(GetSceneControl(cRef, "High", "On"))
                                  Next
                              Case 2003 'double tap down
                                  For Each cRef As Integer In GetRoomSwitchRefs(Dev.Location2(hs), Dev.Location(hs), true)
                                      Controls.Add(GetSceneControl(cRef, "Low", "Off"))
                                  Next
                              Case 1004 'triple tap up
                                  SaveScene(GetSwitchRef(Ref), "High")
                              Case 2004 'triple tap down
                                  SaveScene(GetSwitchRef(Ref), "Low")
                          End Select
                          ' For Each Control As CAPI.CAPIControl In Controls
                          '     hs.WriteLog("debug", "Device: " & Control.Ref & " Control: " & Control.Label)
                          ' Next
                          If Controls.Count > 0
                              hs.CAPIControslHandler(Controls.ToArray())
                          End If
                      Catch ex As Exception
                          hs.WriteLog("callback", "Exception occurred: " & ex.Message & "stacktrace:" & ex.StackTrace)
                          Exit Sub
                      End Try
                  End Sub

                  Comment


                    #24
                    Solution

                    Originally posted by julez View Post
                    I've got the same issue, were you able to figure out a way for the off without fading?
                    I was having this same problem. After some experimentation I discovered a workaround which seems to do the trick. I have the off button set the dim to 1% and then have it set to off. That seems to make it go off without using the local ramp rate. So I have my events like so:

                    Scene 001 Key Pressed => Set multilevel switch to On
                    Scene 002 Key Pressed => Set multilevel switch to Dim 1%, then set multilevel switch to Off

                    Comment

                    Working...
                    X