Giter Club home page Giter Club logo

cbpi_tilt's Introduction

Tilt Hydrometer Plugin for CraftBeerPi 3.0

Allows your Tilt digital hydrometer to send data to CraftBeerPi 3.0, such as the current temperature and gravity readings. The plugin allows you to create multiple sensors, each of which is associated with a different data type that the Tilt is capturing, so that you can use these sensors as you would any other sensor in CraftBeerPi. You can also use multiple Tilt devices for different fermentation chambers at the same time. See below for setup instructions and some screenshots of the configuration options.

This plugin is based on the work of several others who developed the necessary Bluetooth and Tilt communications libraries:

Screenshots

tilt1

tilt2

Requirements

⚠️ Due to the Tilt's use of Bluetooth, you will need to be using either a Raspberry Pi with built-in Bluetooth (such as Raspbery Pi 3 or Raspberry Pi Zero W) or a Bluetooth dongle to use this plugin.

Installation

  1. First, you must install the library that will allow the plugin to communicate with the Tilt over Bluetooth. Open a terminal window on your Raspberry Pi or use SSH and run the following command:
sudo apt-get install python-bluez
  1. Install the NumPy library required by the Tilt plugin:
sudo pip install numpy
  1. Run the following command to allow the Bluetooth device to be acessible by any user:
sudo setcap cap_net_raw+eip /usr/bin/python2.7
  1. Click the System menu in CraftBeerPi, and then click Add-On. Install the Tilt plugin by clicking the Download button, and when you receive a notification, reboot the Raspberry Pi.

Configuration

CraftBeerPi Configuration

  1. In CraftBeerPi, click on the System menu, and then choose Hardware Settings.
  2. Click the Add button in the Sensor section, and fill out the sensor properties:
    1. Name: Give the sensor a name. This is specific to this sensor reading, and does not need to match the Tilt color. It can be something like Wort Gravity or Tilt Temperature.
    2. Type: Choose TiltHydrometer.
    3. Tilt Color: This should be set to the color of your Tilt.
    4. Data Type: Each Tilt has two types of data that it reports, the Temperature and Gravity, so select the one that you are configuring for this particular sensor.
    5. Gravity Units: This field is only required if Data Type is set to Gravity. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
    6. Calibration Point 1-3*: Optional. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is uncalibrated value = actual value (spacing is optional). More info on calibration is in the section below.
    7. Once you have filled out the sensor fields, click Add.
  3. Repeat the above steps if you want additional sensors for the other data types that your Tilt reports, or if you have more than one Tilt, you can create sensors for those devices as well.
  4. You can now add any of the Tilt sensors to kettles or fermenters in your brewery, or you can view their data on the dashboard or graph their data with the charts.

Tilt Calibration

You can use the Calibration Point fields to calibrate your Tilt, much like when using the standalone Tilt app. Here are some examples of ways you can calibrate your Tilt with this plugin.

  • You can perform the Tare in Water procedure by placing the Tilt in water, taking a reading, and entering the value in a Calibration Point field in the format 1.002 = 1 (change the first number to your specific reading).
  • To fine tune the calibration even more, you can make a low and/or high gravity calibration point by taking readings of one or two solutions with a known gravity and enter those readings as tilt reading = solution's actual gravity.
  • If you enter only a single calibration point, the difference will be applied to every reading equally. So you could enter 0 = 5 if you just want 5 added to every reading that the Tilt takes, or 5 = 0 if you want to subtract 5 from every reading. If you enter two or more calibration points, a linear relationship between the points will be determined and used to adjust the readings accordingly (known as linear regression).
  • These calibration procedures work the same for both gravity readings and temperature readings, and are calculated after the conversion to the desired units (°C to °F, SG to Brix), so you should calibrate your Tilt with the units set to what they will be when you use it for actual brewing.

cbpi_tilt's People

Contributors

indyjoea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

viyh jpgimenez

cbpi_tilt's Issues

No module named bluetooth._bluetooth

IndyJoeA,

This plugin is amazing, and I really want to get it working. I'm using a Pi 3B, with a fresh install of CBPi on vanilla Noobs. At first I installed the plugin straight from the plugin list, but uninstalled and followed the readme once I actually read it. The hydrometer is on and registering on my phone.

Now, I get "Failed to load plugin TiltHydrometerPlugin/ No module named bluetooth._bluetooth" as a popup upon restarting, and I can't find Tilt in the thermometer list. Any idea what could cause this?

--
Edit: Just running through the install again, and noticed that python-bluez was never actually installed. Apt says "package python-bluez is not available, but is referred to by another package.... Package 'python-bluez' has no installation candidate"

