Recently moved HS to new PC. The script worked before but now throws error:
Simple script to log pool and spa heater run times to file:
What am I not seeing?
Code:
Running script C:\Program Files (x86)\HomeSeer HS3\scripts\heater.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in script
PHP Code:
Sub Main(parm as object)
Dim objReader As System.IO.StreamWriter
Dim fullPath as String = "C:\Program Files\HomeSeer HS3\Logs\Heater_Run_times.txt"
Try
objReader = New System.IO.StreamWriter(fullPath,TRUE)
objReader.WriteLine(now() &" "& hs.CAPIGetStatus(1229).Status)
objReader.WriteLine(hs.CAPIGetStatus(1234).Status)
Catch Ex As Exception
'System.Windows.Forms.Messagebox.show(Ex.Message)
Finally
objReader.Close()
End Try
End Sub
Comment