Quantcast
Channel: HomeSeer Message Board
Viewing all articles
Browse latest Browse all 4847

Virtual Device Value After Restart

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

Viewing all articles
Browse latest Browse all 4847