Files
tuya-cloudcutter/HOST_SPECIFIC_INSTRUCTIONS.md
Robert Slootjes e4aa6fba71 Update HOST_SPECIFIC_INSTRUCTIONS.md (#748)
Same applies to the Pi Zero 2W over USB
2024-12-07 15:59:40 -06:00

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:

  1. 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 ssh on the boot partition)
  2. Access the pi (SSH or keyboard + monitor)
  3. Install Network Manager (only reboot once all files are in place)
    • sudo apt update && sudo apt install network-manager
    • sudo nano /etc/dhcpcd.conf then add line denyinterfaces wlan0
    • sudo nano /etc/NetworkManager/NetworkManager.conf and make it look exactly like
[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown]
managed=true
  1. Reboot the pi sudo reboot then reaccess.
  2. Make sure network manager is enabled and running:
    • sudo systemctl enable NetworkManager.service
    • sudo systemctl start NetworkManager.service
  3. Install Docker with curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
  4. Install git sudo apt install git
  5. Clone tuya-cloudcutter repo git clone https://github.com/tuya-cloudcutter/tuya-cloudcutter
  6. Go to cloned tuya-cloudcutter repo cd tuya-cloudcutter
  7. (Optional as independent step) In the cloudcutter directory, build the docker image sudo docker build --network=host -t cloudcutter .
  8. 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:

  1. 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 ssh on the boot partition)
  2. Edit config.txt and cmdline.txt on the boot partition to enable USB SSG (Gadget Mode)
  3. Power the Pi and connect with Micro USB cable to a computer
  4. Connect using ssh to piusb.local (or whatever hostname you chose)
  5. Share your computers network with the Pi
  6. Install Network Manager (only reboot once all files are in place)
    • sudo apt update && sudo apt install network-manager
    • sudo nano /etc/dhcpcd.conf then add line denyinterfaces wlan0
    • sudo nano /etc/NetworkManager/NetworkManager.conf and make it look exactly like
[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown]
managed=true

[keyfile]
unmanaged-devices=interface-name:usb*
  1. Reboot the Pi sudo reboot then reconnect over ssh
  2. Install Docker with curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
  3. Install git sudo apt install git
  4. Clone tuya-cloudcutter repo git clone https://github.com/tuya-cloudcutter/tuya-cloudcutter
  5. Go to cloned tuya-cloudcutter repo cd tuya-cloudcutter
  6. (Optional as independent step) In the cloudcutter directory, build the docker image sudo docker build --network=host -t cloudcutter .
  7. Run cloudcutter with sudo ./tuya-cloudcutter.sh -r ... (refer to usage instructions)