Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foscam firmware #4

Open
scaret opened this issue Apr 3, 2015 · 8 comments
Open

Foscam firmware #4

scaret opened this issue Apr 3, 2015 · 8 comments
Labels

Comments

@scaret
Copy link

scaret commented Apr 3, 2015

I think the project depends on some specific foscam firmware version.

The project doesn't work for my foscam 2.51.1.30 Since I had a look at the cgi api URLs and found them different in the source code of the project.

@fvdm
Copy link
Owner

fvdm commented Apr 3, 2015

That's quiet possible and what I wanted to use the setup function for, to figure out the endpoints. I kind of reverse engineered mine.

Can you list the urls and their expected function for your camera?

@fvdm fvdm added the question label Apr 3, 2015
@scaret
Copy link
Author

scaret commented Apr 9, 2015

I tried to update the status() function here:

scaret@20ba886

My foscam camera is EH8135 V3, System firmware 1.9.1.11, Application firmware 2.51.1.30

@sjlynch
Copy link

sjlynch commented Oct 15, 2015

Yeah it looks like they changed their SDK and then hid it from the public. http://foscam.us/forum/new-sdk-cgi-application-t13426.html

Really disgusting of them. I definitely won't buy from them and I'll urge my company to find alternatives next time.

EDIT: So you can reverse engineer the API by using their plugin. I might add a pull request later that allows you to specify an application version. I don't know however if the application version or the firmware version directly correlates to the API version. For example, is it possible for application versions 2.11 and 1.9 to share the same API? Not sure what value to key off of.

@scaret if you're still working on this it might be useful to work together to figure out what is safe to key off of.

For application version 2.11.1.10, firmware 1.4.1.9 and model FI9821W V2 I have the following commands to move right and then stop:

http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzMoveRight
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzStopRun

@sjlynch
Copy link

sjlynch commented Oct 15, 2015

Here is everything I could extract with the plugin for application version 2.11.1.10, firmware 1.4.1.9 and model FI9821W V2. Not sure yet how to take a picture or stream video to a web frontend.

// http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzStopRun
// http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzMoveRight
// http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzMoveTopLeft%261444940677501
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzMoveBottomRight%261444940695376
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzReset%261444940710780

//IR
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DopenInfraLed%261444940739802
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DcloseInfraLed%261444940751175

//Preset
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzGotoPresetPoint%26name%3DBottomMost%261444940777824
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DptzAddPresetPoint%26name%3Daaa%261444940808088

http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetMainVideoStreamType%26streamType%3D0%261444940885709
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetMainVideoStreamType%26streamType%3D1%261444940870138
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetMainVideoStreamType%26streamType%3D2%261444940902215
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetMainVideoStreamType%26streamType%3D3%261444940915238

http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetPwrFreq%26freq%3D1%261444940923726
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DsetPwrFreq%26freq%3D0%261444940933890

http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DlogIn%26usrName%3Dadmin%26pwd%3Dadmin%26groupId%3D939486238%261444939491825
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DgetProductAllInfo%261444939492035
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DgetGuideMode%261444939492409
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DmirrorVideo%26isMirror%3D1%261444941091355
http://ip:port/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3Dadmin%26cmd%3DgetDevInfo%261444941126511

@scaret
Copy link
Author

scaret commented Oct 16, 2015

Thank you for your information.

Actually foscam tech support gives a good documentation for the new cgi api. For example, to take the snapshot you can visit /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2. This will be helpful to you. You can give me an email address and I send the doc to you.

I don't like the idea to support different versions of Foscam firmware. But since functionalities for PTZ cameras are nearly the same, it's reasonable to do that. For me, I'll just start another repo and ignore the old one.

About whether I'm still working on this area, I'll say, yes. But foscam CGI API is not enough for me, so I tried some other stuff like ONVIF. Actually I'm not using foscam now, because foscam is lack of an important feature for me, which is getting the current PTZ status.

@lightswitch05
Copy link

I just published foscam-client which is made to work with the newer cameras. It is just a v0.0.1 release, but the basics are all there.

@lightswitch05
Copy link

@scaret there is a newer version of that documentation in my repo: https://github.com/lightswitch05/foscam-client/blob/master/HD%20cameras%20SDK%20CGI%20(1)/Foscam%20IPCamera%20CGI%20User%20Guide-3518%20Ver.1.0.10.pdf

I've implemented most of the get functions. I haven't had time to do a lot of the set functions. Pull requests welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants