Announcement

Collapse
No announcement yet.

Any ideas on how to control dimming of smartbulb from the wall paddles?

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

    Any ideas on how to control dimming of smartbulb from the wall paddles?

    I'm switched out some of m Linear switches for a Zooz ZEN22 with the latest firmware. It is now scene/smartbulb capable and is working fine with on and off. I'd like to be able to also be able to use the paddle on the wall to dim the bulbs. Is there a way to associate the "dim" function" of the paddle to the Tuya smart bulbs?

    The only way I can think of at the moment is to create events to different dim levels with the scenes or dim "range" but if we can do a fluent ramp up/down dimm, it would be pretty nice.

    #2
    I use a script to control the dim level a group of lights in HSTouch based on a slider. Basics are that I have a series of virtual devices for each light with a checkbox for reach in my HSTouch screen as well as a slider. There is a virtual device for each dimmable light I'm controlling. In my case I'm controlling a z-wave light switch. Reach virtual device mirrors a switch. If it is on when the slider moves the associated switch is set to the dim level matching the slider's value. This is done by passing the level to a script. This is an abbreviated version. Maybe you can use something similar? I do not have a Zooz to test with else I would.

    Code:
      Sub Main(Parms As Object)
    '  hs.writelog("Parameter Test",CInt(Parms(0)))
    
    Dim SelectorRef As Integer
    Dim DevRef As Integer
    
    'Ceiling Fan
    SelectorRef = hs.GetDeviceRefByName("Ceiling Fan Light Selector")
    DevRef = hs.GetDeviceRefByName("Ceiling Fan Light")
    
    If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
    end if
    
    'Fireplace Outside Cans
    SelectorRef = hs.GetDeviceRefByName("HSTouch -Fireplace Outside Cans Selector")
    DevRef = hs.GetDeviceRefByName("Fireplace Outside Lights")
    If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
    end if
    
    DevRef = hs.GetDeviceRefByName("Fireplace Inside Lights")
    SelectorRef = hs.GetDeviceRefByName("HSTouch -Fireplace Inside Cans Selector")
    If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
    end if
    
    End Sub
    Karl S
    HS4Pro on Windows 10
    242 Devices
    56 Z-Wave Nodes
    37 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units 1 display

    Comment


      #3
      Originally posted by ksum View Post
      I use a script to control the dim level a group of lights in HSTouch based on a slider. Basics are that I have a series of virtual devices for each light with a checkbox for reach in my HSTouch screen as well as a slider. There is a virtual device for each dimmable light I'm controlling. In my case I'm controlling a z-wave light switch. Reach virtual device mirrors a switch. If it is on when the slider moves the associated switch is set to the dim level matching the slider's value. This is done by passing the level to a script. This is an abbreviated version. Maybe you can use something similar? I do not have a Zooz to test with else I would.

      Code:
       Sub Main(Parms As Object)
      ' hs.writelog("Parameter Test",CInt(Parms(0)))
      
      Dim SelectorRef As Integer
      Dim DevRef As Integer
      
      'Ceiling Fan
      SelectorRef = hs.GetDeviceRefByName("Ceiling Fan Light Selector")
      DevRef = hs.GetDeviceRefByName("Ceiling Fan Light")
      
      If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
      end if
      
      'Fireplace Outside Cans
      SelectorRef = hs.GetDeviceRefByName("HSTouch -Fireplace Outside Cans Selector")
      DevRef = hs.GetDeviceRefByName("Fireplace Outside Lights")
      If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
      end if
      
      DevRef = hs.GetDeviceRefByName("Fireplace Inside Lights")
      SelectorRef = hs.GetDeviceRefByName("HSTouch -Fireplace Inside Cans Selector")
      If hs.IsOn (SelectorRef) then
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,CInt(Parms(0)),false,true))
      end if
      
      End Sub
      I think this might work... so what you're doing is associating the dim level of one device to another? Do you have the full script? I'd like to test this out.

      Comment


        #4
        My dim level is associated with the value of a slider in HSTouch. It could be the dim level of another device, though.

        The entire script just repeats each section of 5 lines setting the two variables and then the if statement. You might not need to do more than call the script every time your "Master" device value changes and then read it's value them assign the value to each "Target" device. So your code would look something like:

        Code:
        . 
          Sub Main()  Dim MasterRef As Integer Dim MasterRefLevel As Integer Dim TargetRef As Integer  MasterRef = hs.GetDeviceRefByName("Master Device) MasterRefLevel = hs.DeviceValueEx(MasterRef)  
          'Target 1 TargetRef = hs.GetDeviceRefByName("Target Device 1") hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,MasterRefLevel,false,true))   'Target 2 TargetRef = hs.GetDeviceRefByName("Target Device 2") hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,MasterRefLevel,false,true))  'Target 3 TargetRef = hs.GetDeviceRefByName("Target Device 3") hs.CAPIControlHandler(hs.CAPIGetSingleControl(DevRef,false,MasterRefLevel,false,true))  ​​​​​​ End Sub
        Just repeat reach Target section for each object you wish to control.

        I did this with a slider in HSTouch so that as you moved the slider the lights changed interactively. You could use a Virtual Device for your Master or the switch itself depending on your use case. Just be sure to call the script every time the value changes and you may get an interactive use as well. It will depend on how often the value is updated in HomeSeer.
        Karl S
        HS4Pro on Windows 10
        242 Devices
        56 Z-Wave Nodes
        37 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units 1 display

        Comment


          #5
          dannieboiz maybe this approach could also help?

          https://forums.homeseer.com/forum/li...53#post1350453

          Comment

          Working...
          X