Hello again BrewPi team. Recently I’ve been chatting with the folks at Clawhammer Supply and as our discussion progressed around fermentation, Emmet asked a great question. Is it possible to trigger a preset profile based on a gravity reading from a Tilt? For example, once the gravity hits a certain point could it trigger a ramp up for a d-rest schedule?
I don’t believe there is currently any way to configure use of the tilt gravity reading from within the Brewblox ui however, you can add additional functionality using either docker and scripts or something like node red. There is some good information that will help with both approaches here - Development Platforms | Brewblox. The node red approach is probably easier and we have successfully used it to create a web page to control multiple brewblox sequences and display the status and time remaining.
With these tools you can query the tilt gravity, test it against a setpoint and then change the SetpointProfile block to point to a different profile ID and reset the start time. The event bus topic would be similar to brewcast/state/spark-one with ‘spark-one’ replaced with your spark name. The block type is SetpointProfile. For this approach you would split your normal profile into something like Verdant Start Profile and Verdant Finish Profile.
A few thoughts regarding your application:
- Include a test for whether the tilt reading is present (in case reception at the Pi is intermittent or lost).
- The tilt gravity reading can change dramatically while moving a fermenter or during an early dry hop. You might want to use some averaging in the decision logic (e.g., the reading has been below the gravity setpoint for 30 min).
- Once the switch to the second profile has been made, you should probably end the comparison loop.