Sunday 4 April 2021

Remote Webcams - a journey

For some time, we wanted to have a camera in the garage door (which is our main entrance) so that we could see when people arrived and, more to the point, who was arriving.

Version one was simply a 12 Volt automotive video camera and a matching 3.5 inch screen. That was fine, but it really wasn't what we wanted, so we looked at video doorbells.

Video Doorbells are wirelessly connected devices (powered from your old doorbell circuit) that allow opu to see and hear, and to speak to your visitors. Only one problem - they seem to all require the use of a current generation smart phone. That is a problem because (a) we only use cheap, PAYG mobiles (dumb phones) and (b) for good engineering reasons, we have no mobile signal inside the house.

Recently, I have been investigating all manner of cameras.

IP Cameras require a signal to the wireless router (we're back to those 2' thick walls). The older, wired ones, seem to also require the use of an app on your mobile phone. The really old ones that are simply accessible from the network are horribly expensive.

Of course, you can, in theory, access the wired (and want to be wireless) cameras - but there is no instruction on how to do this, what your username and password are or even where to look on the camera's server. Fine, I'm simlifying things here, but after 3 weeks of fiddling about with networks, software and a couple of IP cameras, I can safely say that they are more trouble than thye are worth (unless you have a bottomless wallet with an endless budget).

ESP-32-CAM. This is a dinky little thing comprising a development board with on-board wi-fi and a VGA or better camera. I have really enjoyed tinkering with these but they don't want to serve images via Ethernet (I'm still working on that). The one that I have installed in our front room is good enough - it even talks to the router (needing an external antenna to do so), but is hardly stable and crashes regularly. More tinkering is required. If I can solve the ethernet problem, then I'll probably use these in the garden eventually.

There is just one thing about these tiny boards, though .... The reset switch (a tiny little thing) is a pain to solder an extension onto so that the camera has an external reset switch. Why, oh why, can the designers of these things drop a couple of solderable test points on the edge of the board in order to allow the reset switch to be broken out?

USB Web Cams. One of the limitations of the humble-yet-trusty is that the maximum cable length for any USB device is 5m (just over 16 ft). I decided to try something I have never used - a USB-over-Cat5 extender.

This comprises two in-line modules, a host and a client unit. The host unit plugs into the computer USB port while the client has a socket for the remote USB device. The two are connected by a Cat 5 network cable terminated with RJ45 8-pin jacks.

The extender is almost transparent in use. Unfortunately there are limitations. Some cameras simply will not work. The cheapest ones I have simply don't want to play well; an old camera board (Venus USB 2.0) works well, if at reduced image quality, a brand new Agama V-2050AF I picked up on eBay is excellent, a good quality if inexpensive generic camera (I have 3), simply fails to work - or even be detected as being there.

Right now, I have the Venus camera looking out from over the garage doors and the Agama watching the bird table (actually a rat-proof "feeding station" - shame about the squirrel, though).

Software ....

Oh dear. What I wish to do is to capture the image streams from a number of cameras and to then broadcast them to the various machines on our home network.

My first thought was a Raspberry Pi. Whilst this is a wonderfully versatile and capable machine, it is hardly a V8 engine (especially since I have one of the originals). Stability, operability and staying power were questionable, especially after the machine decided to eat its own operating system.

My next attempt was an old net-top box (an Acer Revo) loaded with Windows 7 Pro. Again, not exactly a racing machine, and it all fell apart with monotonous regularity until it decided that it no longer owned any USB ports and it would stop accepting remote log-ins from the network.

My third attempt was with an old rebuilt machine with a 2.4GHz AMD Athlon processor with 2GB of RAM. It was loaded with Win XP Pro (64-bit version). This was better. Sadly, most of the software I was trying out didn't run properly on the machine.

Attempt 4 was the same machine as attempt 3, except that I replaced the RAM with 4GB of faster memory and replaced Windows XP with Windows 7 Pro. Surprisingly, the machine was a lot faster, a lot more stable and, wonder of wonders, ran all of the software. I used one of my spare OEM licences to activate the machine.

I *had* been planning on using that box as a workstation in my workshop (future project), but whatever ....

----

One of my criteria for software was that it should do what I want (deliver multiple video streams), using either free or very inexpensive software.

There are only two programs out there that fit these initial criteria, from among a vast array of computer-based video security systems that wouldn't re-stream the video except as replaying recordings.

WebcamXP 5 and YAWCam were the last programs standing. WebcamXP nearly did what I wanted, and was free ... for two video sources. Getting up to 8 was going to cost more than I was willing to pay.

YAWCam (Yet Another Web Cam) was free, but was un-maintained closed-source software. It is a bit buggy and only handles a single stream natively. Shenanigans, jiggery-pokery and outright cheating, however, will allow multiple sources to be streamed to different IP ports.

Unfortunately, YAWCam is a bit temperamental when deciding what camera to use when starting up and, being closed source, this cannot be fixed by a script/patch/hack or anything else - a pain since it is effectively abandonware.

Guess what? It looks like I'm going to end up writing my own application to stream multiple cameras to a client application that I already wrote (but needs some major fixing in order to release the clipboard for the user to actually use). Like everything else, this will probably be written in VB6 since I am barely a beginner with C/C++ and a non-starter with Java, C# or VB.net.

---- 


In the near future, I plan on trying out a USB video capture device to include the automotive camera (which functions as a door peep-hole) in the garage door, and if that works, there is another camera that looks out over the part of the garden close to the house that could be brought into use.#

Further on, I'd like to try building an appliance that simply displays a video stream selected from those available on the server.

----

Even now, I'm wondering about bringing in more information about the outside world - weather station type instrumentation - wind speed & direction, air temperature, shade and full sun temperature and water temperature of the fish pond. At least that's only microprocessor and serial stream stuff.

Perhaps I'll install low-voltage lighting in the garden, and enable remote control from the computer so that we can enjoy the garden at night without having to breathe the icy air.

Next year, maybe.