I attempted the "pip install pybluez" listed in the pybluez readme, which also failed because my system apparently lacks bluetooth.h (output pastebin'd here)

Missing module numpy

I've done 2 fresh installs recently and both times after all the raspbian updates, and craftbeerpi 3 git pull and tilt addon install, I get a message about missing module numpy. Which is fixed with "sudo pip install numpy" - not sure if I'm missing something, or if it's worth adding to install instructions?

RP3 and Tilt v2 is working. RP3+ and Tilt v2 is not working. Where is the fault?

Install Craftbeerpi3, update, reboot
Install Tilt (Python-blues, numpy and setcap, reboot
In CBP3 system, add-on, tilt download, reboot
Setup the Tilt Temperture and Gravity in sensorgroup but there is not received any data.
RaspberryPi 3 = It is working :-)
RaspberryPi 3+ = Not working :-( Is there something wrong in the Blutooth module?

tilt v2

hi.
Great plugin. Have a problem whereby data from tilt appears for a while then just freezes. Its like it looses the connection to the tilt. Does the pluglin work 100% with the newer v2 tilt's and a pi 3b+.

Testing today, I also seem to have a workround of clicking on the pi's Bluetooth icon , add device and leaving it continually trying to 'add device'. this seems to keep the Bluetooth link active... (if this is the workround.. is there a way of adding this to a pi's startup?)

does the pi 3B+ have a Bluetooth sleep setting maybe ?

sorry for all the questions! I am new to craftbeerpi.

Install Issues

Followed the supplied instructions, but after installing the plugin I receive this error

Failed to load plugin TiltHydrometerPlugin
init() got an unexpected keyword argument 'description'

Any help would be appreciated.

Cannot connect

I'm running the CBP software and installed the Tilt Plugin. I've also gone through your installation:

  • sudo apt-get install python-bluez
  • sudo setcap cap_net_raw+eip /usr/bin/python2.7 (One thing to note, on your Gitbub page it is NOT clear there is a space between eip and /usr, I missed this at first).

I can configure a tile sensor in CBP but no data shows up. In the ReadME you mention something about ibeacon_scanner but I did not install this. Do I need to install this? I did not pair the tilt device, do I need to pair it? How do you get the tilts to be seen?

Polling Frequency

Hi there, not so much an issue as a question - I see the tilt is polled every 5 seconds, is that necessary? Part of me thinks that is going to drain the battery faster but maybe I am wrong as I'm no expert in Bluetooth devices. I post the tilt data every 15 minutes to brewstat.us (using my own add-in) so I certainly don't need a 5-second frequency. Is there a way to change that, or am I worried about nothing? Thanks for the awesome module!

Issue trying to load tilt plugin

I am getting the following error message when the system is running:

Failed to load plugin TiltHydrometerPlugin
init() got an unexpected keyword argument 'description'

chart blank

Hello IndieJoeA. I have been using your plugin for the Craftbeerpi3 to integrate de Tilt Hydrometer. It works fine. Reads all the hydrometers, and presents the current info. But i have trouble viewing the chart. When i pull it, it comes out blank. It does not present any historic data. Is there something I have not done? any configuration that need to be completed? most sincere appreciation for your assistance.

Broken Pipe

I realise this problem is at my end just looking for advice to fix permanently. Getting Broken Pipe errors on startup (see log below). If I'm home I do a combination of hciconfig hci0 down/up combined with some hcitool lescan's and add some chicken blood and eventually things work out. RIght now I'm remote so I can't do the voodoo - so looking for advice on what I need to do to my setup to avoid this situation. Thanks in advance.

2018-10-10 11:06:26,Starting Bluetooth connection
2018-10-10 11:09:18,Error starting Bluetooth device, exception: (32, 'Broken pipe')
2018-10-10 11:09:18,Restarting Bluetooth process in 10 seconds
2018-10-10 11:09:27,Calibration equation: tilt + -2.0
2018-10-10 11:09:27,Calibration equation: tilt + 0.002
2018-10-10 11:09:27,Calibration equation: tilt
2018-10-10 11:09:27,Calibration equation: tilt + 0.003
2018-10-10 11:09:27,Starting Bluetooth connection
2018-10-10 11:11:20,Error starting Bluetooth device, exception: (32, 'Broken pipe')
2018-10-10 11:11:20,Restarting Bluetooth process in 10 seconds
2018-10-10 11:11:29,Calibration equation: tilt + -2.0
2018-10-10 11:11:29,Calibration equation: tilt + 0.002
2018-10-10 11:11:29,Calibration equation: tilt
2018-10-10 11:11:29,Calibration equation: tilt + 0.003
2018-10-10 11:11:29,Starting Bluetooth connection
2018-10-10 11:14:20,Error starting Bluetooth device, exception: (32, 'Broken pipe')
2018-10-10 11:14:20,Restarting Bluetooth process in 10 seconds

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.