Webcam for Heatermeter 4.0


 

Dave D

New member
This thread should be a knowledge repository for those of us who want a Webcam on our Raspberry Pi Heatermeter 4.0. Probably I'm not the only one and maybe it's already solved, but I didn't find much when searching here or the web.

Background:
I've recently assembled the HeaterMeter 4.0 with v8 software. It's setup with a solid state relay and electric heating element. Linkmeter works great, I have ethernet and ddns enabled; now I can access my BBQ from anywhere. However I'm having trouble to install a webcam - which is the perfect accessory! When at work or out shopping, I want to be able to check "is the BBQ still generating enough smoke?" to know if I should drop by home and add wood chunks. Or worst case, "is the thermostat engulfed in flames, or is it just me?"​

Here's what I've got so far:
installed modules using opkg --force-depends:
kmod-video-core, kmod-i2c-core
kmod-video-gspca-core, kmod-video-gspca-ov519 (specific to my webcam), start here: OpenWRT USB Video Support
libgd, fswebcam (which eventually I will use to get a simple URL with live image of the BBQ)​

How I figured out my GSPCA cam hardware:
dmesg | grep idVendor => it turned out to be this line,
[ 2.413706] usb 1-1.2: New USB device found, idVendor=05a9, idProduct=a511
List of gspca cams: GSPCA Cameras
Mine: 197 ov519 05a9:a511 D-Link USB Digital Video Camera (though the camera is bought from Creative)​

Errors that appear:
dmesg | grep Unknown
[ 5.667593] i2c_core: Unknown symbol pm_generic_thaw (err 0)
[ 5.669729] i2c_core: Unknown symbol pm_generic_poweroff (err 0)
[ 5.671723] i2c_core: Unknown symbol __i2c_board_list (err 0)
[ 5.673686] i2c_core: Unknown symbol pm_generic_resume (err 0)
[ 5.675650] i2c_core: Unknown symbol pm_generic_suspend (err 0)
[ 5.677499] i2c_core: Unknown symbol device_init_wakeup (err 0)
[ 5.679273] i2c_core: Unknown symbol __i2c_first_dynamic_bus_num (err 0)
[ 5.681027] i2c_core: Unknown symbol pm_generic_freeze (err 0)
[ 5.682764] i2c_core: Unknown symbol __i2c_board_lock (err 0)
[ 5.684421] i2c_core: Unknown symbol pm_generic_restore (err 0)
[ 5.694945] i2c_dev: Unknown symbol i2c_get_adapter (err 0)
[ 5.696831] i2c_dev: Unknown symbol i2c_master_recv (err 0)
[ 5.698484] i2c_dev: Unknown symbol i2c_smbus_xfer (err 0)
[ 5.700058] i2c_dev: Unknown symbol i2c_adapter_type (err 0)
[ 5.701578] i2c_dev: Unknown symbol i2c_verify_client (err 0)
[ 5.703117] i2c_dev: Unknown symbol i2c_bus_type (err 0)
[ 5.704569] i2c_dev: Unknown symbol i2c_put_adapter (err 0)
[ 5.705974] i2c_dev: Unknown symbol i2c_for_each_dev (err 0)
[ 5.707360] i2c_dev: Unknown symbol i2c_transfer (err 0)
[ 5.708713] i2c_dev: Unknown symbol i2c_master_send (err 0)
[ 5.737021] videodev: Unknown symbol i2c_unregister_device (err 0)
[ 5.747393] v4l2_common: Unknown symbol i2c_new_device (err 0)
[ 5.748886] v4l2_common: Unknown symbol v4l2_subdev_init (err 0)
[ 5.750252] v4l2_common: Unknown symbol v4l2_device_register_subdev (err 0)
[ 5.751636] v4l2_common: Unknown symbol i2c_unregister_device (err 0)
[ 5.753048] v4l2_common: Unknown symbol v4l2_ctrl_get_menu (err 0)
[ 5.754463] v4l2_common: Unknown symbol i2c_new_probed_device (err 0)
[ 5.755935] v4l2_common: Unknown symbol v4l2_ctrl_fill (err 0)
[ 5.804660] gspca_main: Unknown symbol video_ioctl2 (err 0)
[ 5.806377] gspca_main: Unknown symbol video_devdata (err 0)
[ 5.807908] gspca_main: Unknown symbol video_unregister_device (err 0)
[ 5.809453] gspca_main: Unknown symbol __video_register_device (err 0)
[ 5.822793] gspca_ov519: Unknown symbol gspca_frame_add (err 0)
[ 5.824454] gspca_ov519: Unknown symbol gspca_disconnect (err 0)
[ 5.826046] gspca_ov519: Unknown symbol gspca_resume (err 0)
[ 5.827564] gspca_ov519: Unknown symbol gspca_dev_probe (err 0)
[ 5.829081] gspca_ov519: Unknown symbol gspca_suspend (err 0)​

