Wyze Cam V2 Support?

Perhaps it's my ignorance, but I didn't modify this file at all in my setup and it works. Were there issues I missed?

If you don't change and settings, you'll run at 640x480 by default. The edit above gets you 1080 quality.

You can also follow this tutorial to change the brightness, contrast and saturation of the Wyze can. https://www.kurokesu.com/main/2016/01/16/manual-usb-camera-settings-in-linux/

The only problem is that the settings reset after every reboot. I'm trying to figure out how to script it so that the settings are applied after every reboot. I'll post of I can figure it out and get it working reliably. It makes a big because when you optimize those settings.

1 Like

OK, I altered these two lines. The camera reloaded, but it looks identical to me.

I restarted OctoPrint (not the entire Pi) and went in to look at the lines in the octopi.txt file and the changes are still there.

What am I missing? How do you know what resolution the camera is looking with?

Pretty sure you have to restart the whole pi, not just OctoPrint for these octopi.txt settings to take effect.

As @jneilliii said, you'll need to reboot the pi to see the changes.

OK, first of all, I'm an idiot. I have two Ender3's, each running an instance of OctoPrint. and they are not right in front of me so I'm just looking at the OctoPrint windows in my browser.

I forgot that I had switched cameras (the other one has a Logitech C920) and was making changes in THAT config file. The image is now taking up the entire black hole that was in the OctoPi interface. It used to have a narrow, vertical black band on the left and right so at minimum the aspect ratio has changed. The resolution probably has as well.

Back to my Wyze camera...........I duplicated the config changes and rebooted. The screen seems the same size, but the color is better and the resolution does seem sharper! Very cool!

However, I don't lose the settings on reboot like you say is happening to you. I rebooted a second time to confirm and it is still retaining those settings.

Sorry, I wasn't clear. The only settings that you'll loose are the adjustments to brightness, contrast and saturation if you use V4L2 utility.

1 Like

I don't know what that is so I'm going to revel in my ignorance and enjoy the improvement I got......:wink:

The one thing that would be kind of cool would be the night vision thing someone mentioned. Do you know if that is possible? Currently if I want to monitor my printers at night I have to leave a light on so having the IR capabilities of the camera (assuming the webcam firmware doesn't break that) would be really cool!

Yeah, not really a need to tweak the brightness and contrast unless your room lighting is crazy, like mine is.

They will not be bringing the night vision capability to the webcam firmware. They provided that firmware as a quick fix because webcams were becoming hard to get and expensive with Covid-19 and everyone needing to use them for work/school. They stated that this is a stripped down version to enable webcam functionality with the speaker and mic, but they will not continue development for this firmware. At this point, it is what it is, but for $25, I'll take it as it is!

1 Like

Agreed! I had several already for around my home. This is a bonus!

I know there is 3rd party firmware out there for these as well. I may look into that to achieve night vision.

All, please guide me through this. I seem to be missing something. The Wyze v2 camera works fine in Windows but I can't get it to be recognized by Octoprint/Pi. I have modified settings as suggested and left them default. I changed cables and also ports. I have restarted Pi and just Octoprint. Nothing is working. Am I missing something? Does it need to be powered, other than USB? I would like to get this running so I can print out a mount and work on smart plug next! Again, settings are default in Octoprint and modified to suggested settings in the octopi.txt.

1 Like

Same issue here. I am a very technical savvy person , but I am not having the same luck. I was able to get it to display a picture for a brief period of time after random sequence of reboots, etc. Still can't get it to display video 99% of the time. I have also disabled plug-ins that I feel might interfere but no luck there either. Did you get it to work?

Having the same issues as well I posted this in reddit for help asking here also

Using black Wyzecam v2 with USB A/A 3.0 in Pi 3B 1.2

I'm getting this message in dmesg when OctoPrint boots..
Relevant messages

[ 2.391803] usb 1-1.4: new high-speed USB device number 5 using dwc_otg

[ 2.522523] usb 1-1.4: New USB device found, idVendor=18d1, idProduct=0001, bcdDevice= 3.10

[ 2.528543] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 2.531670] usb 1-1.4: Product: HD USB Camera

[ 2.534705] usb 1-1.4: Manufacturer: Ingenic Semiconductor CO., LTD.

[ 2.537711] usb 1-1.4: SerialNumber: Ucamera001

[ 9.582627] uvcvideo: Failed to query (GET_INFO) UVC control 6 on unit 2: -32 (exp. 1).

[ 9.602066] uvcvideo: Failed to query (GET_INFO) UVC control 9 on unit 2: -32 (exp. 1).

[ 9.608514] uvcvideo: Failed to query (GET_INFO) UVC control 4 on unit 2: -32 (exp. 1).

[ 9.614265] uvcvideo: Failed to query (GET_INFO) UVC control 11 on unit 2: -32 (exp. 1).

[ 9.615819] uvcvideo 1-1.4:1.0: Entity type for entity Processing 2 was not initialized!

[ 9.615838] uvcvideo 1-1.4:1.0: Entity type for entity Camera 1 was not initialized!

[ 9.616245] input: HD USB Camera: HD USB Camera as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/input/input0

[ 9.616717] usbcore: registered new interface driver uvcvideo

[ 9.616724] USB Video Class driver (1.1.1)

[ 9.670889] usb 1-1.4: Warning! Unlikely big volume range (=10240), cval->res is probably wrong.

