Manage IP Cameras without SecuritySpy?

Posted on
Fri Dec 06, 2013 11:27 pm
discgolfer1138 offline
User avatar
Posts: 45
Joined: Jul 28, 2011
Location: Golden, CO

Re: Manage IP Cameras without SecuritySpy?

I've been using evocam for years to great success.. All I'm using it for these days is uploading 10 different webcams captures up to my webserver via rsync and streaming one firewire cam.

But, on the odd chance, any of you folks have Foscam cameras... I recently published an indigo plugin to support a bunch of useful actions (movement, image capture, etc.). Thought I'd share :)

It's totally free and any input or feedback is greatly appreciated.

https://github.com/discgolfer1138/indigo-foscam/

Indigo 6.1.0 | Mac Mini | OS 10.10.3 (Yosemite)
Fork Me on GitHub!

Posted on
Sat Dec 07, 2013 10:41 am
matt (support) offline
Site Admin
User avatar
Posts: 21422
Joined: Jan 27, 2003
Location: Texas

Re: Manage IP Cameras without SecuritySpy?

Great -- thanks for sharing it.

So folks can find the plugin more easily, we should set you up with a sub-forum here. If you are interested, then see this post and send us an email with the info we need.

Image

Posted on
Sun Jan 19, 2014 10:29 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Manage IP Cameras without SecuritySpy?

berkinet wrote:
ckeyes888 wrote:
Curious how anyone may be handling retrieving camera images/videos remotely. ...

I have a short shell script I run that captures 60 still images at 1 second intervals. The script is started in a Trigger that starts when our gate opens. Each set of images is stored in a separate folder and the folder name is a timestamp. If you load all the snapshots into Preview, you can go through them like a deck of flip-cards.

You would want to change the options to suite your needs. You will also need to figure out the URL for viewing a still photo on your camera. You can tune the script for fewer or more images and shorten ( sleep times less than 1 sec are supported on OS X only) or lengthen the interval.

CAVEAT: Some camera are slow responding and may not be able to handle requests this frequently. You could modify this script to link one of the photos to a static filename used to display an image in a control page. Though, I haven't tried that yet.

Here is the script. Let me know if you have any questions.

Code: Select all
#!/bin/ksh

# Set a few static options
PIC_FOLDER=/var/Portail_Photos
URL=http://192.168.5.37/IMAGE.JPG
DELAY_TO_START=0
INTERVAL=1
MAX_PIC=60
USERNAME=user
PASSWORD=pass

# ----- Do not change anything below this line -----
DATE=`date +"%y-%m-%d-%H_%M_%S"`
TARGET_DIR=${PIC_FOLDER}/$DATE
mkdir  $TARGET_DIR

sleep $DELAY_TO_START

for i in {1..$MAX_PIC}
do
        FNAME=${TARGET_DIR}/PIC-${i}.jpg
        curl -s -u ${USERNAME}:${PASSWORD} $URL >$FNAME
        sleep $INTERVAL
done


EDIT: This is all fixed up on my end and working.
Berkinet, I have picked up some TriVision 336PW IP cameras for the house. The URL for getting a still is "http://{user}:{pass}@{IP address}live/0/jpeg.jpg? How would I put that command into an action group as an embedded script to send commands directly to the camera via a control page? I looked at cURL but don't think I have the syntax correct.

Also, I copied your script into an action group Python editor embedded script window, and it throws an "embedded syntax" error, right at the first line, in your script "PIC_FOLDER=/var/Portail_Photos" and in mine even though I had created a folder named "Portail_Photos" in /var/ directory (will be changed later).

when that line is commented out it still throws the error. Does this need to be in an external script? Sorry for the noob questions, but what editor do you prefer for Python?

any ideas?
Last edited by hamw on Fri Jan 02, 2015 8:33 am, edited 1 time in total.

Posted on
Thu Jan 01, 2015 10:54 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Manage IP Cameras without SecuritySpy?

Never mind about this; I did it with Berkinet's and Nathan's scripts as noted below....
Last edited by hamw on Fri Jan 02, 2015 7:01 am, edited 2 times in total.

Posted on
Thu Jan 01, 2015 9:16 pm
tadg offline
Posts: 29
Joined: Feb 13, 2008
Location: San Diego, CA

Re: Manage IP Cameras without SecuritySpy?

So, I just yesterday updated the Indigo mini to Yosemite, and it appears to have broken email for me as well.

My script still works fine, but emails are not being sent out from the computer. I suspect that I had set up a mail relay through another server, or I had set up some SMTP authentication that didn't survive the upgrade from mountain lion.

So one quick way to narrow down the problem is to type "mailq" on the command line of the server in question. I suspect that you will find a whole bunch of mail messages listed with various error messages. If it returns nothing, then the script is broken, to troubleshoot that, I'd remove the final pipe at the end into sendmail, replace that with a > to a file and verify that the script is producing something that looks like a good email, with proper headers and mime formatting.

If you do have a bunch of messages in your mail queue, that is a much more complicated issue to troubleshoot. Most likely you need to tell OS X how to send mail via your ISP and give it an account/password. Troubleshooting this is getting my hobby perilously close to my day job! But I will look at it later once the kids have gone to bed.

Tad

Edited to include the following answer:

