Hack a camera - web interface enhancements (Foscam) en

By Johnny on Sunday 27 November 2011 23:00 - Comments (17)
Categories: software, usability, video, Views: 25.773

Foscam FI8918W
I recently purchased a IP-camera, a webcam in truest sense in that it is a camera that is directly connected to the web. Inside of it runs a web server which allow a stream video and audio to be directly accessed all over the world from any web browser!

But that's not all; the camera can also be configured and controlled over the web. Inside are two motors that enable you to pan and tilt the camera, so that it can look around.

The control interface uses ActiveX, a propriety technology that only works on Internet Explorer on Windows (not on mobile devices) and because it is a big security risk is often disabled.

Alternatively the webcam also provides a more "standard" based interface that works in almost any browser. However, the quality of this interface is somewhat disappointing, and could greatly be improved.

After doing some research I am convinced that it is possible to make an improved version of the web interface, and install it on the webcam as a firmware upgrade.

My camera is a Foscam FI8918W for which the firmware can be updated. There is already some code on SourgeForge that can decompile the firmware and repackage it. However, nobody seems to have released firmware with an improved web interface.

But even without modifying the firmware the web interface can be modified. Any application or web page that can decode a MJEG stream can display the video, and commands are sent to the camera as simple HTTP GET requests.
Some problems with the current web interface
1. No direct visual feedback
When clicking on a control there is no confirmation. You have to wait for the command to be sent, received by the camera, the motors to move, a new image to be captured and sent back to you. This might take a few seconds, especially when uploading the video stream over a home connection. For a video stream the lag is usually not a problem however when there is 2 way communication it is.

My solution: highlight control buttons when activated.

2. Click, reposition, click
The only way to control the camera is to click on the buttons. This requires you to move the mouse cursor between every click. This is cumbersome with a mouse, but outright annoying with a trackpad.

My solution: allow the mouse to move over the controls while being pressed. And also allow the keyboard to be used.

3. Continuous streaming
When accessing the web controls a video stream is shown next to it, taking up bandwidth and even slowing down the browser/computer. This may be undesirable when the stream is viewed through an external application (like VLC).

My solution: added option to disable and enable video stream.
Video
Here is a video which shows some of the changes I have made to the web interface for controlling the movements of the camera. Both by moving the mouse while holding the button down and using the keyboard to move the camera.

Next steps
While controlling the camera is much more fun now I want to see if I can make some some more enhancements. Here is some of the ideas I am thinking about:
  • Create a widget for Mac OS X Dashboard that can control the camera and view the video stream and cuts off the stream when the dashboard is not displayed.
  • Make it possible to save snapshots in the web interface using LocalStorage in the browser.
  • Allow the camera to send images directly to other web services.
  • Package these changes and release it as a Firmware update.
The number of features possible is limited by the camera's control capabilities and that of the web browser, but if anybody has some ideas for other features please let me know!
Online resources

Volgende: Mijn printer gaat vreemd 10-'12 Mijn printer gaat vreemd
Volgende: Iets positiefs over de NS 01-'11 Iets positiefs over de NS

Comments


By Tweakers user Xessive, Sunday 27 November 2011 23:35

Sounds like a nice little project!

Maaruh... "The number of features possible is limited by the camera's control capabilities and that the web browser, but if anybody has some ideas for other features please let me know!"

is nie correct english nie, hè.. :P

By Tweakers user RobIII, Monday 28 November 2011 00:29

