SOLVED without vb script.
I figured out that I can do this without scripting, using an event:
IF Device XXX changes and becomes Alert
Then the system will take a picture with the XYZ camera.
Then Wait 11 Seconds
Then Send an email with attachment: Currently: /Program Files/HomeSeer HS3/html/netcam/CurrentImage.jpg
-
In HS2 I had an event that mailed me a Netcam picture each time a specific door was opened. This was done with the following Netcam.vb script that I found a long time ago on a Homeseer forum.
Sub Main(Optional ByVal pParms As String = "")
Dim pi As Object
dim time
time = timevalue(now)
pi = hs.Plugin("Netcam")
Dim files As Collection = pi.getimages("Netcam Name of Camera")
If files.Count >= 2 Then
Dim latestImage As Integer = 2
Dim strFileName As String = files(latestImage).Replace("_thmb","")
hs.WriteLog("Info", "File to send: " & strFileName)
hs.SendEmail("MyMailAdress@gmx.com", "My MailAdress@gmx.com", "My image "&time, "My image", strFileName)
End If
End Sub
This script doesn't work in HS3, Log says:
Running script C:\Program Files\HomeSeer HS3\scripts\Netcam.vb :Exception has been thrown by the target of an invocation.Public member 'Plugin' on type 'hsapplication' not found.
I know nothing about vb scripts, can anyone adapt that script for me?
I figured out that I can do this without scripting, using an event:
IF Device XXX changes and becomes Alert
Then the system will take a picture with the XYZ camera.
Then Wait 11 Seconds
Then Send an email with attachment: Currently: /Program Files/HomeSeer HS3/html/netcam/CurrentImage.jpg
-
In HS2 I had an event that mailed me a Netcam picture each time a specific door was opened. This was done with the following Netcam.vb script that I found a long time ago on a Homeseer forum.
Sub Main(Optional ByVal pParms As String = "")
Dim pi As Object
dim time
time = timevalue(now)
pi = hs.Plugin("Netcam")
Dim files As Collection = pi.getimages("Netcam Name of Camera")
If files.Count >= 2 Then
Dim latestImage As Integer = 2
Dim strFileName As String = files(latestImage).Replace("_thmb","")
hs.WriteLog("Info", "File to send: " & strFileName)
hs.SendEmail("MyMailAdress@gmx.com", "My MailAdress@gmx.com", "My image "&time, "My image", strFileName)
End If
End Sub
This script doesn't work in HS3, Log says:
Running script C:\Program Files\HomeSeer HS3\scripts\Netcam.vb :Exception has been thrown by the target of an invocation.Public member 'Plugin' on type 'hsapplication' not found.
I know nothing about vb scripts, can anyone adapt that script for me?
Comment