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
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