Hello,
I used a simple script within HS2 to check an oregon temp sensor value, compare this with the value of a virtual device (settemp) and control a X10 appliance (floorheater relay):
HS2:
I've tried to convert this script to HS3:
And now I get this log-result:
Running script C:\Program Files (x86)\HomeSeer HS3\scripts\Controleer temperatuur woonkamer en stel bij.vb :Het doel van een aanroep heeft een uitzondering veroorzaakt.De conversie van tekenreeks T1 naar type Integer is ongeldig
translation:
conversion from string T1 to type Integer is not valid
What am I doing wrong?
I used a simple script within HS2 to check an oregon temp sensor value, compare this with the value of a virtual device (settemp) and control a X10 appliance (floorheater relay):
HS2:
Code:
Sub Main(Byval parm as object) dim realtemp As Single dim settemp As Single realtemp = hs.devicevalue("\14")/10 settemp = hs.devicevalue("V6") If realtemp > settemp Then hs.execX10("A1", "Off", 0, 0) End if If realtemp < settemp Then hs.execX10("A1", "On", 0, 0) End If End Sub
Code:
Public Sub Main(parms as object) dim realtemp As Single dim settemp As Single realtemp = hs.DeviceValueEx("T1") settemp = hs.DeviceValueEx("v1") If realtemp > settemp Then hs.setDeviceValue("A1", 100) End if If realtemp < settemp Then hs.setDeviceValue("A1", 100) End If End Sub
Running script C:\Program Files (x86)\HomeSeer HS3\scripts\Controleer temperatuur woonkamer en stel bij.vb :Het doel van een aanroep heeft een uitzondering veroorzaakt.De conversie van tekenreeks T1 naar type Integer is ongeldig
translation:
conversion from string T1 to type Integer is not valid
What am I doing wrong?
Comment