The Yosemite upgrade re-enabled IPv6, and the google DNS servers were returning an IPv6 answer for the location of smtp.gmail.com. My ISP doesn't support IPv6, so all the connections were failing. Disabling IPv6 in the network control panel, and restarting postfix fixed the problem.

For others venturing down this path, this post explains how to set up postfix to relay mail through gmail: http://www.anujgakhar.com/2011/12/09/using-macosx-lion-command-line-mail-with-gmail-as-smtp/ and this post adds an additional step for yosemite support: http://stackoverflow.com/questions/26447316/mac-os-x-10-10-yosemite-postfix-sasl-authentication-failed
Last edited by tadg on Sat Jan 03, 2015 3:15 pm, edited 1 time in total.

Posted on
Thu Jan 01, 2015 10:52 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Manage IP Cameras without SecuritySpy?

I adapted Berkinet's Unix script to send a couple of pictures to some files I set up, and have adapted Nathan Sheldon's email to send the files to me in an email. It all works -- :D -- except for one thing: when I set up a trigger, and make an action to run Berkinet's unix script via "do shell script "/user...." in Indigo, the script returns "permission denied". I tried "chmod +x filename" without success.

Never mind. I looked it up and ran "chmod a+x filename" and it now works. Thanks to everyone for their thoughts on how to send images without SS. or other scriptable software. Any other ideas as to how to get more functionality out of these cameras would be appreciated!

Happy New Year!

Posted on
Wed Mar 25, 2015 2:07 am
martacc offline
Posts: 2
Joined: Mar 24, 2015

Re: Manage IP Cameras without SecuritySpy?

Hi
Just bought Indigo Pro and I am getting ready to choose and buy my devices. Maybe I am starting with the most complicated part, but surveillance cameras are one of the main reasons for my Home automation project. Can you tell me what's the best choice of cameras for outdoor use , that I can later on control / lifestream with Indigo? I've been looking at Foscam ( 8 series, because I've heard 9 series are troublesome) I DO NOT want something like Security Spy to control my cameras. I want Indigo to do the trick!! Please help Thank you! :P

Posted on
Wed Mar 25, 2015 9:13 pm
jay (support) offline
Site Admin
User avatar
Posts: 18247
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Manage IP Cameras without SecuritySpy?

Indigo directly supports cameras that present a refreshing static image URL.

There is also a 3rd Party Plugin that works with Foscam cameras though we don't have any personal experience with it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed May 27, 2015 8:54 pm
chasyori offline
Posts: 27
Joined: Dec 18, 2014

Re: Manage IP Cameras without SecuritySpy?

How can I view a foscam in indigo pages.. can anyone help me out on this... thanks...

Posted on
Sat Apr 29, 2017 4:44 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Manage IP Cameras without SecuritySpy?

I've been using the image grab script and email send script for some time now. However, I recently upgraded to Sierra. The only script that seems to have broken is the email send script that attaches the captured images into an email and sends them off. The script sends the email with the body and the pre-defined headers for the images, but the images are not attached. The images are definitely being captured and stored correctly in private/var/ etc as I reference them in a "motion detected" URL page in Indigo and that continues to work.

The Applescript editor shows that the script is hanging at the end here:

send thenewmessage
repeat while background activity count > 0 <---------- this is what is highlighted in the applescript editor
delay 0.5
end repeat

Any advice?
.

Posted on
Sun Apr 30, 2017 2:33 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Manage IP Cameras without SecuritySpy?

You can also check out my Security Camera plugin. Adds motion detection, recite by, playback, and a couple different types of image displays for control pages.


Sent from my iPhone using Tapatalk

Posted on
Mon May 01, 2017 7:03 am
Different Computers offline
User avatar
Posts: 2579
Joined: Jan 02, 2016
Location: East Coast

Re: Manage IP Cameras without SecuritySpy?

I can't recommend the Security Camera plugin enough!

Works great, with the caveat that since SC does a lot of image processing, it's going to utilize much more of your Indigo Mac's resources.

Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana. UnifiAP

Posted on
Tue May 02, 2017 7:03 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Manage IP Cameras without SecuritySpy?

Does the SC plugin require Indigo 7?

I am still with Indigo 6; at the moment I have 1 camera + the Netatmo Welcome which cannot be easily integrated into Indigo (a part from Away Mode + motion using IFTTT Netatmo Channel).
I am planning to add to cameras more

Posted on
Tue May 02, 2017 8:03 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Manage IP Cameras without SecuritySpy?

Currently, my preference would be to fix the existing AppleScript and then explore the plug-in later if needed. I have Sighthound for video monitoring on a 2013 iMac with 16 gigs ram and a 2 TBI SSD, so monitoring is taken care of. My concern is that my Indigo system runs on a 2010 Mac Mini and so processing and tenses software my really bog it down.

Posted on
Tue May 02, 2017 1:32 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Manage IP Cameras without SecuritySpy?

MarcoGT wrote:
Does the SC plugin require Indigo 7?

I am still with Indigo 6; at the moment I have 1 camera + the Netatmo Welcome which cannot be easily integrated into Indigo (a part from Away Mode + motion using IFTTT Netatmo Channel).
I am planning to add to cameras more


It was originally built in 6. I think the only issue you might have is the default main directory is set to the Indigo 7 structure. That can be changed in the plugin settings.


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 5 guests