Potential solution:
https://dev.openwrt.org/ticket/9613
Seems that kmod-i2c-core may need to be compiled into the core from the beginning and re-flashed (booo). Maybe other video modules are needed pre-compile as well? I don't know :-/ I have no idea how to do this, no desire to install Ubuntu somewhere for compiling, and little experience with self compiling :p

If enough people are interested in a webcam plugged to the 2nd USB port, any chance of getting this in a future official HeaterMeter 4.0 software build?

Thanks for any help!
 
This sounds cool,
If we could come up with a high heat webcam could attach a light and watch the bark forming on our ribs!
 
I like this idea! I'm not sure how much you'll be able to see on the webcam from outside the pit, but it is a cool idea nonetheless.

I'm looking at what it takes to get i2c to work on our platform. It appears the bcm2708 doesn't have a standard i2c controller, but it does have a Broadcom Serial Control bus which is I2C compatible. I'd prefer that it gets built as a module so I'll look into seeing if that's possible.
 
Hehe, yes John - a lot of friends suggested an interior webcam. I thought about a glass window on the BBQ with a light & webcam outside, but this wasn't really my aim and would be tough with plastic melting points and smoke condensing on the inside of the glass. The goal is to display a picture or stream video of the outside of the BBQ, so I can see how much smoke is coming out of the vent :) I'll really use it because if I do an all-day smoke while at work, I can see when to come back home (just 1 mile away) to refill with wood chunks.

Bryan, that would be great if there were an installable module that would work! I thought the i2c software interfaced with the info coming over USB, but it was just a guess. I was kind of surprised to find that "fix" where the i2c module has to be compiled with the kernel at the start, because it defeats the purpose of a module-based system, and makes it unattainable for the code weary like myself ;-) [edit: I used to play around with code at times but it takes me literally forever and so I have focused on my other strengths]
 
Last edited:
Yeah even worse the i2c module seems to be compiled with power management as well, which breaks the SD driver. Hooray!

EDIT: Their driver is crap! It is built with power management support which relies on a whole heap of stuff like CPU support for suspend. I ain't never seen no bcm2708 go into S3 suspend to RAM.
 
Last edited:
Want to try out this test build? Flash it from the webui. I'm not sure why v4l is requiring i2c, although I may be partially to blame for that in an end-around sort of manner as I wrote a lot of the code in a v4l driver about 10 years ago that used a lot of bitbanged I2C. Not that that tuner card would ever find its way into a wireless router.

I also don't know if the brcm2708 "I2C" driver is needed in this instance, as any I2C transfers will be taking place (I believe) on another host rather than directly through the CPU's serial control. Let me know how things go.
 
Cool, I will give it a try tomorrow (it's late here in DE, just back from a wedding and enjoying a Kellerbier). How do I install that from the webui exactly? I have only done one install and that was a build on a 1GB SD card with the Windows util ;-).
 
Hooray good beer! I'm about to pack up to go to a beer festival myself.

If you're on v9 of the software you can go to System -> Backup / Flash Firmware and paste the URL into the URL field. If not, you may just need to do the traditional Win32DiskImager utility using the .img from the zip file here. I'm not sure what version you're coming from so you may want to also make a backup of your settings on the System -> Backup / Flash Firmware page as well. You'll need to go through the install of those packages you need as well, but they shouldn't fail with "invalid symbol" any more (hopefully).
 
Hooray good beer! I'm about to pack up to go to a beer festival myself.

I like the German beer but it's tough to get much variety in Munich, hence I started brewing. If I move to all-grain someday I foresee the HeaterMeter doing double duty as a BrewMeter... is there a mash tun project I can make as easily as heatermeter with motor controllers, etc built in... :cool:

Tried out the new version on a fresh SD card today, as I don't (yet) want to have to re-set all settings on my fully operational build.

The Good: no errors with Unknown Symbol!

The Bad: (see 4th line, I have no idea what it means and Google "gspca_main too many config" oddly brings nothing)

[ 6.357973] i2c /dev entries driver
[ 6.389956] Linux video capture interface: v2.00
[ 6.454015] gspca_main: v2.14.0 registered
[ 6.469110] gspca_main: 05a9:a511 too many config
[ 6.471225] usbcore: registered new interface driver ov519

root@OpenWrt:~# fswebcam
--- Opening /dev/video0...
stat: No such file or directory​

Maybe something else needed to tell it which config to pick from the gspca driver? Hmm... at least it's a step forward for webcam support even if my particular cam still doesn't show up in /dev ;-)
 
Looking at the source code for the gspca driver, what's happening is it probes the device sees what endpoints it supports. If it supports more than one configuration, or the video device is not the first device, the driver won't connect to it. The former is your case. I don't see any way around it as it is taking just what the USB device presents to the driver and the driver doesn't like it. There are no module parameters. Maybe you can google around and see if there's another way to go at it?

