Announcement

Collapse
No announcement yet.

Virtual Device as Temporary Dimmer Value Storage

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

    Virtual Device as Temporary Dimmer Value Storage

    All,

    Trying to use a Virtual device as a temporary dimmer value storage variable. Having trouble with the virtual device piece.

    Example use case
    - Front porch light is set at Dim 25%
    - Upon Motion trigger, increase porch light to Dim 80%
    - After 5 minutes, return to prior value

    What works
    - I can successfully and repeatedly set one dimmer to another dimmer values

    What I cannot get to work correctly/repeatedly
    - Saving Light A value to a virtual device
    - Move the Virtual Device value back to a real dimmer

    I have tried creating a virtual device from scratch and also tried copying a real dimmer to a new virtual device. FYI all my dimmers are Cooper.

    I believe the issue is that the virtual device is not configured correctly, since I can move values from real dimmer to real dimmer at will.

    Any thoughts on how to set up the virtual device or other suggestions are greatly appreciated.

    Regards,
    Vector

    #2
    Make sure your virtual device is NOT set as "status only device". Here's a script I use to toggle an android client backlight based on the current level that's stored in a virtual device (device ref 59). Not exactly what you're after, but the methods of getting/setting the value of the virtual device should work for you.

    Code:
    Sub Main(Parms As Object)
    
    	dim plug as object 
    	dim backlight_current_value as integer = hs.DeviceValue(59)
    
    ' If backlight currently on, set to .01 to turn off, else set to minimum dim level of 38%
    	If backlight_current_value > 1 Then 
    		hs.PluginFunction("HSTouch Server", "", "ClientAction", {89,"Android:Android7",".01",""})
    
    		hs.SetDeviceValueByRef(59, "1", True)
    	Else
    		hs.PluginFunction("HSTouch Server", "", "ClientAction", {89,"Android:Android7",".38",""})
    
    		hs.SetDeviceValueByRef(59, "38", True)
    	End if
    
    End Sub
    Fred

    HomeSeer Pro 3.0.0.548, HS3Touch, Zwave 3.0.1.252, Envisalink DSC 3.0.0.40, WeatherXML, Z-stick, HS phone, Way2Call

    Comment


      #3
      Fred,

      That was it!

      On my virtual copy of a dimmer it was set as Both but I think the other (virtual Z-wave) issues were causing other issues on that device.

      But I went back to my created from scratch virtual device and changed to Both (Control and Status) and it worked immediately.

      Thanks very much for the assist!

      Regards,
      Vector

      Comment


        #4
        yeah, for the "Easy Trigger: Set Device to Another Device" action to work, the target device needs to have a control value/range that includes the value that it is being set to, and in the configuration tab the "Status Only device" option needs to be unchecked

        Comment

        Working...
        X