Skip to content

jonpitch/danger-brewing-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Danger Brewing: Hub

A NodeBot Kegerator.

Overview

This "hub" sends data from your kegerator to Firebase, so you can monitor your kegerator in real-time with Danger Brewing.

It supports collecting data from:

  • Flow meters - to monitor beer distribution
  • Sensors - to monitor temperature, humidity, etc.

Parts

Required

Optional

The Danger Brewing Hub currently only supports DS18B20 and AM2302 temperature sensors.

It also only supports an SSD1306 OLED display.

Wiring Diagram

alt text diagram.fzz

Shown with all parts

Setup Your Pi

  • Operating System Installation
  • Opearting System Configuration
    • Initially, you will need an external display and keyboard. Get those, plug in and power on the pi.
      • When your pi boots up, log in with:
        • username: pi
        • password: raspberry (we'll change this later)
    • Type sudo raspi-config
      • Expand file system
      • Internationalization options - adjust as necessary.
      • Change your password - if you want
      • Advanced Options - Hostname - change the hostname of your Pi (optional)
      • Advanced Options - Enable I2C
      • Advanced Options - Enable One-Wire
      • Advanced Options - Enable SSH
      • Reboot
    • Setup Wifi
      • Follow the instructions here
        • You can now ditch your keyboard and display.
        • sudo reboot
        • Find the IP address of your Pi on your network
        • ssh [email protected]
        • Enter password: raspberry
    • Install updates
      • sudo apt-get update
      • sudo apt-get upgrade
    • Install node
      • cd /tmp
      • wget http://node-arm.herokuapp.com/node_latest_armhf.deb
      • sudo dpkg -i node_latest_armhf.deb
    • Install git
      • sudo apt-get install git
  • Danger Brewing Configuration
    • Support for BCM2835 one-wire sensor:
      • cd /tmp
      • wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz
      • tar xvfz bcm2835-1.49.tar.gz
      • cd bcm2835-1.49/
      • ./configure
      • make
      • sudo make install
    • Support for DS18B20 one-wire sensor:
      • Your circuit should be setup, (see wiring diagram)
      • sudo nano /boot/config.txt
      • At the end of this file, add: dtoverlay=w1-gpio,gpiopin=XX
        • XX is the GPIO pin your sensor is plugged in to.
      • sudo modprobe w1-gpio pullup=1
      • sudo modprobe w1-therm strong_pullup=1
    • Reboot your pi
      • sudo reboot

Setup The Application & Sensors

  • First setup your Danger Brewing application with Firebase.
    • Follow the directions found here
  • Setup Service Account
    • Follow the instructions here
    • Hold on to this .json file.
  • Get the Code
    • cd /home/pi
    • git clone https://github.com/jonpitch/danger-brewing-hub.git
    • cd /danger-brewing-hub
    • npm install
    • reboot your pi: sudo reboot
  • Setup your configuration
    • From your computer: scp <your service account .json file> [email protected]:/home/pi/danger-brewing-hub/config/service-account.json
    • From the pi: cp /config/default.example.json /config/default.json
    • Update firebase ENV values with your own.
    • Update hub.id with your hub id from Firebase.
    • Configure taps:
      • tap.id should map to a tap in Firebase.
      • tap.pin should map to a pin your flow meter is connected to. See here for more information.
    • Configure sensors (optional):
      • If you don't have any, leave as an empty array []
      • am2302 sensors:
        • type: Should remain am2302
        • id: Should map to a Firebase id
        • pin: Should be an integer, the GPIO pin your sensor is connected to.
        • polling: A value in milliseconds, how often this sensor should send data.
      • ds18b20 sensors:
        • type: Should remain ds18b20
        • id: Should map to a Firebase id
        • address: Should map to your sensors address
          • To find this address, there's a good overview here
          • If you followed the OS setup and your sensor is installed properly:
            • cd /sys/bus/w1/devices
            • ls
            • The 28-xxx is your address.
        • polling: A value in milliseconds, how often this sensor should send data.
    • Configure display (optional):
      • If you don't have one, remove it from the config.
      • type: ssd1306 (the only display currently supported)
      • w: How many columns wide (64, 128, etc.)
      • h: How many rows high (32, 64, etc.)
      • address: The I2C address of the display
        • If your display is hooked up correctly: i2cdetect -y 1
        • If you need help understanding the output, try here
      • toggle: This should be your toggle's pin.
      • If you're feeling crazy, greetings and goodbyes are messages to display at random when you turn on or off your display. tip: keep them short.
    • Run the hub
      • cd /home/pi/danger-brewing-hub
      • ./run.sh
    • Checking for updates
      • cd /home/pi/danger-brewing-hub
      • git pull

Developers

Building

  • npm run build

Output is in /lib

Running

  • ./run.sh

Contributing

  • Feel free to help out. Take a look if there are any open issues, bugs or if you want to just make the danger-brewing-hub better, go for it!

Additional Resources

About

sensor hub for a nodebot kegerator

Resources

License

Stars

Watchers

Forks

Packages

No packages published