Announcement

Collapse
No announcement yet.

Script to e-mail NetCam pictures

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to e-mail NetCam pictures

    Migrating from HS2 to HS3.

    I used to have a script in HS2 that sends a picture from the front door camera to a predefined e-mail addres when somebody rings the doorbel.

    When trying to use the script in HS3 it fails on pi = hs.Plugin("Netcam")with

    Running script C:\Program Files (x86)\HomeSeer HS3\scripts\E_mail pictures.vb :Exception has been thrown by the target of an invocation.Public member 'Plugin' on type 'hsapplication' not found

    I believe this is caused because HS3 deals with plugins in a different way.

    Is a new sample script available to send NetCam pictures?

  • #2
    I just use events for that?

    Regards
    Morten

    Comment


    • #3
      Taking the pictures, no problem but how do i send the 3rd picture out of 5 using an event?

      Comment


      • #4
        I just send CurrentImage.jpg. Works fine with two cams. But in theory I can get in trouble. :-)

        Comment


        • #5
          Yes, current image works but I liked the flexibility of choosing which foto to send out of a range of 5.

          Still trying to understand how to modify the script below to get it to work in

          HS3
          Code:
          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("XXXXXX")
          
          	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("X@X.X", "X@X.X", "Deurbel "&time, "Voordeur", strFileName)
          		hs.SetDeviceString ("Z99", strFileName, True)
          	End If
          
          
          End Sub
          I believe the answer can be found at http://homeseer.com/support/homeseer..._functions.htm but I have no idea how to apply this to the NetCam plug in.
          Last edited by fvhemert; April 5th, 2016, 02:57 AM.

          Comment


          • #6
            Originally posted by fvhemert View Post
            Yes, current image works but I liked the flexibility of choosing which foto to send out of a range of 5.

            Still trying to understand how to modify the script below to get it to work in .
            Did you ever find a way to ge this to work in HS3. I also just upgraded and used to email 3rd out of 5 type setup like you on HS2. But cannot figure it out on HS3.

            UPDATE:
            sort of a workaround, but I basically just captured the correct amount of pics then used the latest.jpg. I cannot do more than one event at a time, but as long as I don't have multiple triggers, it works ok.
            Last edited by charlesmbell; July 1st, 2016, 03:21 PM.

            Comment

            Working...
            X