Make better use of your IP cam

Show or discuss your existing Home automation project here, so a detailed explanation!.....

Make better use of your IP cam

Postby AshaiRey » Sat Dec 19, 2015 10:14 am

I got a Foscam IP cam clone. It's a PTZ cam of about 30,-. It was standing on a high cupboard in the living room and was only in use as a surveillance camera when the alarm was on. But there is more possible with cam's like these then just collecting dust.

For example use it as an array of motion detectors. It's possible to divide the image the camera sees into different areas and to give each area it's own 'weight' when to trigger an event. I know this is possible with software like Blue Iris but that is a really heavy piece of software.
I found something different to use and it's working flawless for months now.

I use this little gem ContaCam for it. It's a light weigth program that only take 6% CPU on my Atom 1.6Ghz PC running HS. It can find your cam over IP so when it is in your netwerk it can connect to it and it can monitor more then one cam at a time. I configured it so that when it detect movement in a area a device in HS will be set ON and an event in HS handle the rest. In my case that is turning the music on only when the TV isn't on.

How it use it.
When ContaCam detects movement it starts a batch file and passes the parameter Woonkamer
This batch file contains this line
Code: Select all
wscript "C:\Program Files\HomeSeer HSPRO\Scripts\AZ_DoCamMotion.vbs" %1

The batch file starts a .vbs file that updates HS
Code: Select all
' Respond to motion detected with camera

    Dim Debug
    Dim strLogfileTitle
    Debug = 1
    strLogfileTitle  = "<b>AZ_DoCamMotion</b>"

    Dim hsi
    Dim hs
    Dim rval

    set hsi = createobject("HomeSeer2.application")
    hsi.SetHost "localhost"
    rval = hsi.Connect("default","default")

    if rval <> "" then
      'wscript.echo "Connection failed"
    end if

    set hs = hsi.GetHSRef

    Dim argument
    argument = Ucase( WScript.Arguments.Item(0) )

    If Debug = 1 Then hs.WriteLog strLogfileTitle, "Motion detected in " & argument

    If argument = "WOONKAMER" then
      hs.ExecX10 "B17","ON"
    end if
Senior Member
Senior Member
Posts: 1307
Joined: February 2009
Location: Netherlands

Re: Make better use of your IP cam

Postby vincenttor » Sat Dec 19, 2015 12:13 pm

Thats nice Bram,
i was actually or am busy with different software then blueiris as well.
I found Ispyconnect to be working ok, and the cpu usage is much lower then BI.

This would be better for a solution like this , since it uses even less then ispyconnect- with this i was testing ANPR and when a licenseplate was found i triggered a json url that triggered a event in homeseer.
Just simply using this to trigger, could be done here also i guess.
Only down side of my solution was the downloads of the url i called with Wget :)
Code: Select all
wget ""

Still it worked haha
Posts: 343
Joined: January 2014
Location: Netherlands

Re: Make better use of your IP cam

Postby mvdarend » Mon Dec 21, 2015 9:51 am

Thanks for the info, I hadn;t heard of ContaCam before, but it's exactly what I need for my system.
Starting Member
Starting Member
Posts: 17
Joined: November 2014

Return to Home Automation Projects

Who is online

Users browsing this forum: No registered users and 1 guest