I thought this used to work.
Any ideas?
Any ideas?
Compiling script tempdiff.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.
Code:
Sub Main(ByVal Parm As Object) Dim outtemp as string Dim intemp as string Dim diff as string Dim tempdiffswitch as string Dim tempdiff as string Try hs.WriteLog("Info","Starting Temp Difference B") tempdiffswitch = hs.GetDeviceRefByName("Temperature Difference") tempdiff = hs.GetDeviceRefByName("Utility Weather tempdiff") outtemp = hs.GetDeviceRefByName("Outdoor Temperature") hs.WriteLog("Info","outtemp ID: "& outtemp) hs.WriteLog("Info","outtemp: "& hs.deviceValue(outtemp)) intemp = hs.GetDeviceRefByName("Kitchen Motion - Temperature") hs.WriteLog("Info","intemp ID: "& intemp) hs.WriteLog("Info","intemp: "& hs.deviceValue(intemp) ) diff = hs.deviceValue(intemp) - hs.deviceValue(outtemp) hs.WriteLog("Info","diff: "& diff) hs.SetDeviceValueByRef(tempdiff, diff, True) if diff > 3 then hs.WriteLog("Info","switch ON ") hs.SetDeviceValueByRef(tempdiffswitch, 100, True) hs.setDeviceString(tempdiffswitch,"100",True) else hs.WriteLog("Info","switch OFF ") hs.SetDeviceValueByRef(tempdiffswitch, 0, True) hs.setDeviceString(tempdiffswitch,"0",True) end if hs.WriteLog("Info","Starting Temp Difference B 100") Catch ex As Exception : hs.writelog("", "Exception: " & ex.message) End Try End Sub
Comment