Easily connect to your Foscam IP cameras with this lightweight Java library. One command is all it takes.
FoscamAPI is suitable for all Foscam IP cameras.
It is tested on the FI9900P.
// Connect to the camera
Foscam camera = new Foscam("192.168.1.40", 88, "username", "password");
// Do whatever you want
camera.setSharpness(90);
...
Supported devices
All IP cameras are known to support FoscamAPI, but there are some exceptions:- Cloud, push and audio controls are not supported by 3518A based cameras
- Humidity, LED and HDR controls are only supported by FosBaby P1 and FI9900P
- Nightlight controls are only supported by FosBaby P1
Maven dependency
Use FoscamAPI in your Maven project.
<repository>
<id>foscamlib-mvn-repo</id>
<url>https://raw.github.com/hypothermic/foscamapi/mvn-repo/</url>
</repository>
<dependency>
<groupId>nl.hypothermic</groupId>
<artifactId>foscamlib</artifactId>
<!-- If you're using Maven3, specify version num -->
<version>LATEST</version>
</dependency>
Gradle dependency
Use FoscamAPI in your Gradle or Android Studio project.
repositories {
maven {
url "https://raw.github.com/hypothermic/foscamapi/mvn-repo/"
}
}
dependencies {
// Note: use 'api' instead of 'compile' if you're using Android Studio.
compile group: 'nl.hypothermic', name: 'foscamlib', version: '1.07-RELEASE'
}
Troubleshooting
If you are having issues with FoscamAPI or any component:- Make sure your camera firmware is up to date. Do not ignore this step.
- Check the Javadoc or the GitHub Pages if you are using the method correctly.
- Open an issue where you describe the problem you're having. Include your camera model and firmware version.
Changelog
Changes made in the latest versions:- v1.08
- Added cloud controls
- Added push controls
- Added nightlight controls
- Added humidity getter
- Added HDR controls
- v1.07
- Added storage controls
- Added audio volume controls
- Added PTZ cruise controls
- Added getters for image attributes
- Renamed project from FoscamLib to FoscamAPI
- Maven artifactId was not renamed
Common sources
Useful information for fellow developers:http://www.camarasip.es/descarga/IP_Camera_CGI_(SDK).pdf
https://www.foscam.es/descarga/Foscam-IPCamera-CGI-User-Guide-AllPlatforms-2015.11.06.pdf