Skip to content

Useful scripts for setting up brewpi and tiltHydrometer

License

Notifications You must be signed in to change notification settings

andylytical/brewpi-scripts

Repository files navigation

Automated install of brewpi and docker on Raspberry Pi.


Note: The latest version does not have tilt support (yet). For Tilt Hydrometer support, see release v0.1

Note: release v0.1 was tested on v0.4.4 of Brewpi code. It might work if applied to the v0.5.5 brewpi code inside the container, but that has not been tried or tested here.


Installation

See: One Time Setup

Usage

  • Docker container management

    ~/brewpi start
    ~/brewpi stop
    ~/brewpi status
    ~/brewpi restart #stop, then start the container
  • Check for brewpi docker updates

    ~/brewpi check-update
  • Update brewpi docker image

    ~/brewpi update
  • Clean up old (stopped) brewpi container

    ~/brewpi stop
    ~/brewpi clean

One Time Setup

OS

  1. Install Raspbian Stretch
    https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip
    NOTE: As of 6 July 2019, Raspbian Buster is the latest version but does not have Docker support.

  2. Configure OS basics

    1. sudo raspi-config
      • Change user password
      • Network - Set Hostname
      • Network - Setup Wi-Fi
      • Localization - Set timezone
      • Interfacing Options - Enable SSH
      • Finish
      • Reboot
  3. Setup Networking

    1. Get the mac from the pi
      • Ethernet: cat /sys/class/net/eth0/address
      • Wireless: cat /sys/class/net/wlan0/address
    2. Use the mac to assign a static ip (on your router).
      See your router documentation on how to do this.

Install brewpi-scripts

  1. sudo apt -y install git
  2. git clone https://github.com/andylytical/brewpi-scripts.git
  3. ln -s /home/pi/brewpi-scripts/brewpi.sh ~/brewpi

Finish OS setup

  1. ~/brewpi-scripts/os_setup.sh

Docker setup

  1. ~/brewpi-scripts/docker_setup.sh
  2. logout
  3. Login again as user pi
  4. ~/brewpi update

Setup Wifi Access To Spark

OPTIONAL - Skip this step if using spark via USB

Configure wifi on the spark

Note: These instructions were tested on a Spark version 3.
TODO: Test on Spark v2

  1. Connect Spark via USB

  2. Put the particle in setup mode
    Hold the setup button for 5 seconds until the LED is flashing blue to put the Photon in listening mode

  3. Install screen

    sudo apt -y install screen
  4. Connect to particle

    screen /dev/ttyACM0
  5. Get MAC address
    Type: m
    Use the mac to assign a static ip (on your router)

  6. Setup wifi
    Type: w
    Enter information as prompted for SSID and password

  7. Exit screen
    Type: Ctl-a then k Answer yes at prompt to kill screen session.

See also: https://docs.particle.io/guide/tools-and-features/cli/photon/

Enable wifi access to spark

  1. ~/brewpi enable-wifi <SPARK_IP_ADDRESS>
    Replace the string <SPARK_IP_ADDRESS> with the ip address you assigned to the Spark.
  2. ~/brewpi restart