GithubHelp home page GithubHelp logo

danger-brewing-hub's Introduction

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

danger-brewing-hub's People

Contributors

jonpitch avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

danger-brewing-hub's Issues

flow meter calibration

The flow meter calibration seems really arbitrary. It would be nice if there was some formula that could be applied for consistency.

Update Documentation

Thorough documentation:

  • Setting up Pi
  • Required Hardware
  • Required Software
  • Wiring Diagrams
  • Links to Resources
  • Setting up Firebase - integrating with Kegerator

Diagnostic Output

Support writing diagnostics (temperature, humidity, flow, pi status, etc.) to an LCD.

Flow Meters

Support flow meters and report data to Firebase.

Typo in readme

Hostname section.
Would also be nice to add instructions to run on boot.

Tests

What does testing a nodebot look like?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.