Kitz Forum

Chat => Tech Chat => Topic started by: burakkucat on March 14, 2013, 01:55:22 AM

Title: Sheddy-cam View
Post by: burakkucat on March 14, 2013, 01:55:22 AM
Once every day, I will check various links that I have bookmarked. One such link is to the Sheddy-cam (http://sheddyian.hopto.org/webcam.shtml) which shows the garden in Sheddy-land.

On checking that link yesterday and just a moment ago, b*cat was saddened to see that only a rainbow bar display was visible.  :(

It is hoped that there is no serious equipment malfunction in the relevant Sheddy-department at Sheddy-land.  :-\
Title: Re: Sheddy-cam View
Post by: roseway on March 14, 2013, 07:24:14 AM
It looks as though the satellite link has gone down. :)
Title: Re: Sheddy-cam View
Post by: sheddyian on March 14, 2013, 11:15:08 AM
Oops, sorry I was asleep!   :-[

It's running on Windows XP on an old laptop with a broken screen.  I think this is the optimum shed computer.

What happened was this :

I applied yesterday's Microsoft Security Updates remotely, and rebooted it remotely.

Occasionally after it's rebooted, the webcam fails to initialise.  I must admit I thought I'd resolved that problem, as it's not done it for about 5 months now. 

So, my fault that I didn't check it had restarted ok.

I'll go and kick it shortly.

Ian

Title: Re: Sheddy-cam View
Post by: sheddyian on March 14, 2013, 11:29:55 AM
All fixed now!

Anyone is welcome to view my tatty back garden, which has the grand pretensions of being a wildflower meadow, but is currently bare earth, weeds, a birdtable and a little bit of snow, here : http://sheddyian.hopto.org (http://sheddyian.hopto.org)

And before anyone grumbles about it running on Windows, my plan this year is to set up a Raspberry Pi webserver, make it solar powered and move it over to that.  8)

I've currently got one of those car battery top up panels on the shed roof, trickle charging a battery that I use for occasional lighting, so I'll probably expand that in some way to power the pi as well, with mains top up if the weather is bad.

Ian
Title: Re: Sheddy-cam View
Post by: burakkucat on March 15, 2013, 02:33:42 AM
Excellent news. I feel a little lost without my daily view of things exotic!  ::)

BGW == SNAFU  :P
Title: Re: Sheddy-cam View
Post by: sheddyian on March 15, 2013, 12:56:10 PM
Excellent news. I feel a little lost without my daily view of things exotic!  ::)

BGW == SNAFU  :P

An awful lot of the problems that Windows gets (unfairly!) blamed for are caused by poor hardware or shoddy 3rd party drivers.  I suspect that to be the case here - the webcam I'm using is a cheapo Sweex branded one I got in a Maplin sale.  It's chief selling point for me was it's reasonable resolution and manual focusing - didn't want fixed or auto for a garden webcam!

Unplugging and reconnecting the USB webcam fixed yesterdays problem, without rebooting Windows!

Anyway, that said, I've just taken the plunge and ordered a 512Mb Raspberry PI model B from CPC, with the intention of making it into the new shed webserver, despite my use of Linux being restricted to the use of ls and cat commands.  I also once briefly dabbled with vi.  ???

What have I just done?  :no: :no: :no:

Ian
Title: Re: Sheddy-cam View
Post by: broadstairs on March 15, 2013, 01:05:47 PM
So now you are going to have a real Operating System to play with  ;) ;)

Stuart
Title: Re: Sheddy-cam View
Post by: tickmike on March 15, 2013, 03:03:05 PM
So now you are going to have a real Operating System to play with  ;) ;)

Stuart

+1   :thumbs:    :linux:
Title: Re: Sheddy-cam View
Post by: silversurfer44 on March 15, 2013, 04:59:53 PM
I'm on the band waggon.  :thumbs: :clap:
:linux:
Title: Re: Sheddy-cam View
Post by: burakkucat on March 15, 2013, 09:16:04 PM
Just purrfect!   :thumbs:
Title: Re: Sheddy-cam View
Post by: sheddyian on March 23, 2013, 01:50:02 PM

Well, as posted above, I ordered my Raspberry PI from CPC on the 15th of March, and it hasn't arrived yet.

