I have created a script to load heating schedules. Something is wrong, its showing a lot of errors in the log. I have created this from changing another working script. I am not sure what I've done wrong. Probably something obvious but I cannot see it.
Device 308 is my Hall temperature sensor.
This is the script:
These are the errors:
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: 'EndIf' statements are no longer supported; use 'End If' instead.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: '>' expected.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Element is missing an end tag.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Character '1' (0x31) is not allowed at the beginning of an XML name.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: White space cannot appear here.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: 'Is' operator does not accept operands of type 'Double'. Operands must be reference or nullable types.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: End of statement expected.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Device 308 is my Hall temperature sensor.
This is the script:
Code:
Sub Main(ByVal Parms As Object) Dim TempHall As Double TempHall = hs.DeviceValueEx(308) Dim TempKitchen As Double TempKitchen = hs.DeviceValueEx(17) Dim TempOutside As Double TempOutside = hs.DeviceValueEx(14) Select Case TempHall Case > 19.2 hs.TriggerEvent("Load Heating off") Case 18.9 To 19.2 hs.TriggerEvent("Load Heating mornings only") Case 18.6 To 18.9 hs.TriggerEvent("Load Heating mornings and evenings") Case 18.2 to 18.6 If TempOutside is < 1 hs.TriggerEvent("Load Heating very cold") Else hs.TriggerEvent("Load Heating cold") EndIf Case < 18.2 hs.TriggerEvent("Load Heating very cold") End Select End Sub
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: 'EndIf' statements are no longer supported; use 'End If' instead.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: '>' expected.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Element is missing an end tag.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Character '1' (0x31) is not allowed at the beginning of an XML name.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: White space cannot appear here.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: 'Is' operator does not accept operands of type 'Double'. Operands must be reference or nullable types.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: End of statement expected.
Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\HeatScheduleLogic.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Comment