Page 1 of 1

email cam picture

Posted: Sat Nov 15, 2008 2:31 pm
by Edwin
Hi, with netcam my cam pictures are saved as: voortuin(2008-11-15at13-17-51-795) .jpg voortuin(2008-11-15at13-17-52-795).jpg etc.
i want to email the latest picture. how must i do that?
thanks edwin

email cam picture

Posted: Sat Nov 15, 2008 2:42 pm
by Snelvuur
does this one helps? http://www.domoticaforum.eu/topic.asp?TOPIC_ID=1365

// Erik (binkey.nl)

email cam picture

Posted: Sat Nov 15, 2008 2:44 pm
by TANE
this vb script will send the second photo in the last session (credits are for Lennart)

change the camname
change the email@isp.nl

save the script as name.vb

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("camname")

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("email@isp.nl", "email@isp.nl", "Homeseer Deurbel "&time, "Homeseer Deurbel", strFileName)
End If

End Sub

email cam picture

Posted: Sat Nov 15, 2008 2:45 pm
by TANE
Erik...link is better...:)

email cam picture

Posted: Sat Nov 15, 2008 3:14 pm
by Edwin
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Chak</i>
<br />Erik...link is better...:)

email cam picture

Posted: Sat Nov 15, 2008 3:35 pm
by TANE
script extension must be .vb

email cam picture

Posted: Sat Nov 15, 2008 4:24 pm
by Edwin
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Chak</i>
<br />script extension must be .vb