Simferm is a Python script designed to simulate the fermentation process by generating temperature and gravity data. It is specifically designed to work with Tilt-Sim, a tool that can simulate multiple (16) Tilt / Tilt Pro devices. Simferm can be used to test and develop brewing software.
- Simulates temperature and gravity changes during a fermentation process.
- Integrates seamlessly with Tilt-Sim to send simulated data.
- Configurable via command-line arguments or a YAML configuration file.
- Logs all simulated data to a log file for easy monitoring.
First, clone the repository to your local machine:
git clone https://github.com/ChuckGl/simferm.git cd simferm
Create a Python virtual environment in the directory where simferm.py
is located:
python3 -m venv .venv
Activate the virtual environment:
- On Linux/macOS:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
With the virtual environment activated, install the required Python packages using pip:
pip install -r requirements.txt
The setup.sh
script is designed to create a executable in /usr/local/bin
that allows
you to run simferm
from anywhere on your system.
-
Make the
setup.sh
script executable:chmod +x setup.sh
-
Run the
setup.sh
script:sudo ./setup.sh
-
You can modify and use the
simferm.service
file to create a service that runs at startup.sudo cp simferm.service /etc/systemd/system sudo systemctl enable simferm.service sudo systemctl start simferm.service
Simferm can be run in three ways: with a configuration file, using default settings, or with command-line arguments.
You can create a YAML configuration file (config.yaml
) to specify the settings for the
simulation. Here's an example configuration:
ip: '192.168.254.62' # IP address of the Tilt-Sim device
color: 'yellow*hd' # Tilt color from Tilt-Sim device
starttemp: 101.3 # Starting temperature (°F)
finaltemp: 55.3 # Final temperature (°F)
og: 1.0615 # Original Gravity (OG)
fg: 1.015 # Final Gravity (FG)
time: 60 # Total simulation time (minutes)
To run simferm
with a configuration file:
simferm --config config.yaml
If you run simferm
without specifying a configuration file, it will use the default
values provided in the script:
simferm
You can override the defaults or configuration file settings by specifying command-line arguments. Only the settings you provide a command-line argument will be overridden:
simferm --ip 192.168.254.62 --starttemp 104.5 --finaltemp 58.5 --time 120 --color blue --og 1.062 --fg 1.015
-h, --help
: Show this help message and exit--config
: Path to the YAML configuration file--ip
: IP address of the Tilt-Sim device--color
: Tilt color from the Tilt-Sim device--starttemp
: Starting temperature (°F)--finaltemp
: Final temperature (°F)--og
: Original Gravity (OG)--fg
: Final Gravity (FG)--time
: Total simulation time (minutes)
All simulation data is logged to simferm.log
, which is located in the same directory as
simferm.py
. You can monitor this log file to track the progress of the simulated
fermentation:
tail -f simferm.log
For more information about Tilt-Sim, visit the Tilt-Sim GitHub repository.