I homebrew too! I initially built my brewery as a first step in making something like HeaterMeter for brewing. It is somewhat automated in that the temperatures are all PID controlled, but doesn't have any cool graphs or wireless access. After using it for the past 10 months, I'm not sure automation really fits the application because I don't see much to gain. If I replaced moving tubing around with electric valves, that's just more to clean. Also there's other things in play like waiting for starch conversion to take place, or pausing to do various checks and steps along the way. Still something I plan to expand though, the biggest thing would be wireless temperature sensors.
 
Ha, great brewing setup! Yeah I had only thought about a motor for moving things in the mash tun or sparging. Valves would indeed be a pain. What might be good: software with configurable setpoints for the various rests, timing during the boil, etc. These could set off alarms which would be accessible from your remote device (e.g. smartphone). Then you could do yardwork, programming, or drink some of the previous batch in front of the big screen while something is resting or boiling. You could have a "pause timer" button if you want to manually add a few minutes or do something in between steps. Of course, a Boilover Cam would fit to the current thread :cool:

Regarding the HeaterMeter webcam: I think I'll call it on this OV519 webcam, it's not worth so many hours of searching for subtle problems on a 10+ year old cam when I can probably buy a new (and better supported) one for 15 bucks. Nothing apparent popped up on Google with the same error, I guess very few people have this exact camera.

Has anyone tried another webcam on OpenWRT with success? If so I could buy the same model and be confident ;-) Now at least I2C (apparently required for all webcams) seems to compile just fine - thanks Bryan!
 
Have you thought about just getting the Raspberry Pi Camera Board?

Hmm... might be difficult to route out of the nice 3D printed case I have already ;-).

Besides a simple & cheap USB webcam with a mount I can screw to a post in my backyard should be fine. Just need some idea of a camera that's been tested with OpenWRT... edit, let's see if I win an ebay auction for a Logitech QuickCam Pro 5000 since I found an OpenWRT install article about it.
 
Last edited:
OK, here is the latest: I got a Microsoft Lifecam HD-3000 because I found a Russian forum post where someone described (successfully) setting it up with OpenWRT. It's supported by UVC. Price was the same (for 720p) as some ancient GSPCA cams from 6-8 years ago. However, I don't get any /dev/video0 :(

What might be wrong here? The frustration is high with this one... strange that uvcvideo identifies the camera with zeroes instead of its device ID! uvcvideo: Found UVC 1.00 device <unnamed> (0000:0000)

root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 045e:0779 Microsoft Corp.
Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]​

root@OpenWrt:~# dmesg (extract thereof)
[ 2.387413] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[ 2.504254] usb 1-1.2: New USB device found, idVendor=045e, idProduct=0779
[ 2.506507] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.508644] usb 1-1.2: Product: Microsoft® LifeCam HD-3000
[ 2.510675] usb 1-1.2: Manufacturer: Microsoft
[ 5.271932] usbcore: registered new interface driver rtl8192cu
[ 5.299220] i2c /dev entries driver
[ 5.331333] Linux video capture interface: v2.00
[ 5.409315] usbcore: registered new interface driver usbhid
[ 5.411367] usbhid: USB HID core driver
[ 5.431293] uvcvideo: Found UVC 1.00 device <unnamed> (0000:0000)
[ 5.436829] __video_register_device: requested video0, got video0
[ 5.439319] input: UVC Camera (0000:0000) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0
[ 5.444205] usbcore: registered new interface driver uvcvideo
[ 5.446297] USB Video Class driver (1.1.1)​

