Announcement

Collapse
No announcement yet.

Virtual Device Value After Restart

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

    Virtual Device Value After Restart

    Hi there,

    I am using a script to set values of virtual devices so the value can be changed by calling the script from HSTouch.
    It all works, but if i cycle the power off the HomeSeer PC values change back to where they were before.
    If I change values through the HomeSeer Web Control and cycle the power, new values remain changed.

    Does anyone know the reason for this difference?

    Here is the script i'm using:

    Sub SetVal(parm as object)
    Dim deviceName As String
    Dim valueStr As String
    Try
    hs.WriteLog("SetVal Debug", "Script Start")
    deviceName = parm(0)
    valueStr = parm(1)
    hs.WriteLog("SetVal Debug","parm(0)=" & deviceName)
    hs.WriteLog("SetVal Debug", "parm(1)=" & valueStr)
    hs.SetDeviceValueByName(deviceName,CLng(valueStr))
    hs.WriteLog("SetVal Debug", "Script Stop")
    Catch Ex As Exception
    hs.WriteLog("SetVal Error","Script exception is:" & Ex.Message)
    End Try
    End Sub



    Regards,

    Luka

    #2
    I haven't seen this issue with my scripts, but try adding a hs.SaveEventsDevices after changing the devices.

    Cheers
    Al
    HS 3.0.0.548: 1990 Devices 1172 Events
    Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

    Comment


      #3
      Thanks for that. It worked.

      Sent from my SM-G900I using Tapatalk

      Comment

      Working...
      X