Skip to content

Arduino based Brewfather integration for the Tilt Hydrometer V2

Notifications You must be signed in to change notification settings

Wholteza/tiltuino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiltuino

Tiltuino is a Arduino 33 IoT project that allows collecting measurements from the Tilt Hydrometer V2 and log it to the Brewfather API.

The project (apart from the Tilt Hydrometer) requires only the Arduino 33 IoT.

Why?

I pretty much only use my Tilt Hydrometer with Brewfather. And the official way of logging with a Raspberry Pi demands that I either dedicate one device fully or that I always ferment in the same area so my Pi Bluetooth is within reach. On top of that I have to update the device, change the sd-card when it fails and deal with other things implied by running a full linux distribution.

This enables me to address all of those inconveniences with one small and compared to the Raspberry Pi (v3-4B), cheap device.

How is data read?

The Tilt Hydrometer V2 makes use of ibeacon and communicates through Bluetooth LE. Instead of using the Service and Characteristic method of publishing data to its subscribers, it broadcasts a major and minor value in the manufacturer data. Those two values are extracted and converted into decimal values.

The official ArduinoBLE library currently does not support reading the devices manufacturer data. I found that a person with the nick of makisin had already made the changes needed and put them in a pull request, but this pull request had been unhandled for a year. So I decided to fork the library and add the changes myself to make it easy to clone Wholteza/ArduinoBLE.

With the manufacturer data dumped and with some help from a post on the arduino forums I discovered the following.

Breakdown of the manufacturer data

4c 00 02 15 a4 95 bb 80 c5 b1 4b 44 b5 12 13 70 f0 2d 74 de 00 4e 04 1c 3a

Apple beacon Type (ibeacon constant) Length (ibeacon constant) Device UUID Major (Temperature in farenheit) Minor (Specific gravity x 1000) Unknown (Signal strength?)
4c 00 02 15 a4 95 bb 80 c5 b1 4b 44 b5 12 13 70 f0 2d 74 de 00 4e 04 1c 3a

Then it was simply a job of grabbing the correct bytes and converting them to decimal values.

Logging

I made use of the ArduinoHttpClient, and built up a request from Brewfathers custom device documentation.

Getting started

Requirements

Clone Wholteza/ArduinoBLE and place it in your arduino IDE's library directory. Make sure that you don't have the official ArduinoBLE library in there from before.

Install ArduinoHttpClient and WiFiNINA from the Library Manager in the Arduino IDE.

Steps

  1. Clone this repository.
  2. Replace the variables in the sketch, below are instructions for some of them:
  • tiltBluetoothAddress: Can be obtained by downloading a BLE scanning app to your phone. Keep the tilt hydrometer near and tilt it a bit so it starts broadcasting. The device should show up as an "ibeacon". Copy the address from that device.
  • brewfatherCustomStreamPath: Can be obtained in your brewfather settings under "Power-ups". Enable it and copy the url.
  • customDeviceName: Choose a name, will be shown in brewfather.
  • sendInterval: Interval in ms, should not be less than 900000 for brewfather.
  • debugMode: Logs all actions to serial.
  1. Upload it to the Arduino 33 IoT.
  2. Keep your hydrometer near and tilt it a bit so it starts broadcasting.
  3. Device should show up in brewfather device section with the name you selected.
  • If not: Use the debug mode to see if some part fails.

About

Arduino based Brewfather integration for the Tilt Hydrometer V2

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages