Make better use of your IP cam

Show or discuss your existing Home automation project here, so a detailed explanation!.....
Post Reply
AshaiRey
Senior Member
Senior Member
Posts: 1310
Joined: Mon Feb 02, 2009 5:27 pm
Location: Netherlands
Contact:

Make better use of your IP cam

Post by AshaiRey »

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
Bram
vincenttor
Member
Member
Posts: 344
Joined: Thu Jan 09, 2014 10:45 pm
Location: Netherlands

Re: Make better use of your IP cam

Post by vincenttor »

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 "http://192.168.1.27:83/JSON?request=runevent&group=test&name=camerapoort"
Still it worked haha
mvdarend
Starting Member
Starting Member
Posts: 17
Joined: Sat Nov 01, 2014 10:00 am

Re: Make better use of your IP cam

Post by mvdarend »

Thanks for the info, I hadn;t heard of ContaCam before, but it's exactly what I need for my system.
Post Reply

Return to “Home Automation Projects”