Foscam Plugin - control/capture Foscam ip camera

I am just another humble hobbyist building plugins for fun. My plugins largely evolve from a desire to integrate devices in my home that have some form of web interface or api (webcams, a/v receivers, etc). I welcome your feedback, suggestions and challenges :)
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Foscam Plugin - control/capture Foscam ip camera

Post by autolog »

I am still working on it - it is in alpha state at the moment.

It works well enough now to do motion detection with Indigo polling the camera every 5 seconds.

I can pull down an instant snap from the camera and am currently working on the code to be able to scroll through images that have been collected when the motion detection is triggered. I am not using it capture video at the moment as I think that could use up too much space on that camera and it would be difficult to display in Indigo.

It still has rough edges - so not really in in a position to publish a plugin.

When it is a bit tidier I could let you have a copy on a "take it as you see it basis" i.e. I don't want to commit to maintaining it until I have more time available.
Will
Posts: 7
Joined: Sun Jul 19, 2015 2:19 pm
Location: Madrid, Sapin

Re: Foscam Plugin - control/capture Foscam ip camera

Post by Will »

Hello, I'm new at this forums but I've been playing around with domestics for a while now.
I am not a programer thus I cannot develop plugins, however I wonder whether it could be possible to include into the Foscan Plugin new states related with the motion detection that will allow to trigger actions. I'm talking about using the Foscam camera as a motion detection sensor.

Many thanks.
Guillermo.
User avatar
whmoorejr
Posts: 844
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Foscam Plugin - control/capture Foscam ip camera

Post by whmoorejr »

autolog wrote:I am still working on it - it is in alpha state at the moment.

It works well enough now to do motion detection with Indigo polling the camera every 5 seconds.

I can pull down an instant snap from the camera and am currently working on the code to be able to scroll through images that have been collected when the motion detection is triggered. I am not using it capture video at the moment as I think that could use up too much space on that camera and it would be difficult to display in Indigo.

It still has rough edges - so not really in in a position to publish a plugin.

When it is a bit tidier I could let you have a copy on a "take it as you see it basis" i.e. I don't want to commit to maintaining it until I have more time available.
I can't wait. I upgraded my door cameras to Foscam HD without thinking of what indigo was going to say about it. I miss my door bell snap shots.
Bill
My Plugin: My People
User avatar
whmoorejr
Posts: 844
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Foscam Plugin - control/capture Foscam ip camera

Post by whmoorejr »

Trying to work around the whole HD thing with applescript (how I use to email snapshots to myself). The URL is the snapshot, but it keeps saving a zero KB .jpg .... I swear this use to work. This is what I have.... can someone point out where I'm goofing up?

Code: Select all

set {tUrl, dFolder} to {"http://10.0.6.181:8081/cgi-bin/CGIProxy.fcgi/1.jpg&?cmd=snapPicture2&usr=mainuserid&pwd=mypassword ", "~/Desktop/IPCam/"}

set {oAStid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
set fName to (last text item of tUrl) as string
set AppleScript's text item delimiters to oAStid

do shell script ("mkdir -p " & dFolder & "; curl -A/--user-agent " & tUrl & " >> " & (dFolder & fName))

set theAttachment1 to POSIX file "/Users/service/Desktop/IPCam/1.jpg"

tell application "Mail"
	set newMessage to make new outgoing message with properties {subject:"Motion Received", content:"Attached Image" & return & return}
	tell newMessage
		
		set visible to false
		set sender to "[email protected]"
		make new to recipient at end of to recipients with properties {address:"[email protected]"}
		make new attachment with properties {file name:theAttachment1} at after the last paragraph
		
		(* change save to send to send*)
		send --<<<<---------------- change save to send to send
		(* change save to send to send*)
		
	end tell
end tell
delay 2
tell application "Finder"
	delete folder "IPCam"
end tell
When I copy and paste that URL into safari, it works.... so I'm stumped.
Bill
My Plugin: My People
Alphaman
Posts: 38
Joined: Sat Jun 07, 2014 11:10 pm

Re: Foscam Plugin - control/capture Foscam ip camera

Post by Alphaman »

autolog wrote:I am still working on it - it is in alpha state at the moment.
:
:
When it is a bit tidier I could let you have a copy on a "take it as you see it basis" i.e. I don't want to commit to maintaining it until I have more time available.
Since the code is open source and on github, would you have any problem posting it as a fork off the current released version and seeing if some others of us might be able to assist in some areas? I've got a couple 8000-series cameras, and one 9000 series, and one of the 8000's is starting to act flakey after about 3 years; I'd love to be able to upgrade it, but emailing snaps is an essential feature for me.

Thanks for your consideration!
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Foscam Plugin - control/capture Foscam ip camera

Post by autolog »

It doesn't bear much relationship to the original code, so I wouldn't be happy to fork it plus it isn't really in a state that I would be happy to publish :wink:

However, I will take another look at it and see what I can do with it as I would like to get it finished. :)

