After looking through the OctoPrint forum I saw that some people had used a special firmware on Wyze cameras to just make them into webcameras and connect directly to the Raspberry. The Wyze camera and the XiaoFang are the same camera, but wonder if it would just work to use that firmware? Found an article indicating it should work so gave it a try. Went to the firmware page and followed the instructions. Built a USB A to USB A cable and connected the camera to my PC. Wow, it is a webcam! Connected it the the Raspberry and entered the default settings for camera. Voila!
To setup my Raspberry Pi Z W I have combined two different guides since editing the files on the SD did not work, nor did I had the energy to setup Vagrant.
Start by flashing a micro SD card as described here using Etcher.
Insert the card into a Mac or PC and add
enable_uart=1 to the end of
config.txt as described here.
Insert the SD card in the Raspberry Pi and boot it as described here using a USB serial cable. Then in a terminal window run
screen /dev/tty.usbserial-A7005Gpd 115200 (change to your device tty) to connect to the serial terminal on the Raspberry Pi.
Now you can follow this guide from step 3. Though I did not configure mine for two networks and here are how my configuration files look like:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
sudo nano /etc/network/interfaces
iface lo inet loopback
iface eth0 inet manual
iface wlan0 inet manual
iface home inet dhcp