root@OpenWrt:~# ls /dev/*
/dev/console /dev/root /dev/tty44
/dev/cpu_dma_latency /dev/tty /dev/tty45
/dev/fb0 /dev/tty0 /dev/tty46
/dev/full /dev/tty1 /dev/tty47
/dev/kmsg /dev/tty10 /dev/tty48
/dev/log /dev/tty11 /dev/tty49
/dev/loop-control /dev/tty12 /dev/tty5
/dev/loop0 /dev/tty13 /dev/tty50
/dev/loop1 /dev/tty14 /dev/tty51
/dev/loop2 /dev/tty15 /dev/tty52
/dev/loop3 /dev/tty16 /dev/tty53
/dev/loop4 /dev/tty17 /dev/tty54
/dev/loop5 /dev/tty18 /dev/tty55
/dev/loop6 /dev/tty19 /dev/tty56
/dev/loop7 /dev/tty2 /dev/tty57
/dev/mem /dev/tty20 /dev/tty58
/dev/mmcblk0 /dev/tty21 /dev/tty59
/dev/mmcblk0p1 /dev/tty22 /dev/tty6
/dev/mmcblk0p2 /dev/tty23 /dev/tty60
/dev/mmcblk0p4 /dev/tty24 /dev/tty61
/dev/network_latency /dev/tty25 /dev/tty62
/dev/network_throughput /dev/tty26 /dev/tty63
/dev/null /dev/tty27 /dev/tty7
/dev/ptmx /dev/tty28 /dev/tty8
/dev/ram0 /dev/tty29 /dev/tty9
/dev/ram1 /dev/tty3 /dev/ttyAMA0
/dev/ram10 /dev/tty30 /dev/urandom
/dev/ram11 /dev/tty31 /dev/usbdev1.1
/dev/ram12 /dev/tty32 /dev/usbdev1.2
/dev/ram13 /dev/tty33 /dev/usbdev1.3
/dev/ram14 /dev/tty34 /dev/usbdev1.4
/dev/ram15 /dev/tty35 /dev/usbdev1.5
/dev/ram2 /dev/tty36 /dev/vc-mem
/dev/ram3 /dev/tty37 /dev/vchiq
/dev/ram4 /dev/tty38 /dev/vcs
/dev/ram5 /dev/tty39 /dev/vcs1
/dev/ram6 /dev/tty4 /dev/vcsa
/dev/ram7 /dev/tty40 /dev/vcsa1
/dev/ram8 /dev/tty41 /dev/watchdog
/dev/ram9 /dev/tty42 /dev/zero
/dev/random /dev/tty43

/dev/bus:
usb

/dev/input:
event0 mice

/dev/pts:
0

/dev/raw:
rawctl

/dev/shm:
root@OpenWrt:~#
/dev/bus:
usb

/dev/input:
event0 mice

/dev/pts:
0

/dev/raw:
rawctl

/dev/shm:​
 
This is what I use for brewing myself.... https://www.oscsys.com/projects/brewtroller

Ooh, tempting, for someday... I think I have a garage and kitchen to build first before I enhance my brewing setup. Currently I'm just doing extract + specialty grains (a kind of mini-mash). But all the beers I've made came out pretty well, nothing average or lower so far, at least to my taste ;-)

About the original topic: was anyone able to look at the code of OpenWRT AA on the RasPi to see if something could be fine tuned to get webcams working? Sadly I am not a programmer (by choice). But here is the Russian forum where I figured out, this cam (Lifecam HD-3000) should work with OpenWRT.

I did pre-smoke 1.8kg of filet steaks yesterday, 40 minutes at 160F, then later grilled them 2min/side. Amazing, and with the HeaterMeter it was a more stable temperature & more even exterior color than with my previous terracotta-flowerpot smoker. Jaaaa!
 
No idea, but if that list on the website you linked is a list of cameras supported by the standard kmod-video-uvc then I have one that I can try.
 
No idea, but if that list on the website you linked is a list of cameras supported by the standard kmod-video-uvc then I have one that I can try.

Hi Bryan, right, at least that's how I understand it. My Russian is normally composed of 1 word when Google isn't translating (Nyet!) ;-)

Here's a list of Linux UVC supported cams, however I'm not sure how recently this driver was ported to OpenWRT. I hope it's just a small adjustment needed (like you did to get i2c to load properly). Seems someone's made it work on OpenWRT...

I am curious if your cam works straight off, am hoping it has the same (minor) glitch as mine and is easily resolved. :cool:
 
I got the same dmesg with my camera (Logitech Quickcam Pro for Notebooks C905)
Code:
[  695.348339] i2c /dev entries driver
[  707.925068] Linux video capture interface: v2.00
[  730.573420] uvcvideo: Found UVC 1.00 device <unnamed> (0000:0000)
[  730.608948] __video_register_device: requested video0, got video0
[  730.612204] input: UVC Camera (0000:0000) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.0/input/input1
[  730.620361] usbcore: registered new interface driver uvcvideo
[  730.623459] USB Video Class driver (1.1.1)
But didn't get the video device. I assume under regular linux this is created by the udev system and daemon and all that crap. It is easy enough to get around, but you'll have to do this after every reboot:
Code:
mknod /dev/video0 c 81 0
I tried putting it in /etc/rc.local, but that runs after mjpg-streamer tries to start so it is too late. Workaround: also start mjpg-streamer from rc.local. The whole file should look like this:
Code:
mknod /dev/video0 c 81 0
/etc/init.d/mjpg-streamer start
exit 0

Packages I needed to install (all the kmod-* packages need --force-depends):
libjpeg
mjpg-streamer
kmod-i2c-core
kmod-video-core
kmod-video-videobuf2
kmod-video-uvc

After modifying the /etc/rc.local and rebooting, the snapshot and stream work great from http://heatermeter:8080/. Also works in VLC for streaming.
 
Last edited:

 

Back
Top