[ 9.670908] usb 1-1.4: [5] FU [PCM Playback Volume] ch = 1, val = -7168/3072/1

[ 9.671683] usb 1-1.4: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.

[ 9.671698] usb 1-1.4: [6] FU [Mic Capture Volume] ch = 1, val = -1536/1536/1

[ 9.923514] bcm2835-codec bcm2835-codec: Device registered as /dev/video10

[ 9.923555] bcm2835-codec bcm2835-codec: Loaded V4L2 decode

[ 9.931543] bcm2835-codec bcm2835-codec: Device registered as /dev/video11

[ 9.931579] bcm2835-codec bcm2835-codec: Loaded V4L2 encode

[ 9.938354] bcm2835-codec bcm2835-codec: Device registered as /dev/video12

[ 9.938393] bcm2835-codec bcm2835-codec: Loaded V4L2 isp

[ 13.347170] uvcvideo: Failed to query (GET_DEF) UVC control 6 on unit 2: -32 (exp. 2).

I've tested the WyzeCam in Windows 10 and it works fine as webcam so confident that the camera firmware flash is working. I've tried all the usb ports on the pi. Cam doesn't show up in lsusb. I've seen other posts with the above error but can't find the solution.
thanks in advance for any assistance.

I'm seeing the same exact messages. The camera works great on my mac. Maybe it's a driver issue with rpi? I've tried

  • different cables usb2 and usb3
  • changing camera settings/resolutions
  • changed the pi power adapter in case it wasn't getting enough juice to also run the camera

The main error that I see repeatedly is uvcvideo: Failed to query (GET_DEF) UVC control 6 on unit 2: -32 (exp. 2).

I get those same messages. The only issue I had with my Wyze cam is needing to reboot to get octoprint to recognize it.

That specific Failed to query (GET_DEF) message isn't an issue. I get those consistently, but it doesn't affect the camera's functionality. It's just referring to functions it attempted to query the camera about support for (default values, pan/tilt, etc.) but was unable. The uvcvideo driver on the RPi should automatically adjust how it communicates with the camera after a few of those failures.

What I have been seeing though at seemingly random times is the camera ceasing to work, and having to unplug and plug it back in, and then either run a few commands to reset the physical device drivers and service, or reboot the pi, to get the camera feed back. This is a persistent issue, but sometimes I can go hours or even days without it happening. The errors I see directly related to the issue are:

usb 1-1.1.3: reset high-speed USB device number 46 using dwc_otg
usb 1-1.1.3: device descriptor read/64, error -110
usb 1-1.1.3: device descriptor read/64, error -110
usb 1-1.1.3: reset high-speed USB device number 46 using dwc_otg
.... [continues in this loop a few times]
usb 1-1.1.3: device not accepting address 46, error -71
usb 1-1.1.3: USB disconnect, device number 46
usb 1-1.1.3: new high-speed USB device number 47 using dwc_otg
usb 1-1.1.3: New USB device found, idVendor=18d1, idProduct=0001, bcdDevice= 3.10
usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.1.3: Product: HD USB Camera
usb 1-1.1.3: Manufacturer: Ingenic Semiconductor CO., LTD.
usb 1-1.1.3: SerialNumber: Ucamera001
uvcvideo: Found UVC 1.00 device HD USB Camera (18d1:0001)
uvcvideo: Failed to query (GET_INFO) UVC control 2 on unit 1: -110 (exp. 1).
... [at this point outputs these  "Failed query" messages with the -110 code (for control numbers 1-11), followed by...]
uvcvideo: Failed to query (129) UVC probe control : -110 (exp. 26).
uvcvideo: Failed to initialize the device (-5).
... [it then usually loops through the same disconnect, reconnect, error, disconnect...., a few times]

It's possible this could be tied to UVC quirks that need to be permanently implemented for the camera to function reliably - this is fairly common with inexpensive USB cameras that don't implement communication standards properly. However - the "reset high-speed USB device number XX using dwc_otg" error, based on what I have read, is usually related to the device not getting enough power, and has occurred with other devices on the RPi, specifically the 3B/3B+, due to hardware limitations of how much power it can send to USB devices. The suggested solution is getting an externally-powered USB hub, and plugging the camera into that. I'm playing around with modifications to UVC quirks in the meantime, but if anyone wants to try the hub thing and post back results, it would be interesting to see if it helps!

Also, that said, if anyone wants to try the potential mitigation with UVC quirks, run this command on your Pi (may need to run it as root - run 'sudo -s' beforehand), and reboot:

 echo "options uvcvideo quirks=0x126" > /etc/modprobe.d/uvcvideo.conf

As an update, I've been running for the past 14hrs with no issues yet using the quirks modification. Not totally out of the woods yet, but it looks promising!

I finally got it working on my end. I'm not sure if this was the main issue but I was using -f 10 when it wasn't part of a supported format. For those debugging, use

tail /var/log/webcamd.log to view the errors for your webcam.

If you see the "Unable to set format", you need to update octopi.txt to match a format listed when executing v4l2-ctl --list-formats-ext. In my case, the only formats that were listed were 30fps so once I updated to -f 30, everything started working.

Quick update - sadly it doesn't seem the quirks modification resolved it. I seemed to have more stability for a little while, but it's still dying anywhere from every couple hours to every day. Has anyone else experienced instability, and if so, how have you resolved it?