mirror of
https://github.com/tuya-cloudcutter/tuya-cloudcutter.git
synced 2026-02-19 21:51:18 +01:00
3.9 KiB
3.9 KiB
Raspberry Pi
Generic (Zero 2W, 3, or 4)
Use these instruction if:
- You plan on plugging your pi into a monitor and using a keyboard
- Or, you plan on plugging you pi in with ethernet and using SSH over that ethernet connection
Steps:
- Use Raspberry Pi Imager to burn "Raspberry Pi OS Lite (32 Bit)" to an SD card
- As of this note, 2022-04-04 build of Bullseye
- A 4GB SD card is required to have enough space for the OS and building the Docker image.
- If using SSH, enable it (using the installer or making an empty file
sshon the boot partition)
- Access the pi (SSH or keyboard + monitor)
- Install Network Manager (only reboot once all files are in place)
sudo apt update && sudo apt install network-managersudo nano /etc/dhcpcd.confthen add linedenyinterfaces wlan0sudo nano /etc/NetworkManager/NetworkManager.confand make it look exactly like
[main]
plugins=ifupdown,keyfile
dhcp=internal
[ifupdown]
managed=true
- Reboot the pi
sudo rebootthen reaccess. - Make sure network manager is enabled and running:
sudo systemctl enable NetworkManager.servicesudo systemctl start NetworkManager.service
- Install Docker with
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh - Install git
sudo apt install git - Clone tuya-cloudcutter repo
git clone https://github.com/tuya-cloudcutter/tuya-cloudcutter - Go to cloned tuya-cloudcutter repo
cd tuya-cloudcutter - (Optional as independent step) In the cloudcutter directory, build the docker image
sudo docker build --network=host -t cloudcutter . - Run cloudcutter with
sudo ./tuya-cloudcutter.sh -r ...(refer to usage instructions)
Pi Zero 2W with SSH over USB
Use these instructions if:
- You would like to SSH to the Pi Zero 2W using USB
Steps:
- Use Raspberry Pi Imager to burn "Raspberry Pi OS Lite (32 Bit)" to an SD card
- As of this note, 2022-04-04 build of Bullseye
- A 4GB SD card is required to have enough space for the OS and building the Docker image.
- Set a hostname like
piusb(something you'll remember) - Enable SSH (using the installer or making an empty file
sshon the boot partition)
- Edit
config.txtandcmdline.txton the boot partition to enable USB SSG (Gadget Mode)- Add
dtoverlay=dwc2to the very end ofconfig.txt - Add
modules-load=dwc2,g_etherincmdline.txtafterrootwaitbefore anything else. - Ref: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget
- Ref: https://desertbot.io/blog/headless-pi-zero-ssh-access-over-usb-windows
- Add
- Power the Pi and connect with Micro USB cable to a computer
- May need to get the right drivers: https://raspberrypi.stackexchange.com/questions/89400/cannot-ssh-raspberry-pi-zero-w-on-windows-via-usb
- Connect using ssh to
piusb.local(or whatever hostname you chose) - Share your computers network with the Pi
- Install Network Manager (only reboot once all files are in place)
sudo apt update && sudo apt install network-managersudo nano /etc/dhcpcd.confthen add linedenyinterfaces wlan0sudo nano /etc/NetworkManager/NetworkManager.confand make it look exactly like
[main]
plugins=ifupdown,keyfile
dhcp=internal
[ifupdown]
managed=true
[keyfile]
unmanaged-devices=interface-name:usb*
- Reboot the Pi
sudo rebootthen reconnect over ssh - Install Docker with
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh - Install git
sudo apt install git - Clone tuya-cloudcutter repo
git clone https://github.com/tuya-cloudcutter/tuya-cloudcutter - Go to cloned tuya-cloudcutter repo
cd tuya-cloudcutter - (Optional as independent step) In the cloudcutter directory, build the docker image
sudo docker build --network=host -t cloudcutter . - Run cloudcutter with
sudo ./tuya-cloudcutter.sh -r ...(refer to usage instructions)