Thanks for the prompt :)
User avatar
TOPS
Posts: 169
Joined: Wed Jun 17, 2015 10:57 am
Location: London, England

Re: Foscam Plugin - control/capture Foscam ip camera

Post by TOPS »

Hi,

Just been reading through this topic and it looks great, the only problem i've got is actually getting my cameras live feed to display in control pages, I have 6 Foscam Cameras with a mixture of HD and standard ones, so far I have only managed to get one of the standard def cameras to show up in a control page, I guess this has something to do with a MPEG feed? I looked through Foscam's support threads and the show a way of changing one of the H.264 streams to MPEG but for the life of me I can't get it to work.

All I want to do is show a live feed from my cameras on a control page. At the moment I am not really interested in any other control but I guess that will come after I can get a feed to display,


Any help would be very much appreciated,

Best Regards,

Dave
User avatar
whmoorejr
Posts: 844
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Foscam Plugin - control/capture Foscam ip camera

Post by whmoorejr »

This has been working for me for a while.

Refreshing Image URL
Set Refresh rate to "Continuous" for smooth video <-- uses more bandwidth (I typically use 1 second)

For URL, use the following:
H264 Cameras:

Code: Select all

http://10.0.6.182:8082/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=master&pwd=donkey
replace "10.0.6.182:8082" with URL of your camera
replace "master" with your username for camera
replace "donkey" with your password for camera


MJPEG Cameras:

Code: Select all

http://10.0.6.122:82/snapshot.cgi?user=master&pwd=donkey
replace "10/0/6/122:82" with URL of your camera
replace "master" with your username for camera
replace "donkey" with your password for camera
Bill
My Plugin: My People
User avatar
TOPS
Posts: 169
Joined: Wed Jun 17, 2015 10:57 am
Location: London, England

Re: Foscam Plugin - control/capture Foscam ip camera

Post by TOPS »

:D :D Hi,

well, what can I say? apart from a very BIG Thank you, I have been playing around with this for months and have been getting nowhere, I reach out, get a reply and all is sorted in minutes.....thanks very much indeed,

Cheers,

Dave
SpikeB
Posts: 21
Joined: Fri Mar 04, 2016 6:47 am
Location: Netherlands

Re: Foscam Plugin - control/capture Foscam ip camera

Post by SpikeB »

Is there any news of a new foscam plugin for the 9000 series. :D
the41stside
Posts: 15
Joined: Sat Nov 21, 2015 12:33 pm

Re: Foscam Plugin - control/capture Foscam ip camera

Post by the41stside »

I will second that :D
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Foscam Plugin - control/capture Foscam ip camera

Post by Different Computers »

I third it. Confusing name, but my Foscam C1 is apparently a 9000 series as well.
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, Yamaha RX Receiver.
User avatar
Busta999
Posts: 714
Joined: Wed Mar 30, 2016 4:48 am
Location: Wales UK

Re: Foscam Plugin - control/capture Foscam ip camera

Post by Busta999 »

That is sad news that the C1 is not supported either.

I have just added 4 C1 cameras (£29 at Amazon.co.uk right now) to me existing 9000 series bullet cam.

Looks like Ill have to go the Security Spy way rather than the Foscam Plugin Way for now.

Really good idea though :-(
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Foscam Plugin - control/capture Foscam ip camera

Post by Different Computers »

Take a look at EvoCam for those C1s.

It's more processor intensive than SecuritySpy, but WAY cheaper and works great so far with Indigo for me, even including having EvoCam update variables in Indigo based on camera motion/status.
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, Yamaha RX Receiver.
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: Foscam Plugin - control/capture Foscam ip camera

Post by hamw »

Any updates on the plugin? I got a Foscam R2 HD, which I can pull a snapshot from, but no motion video and can't use PTZ commands with the plugin.
Post Reply

Return to “thechad.io”