Wasn't too bothered, as I know there has been high demand with stocks always running out.

But I've just logged on to the CPC web site, looked at my order status to see when it'd be in stock, only to find it was dispatched on the 16th March.  "delivery usually next day".  But it hasn't arrived yet!  :'(

Today though, I did get a catalogue from CPC, so they've clearly got my address correct.

Phone calls on Monday I think.  >:(

Ian
Title: Re: Sheddy-cam View
Post by: kitz on March 23, 2013, 05:05:34 PM
eke....  hope you get it sorted
Title: Re: Sheddy-cam View
Post by: silversurfer44 on March 23, 2013, 07:04:10 PM
I also hope you get ti sorted soon.  :fingers:
Title: Re: Sheddy-cam View
Post by: sheddyian on March 24, 2013, 06:31:06 PM
PI found!

It had arrived a week ago and I didn't realise.

I am an idiot.  :-\

Explanation in this thread here : http://forum.kitz.co.uk/index.php/topic,12333.msg232818.html#msg232818 (http://forum.kitz.co.uk/index.php/topic,12333.msg232818.html#msg232818)

Ian
Title: Re: Sheddy-cam View
Post by: sheddyian on April 07, 2013, 05:31:59 PM
Pi sheddy cam update

Well, I've been struggling my way up the learning curve of Windows -> Linux, and the other day I got all of the html working on the PI. 

Permissions and case-sensitivity were the main two issues!

So, with the bare bones working, and a manual way of getting the webcam to take snapshots every 30 seconds, I set it all up in the shed.

Outcome : failure  :(

When testing indoors, I was using a Logitech C310 WEbcam that I usually use for Skype on my Windows 7 machine.  This worked quite happily on the Raspberry Pi using the command line tool fswebcam to grab still images.

When I connected the Pi up to the shed webcam, which is a Sweex WC250 http://www.sweex.com/en/assortiment/sound-vision/webcams/WC250/ (http://www.sweex.com/en/assortiment/sound-vision/webcams/WC250/), all I got was either an almost white image, or an error saying the input was corrupt.

Out of my two cams, this is the one I want to use in the shed, because it has a manual focus.  (extremely manual - you screw the lens in and out!)  The Logitech is fixed focus, at fairly close range - it looks blurry at longer distances.

But out of curiosity, I tried the Logitech webcam on the Pi in the shed, and got a distinctly unimpressive picture, mildy out of focus, but looking like a 1960's image.  The colour balance was all wrong.

Of course, on Windows XP, there is an option on the webcam to have auto white level and various other settings *even without a driver*, but I can't see a way of adjusting this in Debian Wheezy on the Raspberry Pi.

So, although the Pi is almost working as a webserver and Webcam host, I've switched back to Windows XP again because I can't get the camera to work :(

Why doesn't Linux support webcams out of the box, as Windows has done since XP?  Providing they're compliant (most are), they just work and appear as imaging devices.  Of course, installing specific Windows drivers might give you extra functionality, but otherwise they just work.  Was disappointed this doesn't extend to Linux. 

Or does it, and I've missed something?

[EDIT]
I have missed something, there is incomplete support of UVC for UVC compliant webcams in the Linux Kernel, it would appear
http://www.ideasonboard.org/uvc/ (http://www.ideasonboard.org/uvc/)

Incomplete, because the bit I want, individual snapshot, isn't implemented!

Ian
Title: Re: Sheddy-cam View
Post by: broadstairs on April 07, 2013, 05:54:26 PM
I suspect you will find this a lot with peripherals and Linux, the usual problem is that for Windows the hardware comes with a driver or it is already supplied in Windows and a lot of hardware manufacturers wont supply drivers for Linux because everyone expects the code to be open source. I have a Logictech webcam which works with Linux although I dont use it much. I cant remember what model though and its not on the cam itself.

Stuart

PS> I just found the manual which says its a QuickCam E3500
Title: Re: Sheddy-cam View
Post by: c6em on April 07, 2013, 06:21:19 PM

this is was amuses/gets me about Linux.....
We get told how everything is open sourced etc and it's one happy family but then I read endless stories on forums over many years of the various problems people have getting all sorts of things to work: from wireless cards to graphics cards and the rest - because they don't have the driver - or because the open source driver they have..well, it sort of works but doesn't really.
Now I appreciate some derive enjoyment from sorting it out/fixing.......but this is not how mainstream computing for the masses can ever work....

I tend to sit here scratch my head and think time is money. In MSWindows you buy the thingy, download the driver run the installation program - and it works end of.
Title: Re: Sheddy-cam View
Post by: asbokid on April 07, 2013, 06:27:54 PM
There's a bit of a teardown of a device with the same UVC controller as used in that Sweex [1]. It looks good.  The controller is the VC0342 from Vimicro.   [2]  The datasheet for that IC isn't available, and at least part of the API for it is closed standard. [3]

Once bitten, twice shy.  When buying new hardware, I always check beforehand that there's a Linux driver. And where there's no Linux driver, I pointedly tell the manufacturer that I won't be buying it for that reason!   :o

cheers, a


[1] http://tim.cexx.org/?p=750
[2] http://www.vimicro.com/english/product/d_vc0342.htm
[3] http://article.gmane.org/gmane.linux.drivers.uvc.devel/5880/match=vc0342
Title: Re: Sheddy-cam View
Post by: sheddyian on April 07, 2013, 06:53:49 PM
There's a bit of a teardown of a device with the same UVC controller as used in that Sweex [1]. It looks good.  The controller is the VC0342 from Vimicro.   [2]  The datasheet for that IC isn't available, and at least part of the API for it is closed standard. [3]

Once bitten, twice shy.  When buying new hardware, I always check beforehand that there's a Linux driver. And where there's no Linux driver, I pointedly tell the manufacturer that I won't be buying it for that reason!   :o

Thanks!  I'll have a look at that!

As this is all new to me, some of my stumbling and frustration is from ignorance.  I've just been reading up some more and found (possible) ways of adjusting camera exposure levels and suchlike, though as yet I don't know if it's an X-Windows program or command line - I'm deliberately sticking to command line stuff on the Pi to keep memory usage down.

As to telling the manufacturer, yes I agree, though at the moment I'm trying to get the thing to work with existing hardware :)

The Sweex camera isn't bad, was nice and cheap, and has the increasingly-rare manual focus adjustment, so I'd be keen to carry on using that if I can.

Ian
Title: Re: Sheddy-cam View
Post by: asbokid on April 07, 2013, 07:05:42 PM
Does it work okay on the PC in Debian?  Is it possible that the driver hasn't ported properly to the arm platform of the Raspberry Pi?

cheers, a
Title: Re: Sheddy-cam View
Post by: sheddyian on April 07, 2013, 07:07:25 PM

this is was amuses/gets me about Linux.....
We get told how everything is open sourced etc and it's one happy family but then I read endless stories on forums over many years of the various problems people have getting all sorts of things to work: from wireless cards to graphics cards and the rest - because they don't have the driver - or because the open source driver they have..well, it sort of works but doesn't really.
Now I appreciate some derive enjoyment from sorting it out/fixing.......but this is not how mainstream computing for the masses can ever work....

I tend to sit here scratch my head and think time is money. In MSWindows you buy the thingy, download the driver run the installation program - and it works end of.

I kind-of agree with that, though I am trying to stay open minded about it, and I am interested in learning more about Linux.

My experience so far is this :

When you want to do straightforward stuff, it all works ok.

When you start getting a bit more involved, it suddenly feels like Windows 3.11 / DOS - it quickly gets very complicated and there's lots of files to edit and parameters to change.

Perhaps Windows has made us all a bit lazy though :)

BTW, a lot of the software that I run on my Windows machines is open source.  I'll have to do a tally, but I use remarkably little proprietary software, though my biggest usage (web/email) is Chrome and Windows Live Mail, so I ought to address that at some stage :)

The "buy the thingy, download the driver, it just works" argument is true, although market share of Windows is the main thing driving this. 

I found these figures the other day, and they quite surprised me :

Worldwide O/S market share, March 2013

Linux 1.17%
Mac 6.94%
Windows 91.89%

(there's furhter breakdown of what versions of Windows make up that share in this link)
http://thenextweb.com/insider/2013/04/01/windows-8-now-up-to-3-31-market-share-as-vista-finally-falls-below-the-5-mark/ (http://thenextweb.com/insider/2013/04/01/windows-8-now-up-to-3-31-market-share-as-vista-finally-falls-below-the-5-mark/)

I had genuinely expected Mac and Linux to be higher than that.

Ian
Title: Re: Sheddy-cam View
Post by: sheddyian on April 07, 2013, 07:13:33 PM
Does it work okay on the PC in Debian?  Is it possible that the driver hasn't ported properly to the arm platform of the Raspberry Pi?

That's probably a thing to try another day.  The Sweex webcam is clamped in position in the shed to try and keep it steady and aligned, and the Debian PC is indoors and not as portable as the Raspberry Pi for carrying up the shed :)

(This is why I've been testing the Pi with a different camera, because it was more convenient.)

But it's an interesting thought, and if I don't get any further with the Pi, it's one to try and prove or discount.

I'm currently trying to work out how to find the version of the Kernel on the Pi, and if it's the latest one....

uname -a 
07/04/2013 Linux cam2 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux

(is that good?)
Ian
Title: Re: Sheddy-cam View
Post by: sheddyian on April 07, 2013, 07:17:03 PM
Oh, just to add

One possibility that ocurred to me just now is that the Sweex webcam is unhappy with the voltage / current available at the Raspberry Pi USB port

So I need to test it via a powered USB hub to see if that makes any difference.

Ian (turning Kitz into a live blog to remind me of stuff to do)
Title: Re: Sheddy-cam View
Post by: asbokid on April 07, 2013, 07:34:56 PM
I'm currently trying to work out how to find the version of the Kernel on the Pi, and if it's the latest one....

Code: [Select]
uname -a 
07/04/2013 Linux cam2 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l GNU/Linux

(is that good?)

Compiled two months ago today!  See kernel.org - it's reasonably up-to-date. Certainly loads newer than the version of the AMD64 kernel on this Debian Wheezy laptop:

Code: [Select]
$ uname -a
Linux l502x 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux

You might get an answer from the author of the uvc driver, Laurent Pinchart:

Code: [Select]
# modinfo uvcvideo
filename:       /lib/modules/3.2.0-4-amd64/kernel/drivers/media/video/uvc/uvcvideo.ko
version:        1.1.1
license:        GPL
description:    USB Video Class driver
author:         Laurent Pinchart <laurent.pinchart@ideasonboard.com>
srcversion:     965043822331624B00136FE
alias:          usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00*
[..]
alias:          usb:v0458p706Ed*dc*dsc*dp*ic0Eisc01ip00*
depends:        videodev,usbcore,media
intree:         Y
vermagic:       3.2.0-4-amd64 SMP mod_unload modversions
parm:           clock:Video buffers timestamp clock
parm:           nodrop:Don't drop incomplete frames (uint)
parm:           quirks:Forced device quirks (uint)
parm:           trace:Trace level bitmask (uint)
parm:           timeout:Streaming control requests timeout (uint)
#

cheers, a

edit: see the quirks parameter/s.. maybe something there? :

http://www.ideasonboard.org/uvc/faq/
Title: Re: Sheddy-cam View
Post by: sheddyian on May 14, 2013, 11:52:27 PM
Brief update on Shedcam in Pi land :

Earlier today I ordered one of the shiny-new static sensitive Raspberry Pi camera modules from CPC.

My reasoning being that it will be extremely well supported, and with plenty of blog posts within weeks if not days on how to use it correctly.

The only downside I can see at the moment is that it's stated to be fixed focus, whereas I'd prefer a manually adjustable focus to get the garden in all it's glory, but let's see how it turns out.

Hopefully It'll inspire some "lenses and optics for dummies" blogs that I can pilfer ideas from to extend the focal range  :D

Ian

Pi camera board - isn't it small!
(http://betanews.com/wp-content/uploads/2013/05/Pi-Camera.jpg)
Title: Re: Sheddy-cam View
Post by: roseway on May 15, 2013, 06:55:15 AM
Isn't it cute? You're going down a path that I've wanted to go down for some time, but unfortunately I can never find the time.