No announcement yet.

Virtual Device as Temporary Dimmer Value Storage

  • Filter
  • Time
  • Show
Clear All
new posts

    Virtual Device as Temporary Dimmer Value Storage


    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.


    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.

    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)
    		hs.PluginFunction("HSTouch Server", "", "ClientAction", {89,"Android:Android7",".38",""})
    		hs.SetDeviceValueByRef(59, "38", True)
    	End if
    End Sub

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



      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!



        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