En thanks :( Wéér wat op m'n "Want!" lijst... :N
Mooi prijsje voor zo'n ding, niet?

[Comment edited on Monday 28 November 2011 00:29]



By Tweakers user xost, Monday 28 November 2011 07:32

Zijn er niet meer van deze camera's gebaseerd op dezelfde hardware? Dus alleen een ander merkje erpo?

By Tweakers user mindcrash, Monday 28 November 2011 07:53

For those interested: ze zijn in ieder geval via het web te koop bij EUport en IPcam-shop.

By Tweakers user i-chat, Monday 28 November 2011 08:54

wat is de res voor deze dingen, en werkt dat nachtzicht een beetje, ik zie het nog wel gebeuren dat ik een of 2 van die dingen in m'n huis ga wegwerken aanzienlijk goeikoper dan een officieel bewakingssysteem.

By Tweakers user RobIII, Monday 28 November 2011 09:15

mindcrash wrote on Monday 28 November 2011 @ 07:53:
For those interested: ze zijn in ieder geval via het web te koop bij EUport en IPcam-shop.
Foscam.us doet aan gratis shipping naar NL en met een retailmenot.com korting van 10 5% (code "wifi1001") kom ik op $85,49 => ¤64,35. Dan ben je gek als je in NL bestelt lijkt me?

Bij EUPort kom ik op ¤91,65 + ¤6,25 verzendkosten = ¤98,90.
Bij IPCamShop is dat ¤91,70 + ¤6,70 = ¤98,40

[Comment edited on Monday 28 November 2011 10:07]


By Tweakers user Johnny, Monday 28 November 2011 10:51

i-chat wrote on Monday 28 November 2011 @ 08:54:
wat is de res voor deze dingen, en werkt dat nachtzicht een beetje, ik zie het nog wel gebeuren dat ik een of 2 van die dingen in m'n huis ga wegwerken aanzienlijk goeikoper dan een officieel bewakingssysteem.
De resolutie is 640x480 (VGA) of 320x240 (QVGA). Meer dan dat wordt een probleem met bandbreedte, zeker als je de videostream via wifi/internet wilt verzenden. Deze camera gebruikt de MJPEG-codec. Foscam heeft er ook enkele die H.264 gebruiken. Deze vereisen meer rekenkracht en zijn daarom duurder maar minder bandbreedte zodat het geen probleem is om er meer op hetzelfde netwerk te zetten. Als je er thuis meerdere aansluit op een bedraad Gigabit-netwerk is het uiteraard geen probleem.

Het nachtzicht is uitzonderlijk goed omdat er 13 IR-LEDs op zitten. Maar zelfs zonder deze kan je bij het inschijnend licht van een lataarnpaal nog wel zien dat er iets is, maar niet details zoals gezichten herkennen.

By Tweakers user glashio, Monday 28 November 2011 12:07

RobIII wrote on Monday 28 November 2011 @ 09:15:
Foscam.us doet aan gratis shipping naar NL en met een retailmenot.com korting van 10 5% (code "wifi1001") kom ik op $85,49 => ¤64,35. Dan ben je gek als je in NL bestelt lijkt me?
Besteld! Thx johnny & RobIII :>

By Tweakers user woekele, Monday 28 November 2011 13:26

Je loopt kans op ¤15 inklaringskosten + 19% btw over gehele bedrag, dus 64,35 + 12,23 + 15 = ¤91,58. Alsnog goedkoper dan in NL :)

By Tweakers user Xorsist, Monday 28 November 2011 19:13

Leuk dat je een blog posting in het engels wilt maken maar haal er dan ook een engelse spellingchecker overheen ;-)
verder een leuk stukje en een leuk project om op te zetten.

[Comment edited on Monday 28 November 2011 19:14]


By Tweakers user glashio, Friday 2 December 2011 21:00

Update: Binnen gekregen via foscam.us, is verstuurd uit UK dus geen invoerbelasting :) Dikke win, en wat een gave IP-Cam zeg!!!! Waus!

By Digi IT, Tuesday 29 May 2012 19:34

Hi,

Nice idea, was thinking something more drastic,

Total disassembly, using the motors as servos to work a small rover with embedded cam,

instead of pan/tilt the cam, to moving a vehicle foward/reverse and rotate with a fixed cam

Main change would be the direction of the control sliders on the screen,

Digi IT

By TheUberOverLord, Thursday 9 August 2012 17:41

Here are two examples, both with live demos. Both are free.

For MJPEG IP Cameras: http://foscam.us/forum/fr...-mjpeg-cameras-t2522.html

For H.264 Cameras: http://foscam.us/forum/fr...-h-264-cameras-t2686.html

By Bob, Tuesday 9 October 2012 21:35

Thank you for the article.

I was looking at adding a web page to the camera that is my only for my iphone and embed a couple iobridge controls to open and close my garage door.

Is it difficult to add pages?

Thanks.

Bob

By TheUberOverLord, Wednesday 9 January 2013 19:19

Bob wrote on Tuesday 09 October 2012 @ 21:35:
Thank you for the article.

I was looking at adding a web page to the camera that is my only for my iphone and embed a couple iobridge controls to open and close my garage door.

Is it difficult to add pages?

Thanks.

Bob
No, it's not.

Please see the bottom of the first post using the link below, for instructions on how to customize and update the IP Cameras Web UI, using a Windows based system:

http://www.openipcam.com/forum/index.php/topic,473.msg2577.html#msg2577

Don

By CasterLan, Monday 29 June 2015 15:04

How about object tracking?

Comment form
(required)
(required, but will not be displayed)
(optional)

Please enter the code from the image below: