Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Danger Brewing: Hub

A NodeBot Kegerator.


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.




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 pi@192.168.x.x
        • Enter password: raspberry
    • Install updates
      • sudo apt-get update
      • sudo apt-get upgrade
    • Install node
      • cd /tmp
      • wget
      • 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
      • 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
    • cd /danger-brewing-hub
    • npm install
    • reboot your pi: sudo reboot
  • Setup your configuration
    • From your computer: scp <your service account .json file> pi@192.168.x.x:/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 with your hub id from Firebase.
    • Configure taps:
      • should map to a tap in Firebase.
      • 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
      • ./
    • Checking for updates
      • cd /home/pi/danger-brewing-hub
      • git pull



  • npm run build

Output is in /lib


  • ./


  • 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


sensor hub for a nodebot kegerator




No packages published
You can’t perform that action at this time.