Aller au contenu principal

Brewfather

Traduction Bêta Non Officielle

Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →

Description

Brasseries en avant ! Suivez l'état de votre brassin Brewfather directement dans votre invite de commande grâce au segment brewfather !

Vous aurez besoin de votre ID utilisateur et clé API générés dans l'écran Paramètres de Brewfather, avec les scopes batches.read et recipes.read activés.

Exemple de configuration

Cet exemple utilise le modèle par défaut pour afficher un niveau de détail adapté à l'état du brassin.

De plus, l'arrière-plan du segment deviendra rouge si la dernière mesure dépasse 4 heures - signalant potentiellement un problème si, par exemple, un appareil Tilt ou similaire est censé envoyer des données à Brewfather toutes les 15 minutes.

info

Les températures sont en degrés Celsius et la densité est exprimée en valeurs X.XXX.

{
"type": "brewfather",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#33158A",
"background_templates": [
"{{ if and (.Reading) (eq .Status \"Fermenting\") (gt .ReadingAge 4) }}#cc1515{{end}}"
],
"options": {
"user_id": "abcdefg123456",
"api_key": "qrstuvw78910",
"batch_id": "hijklmno098765"
}
}

Options

NameTypeDefaultDescription
user_idstringas provided by Brewfather's Generate API Key screen
api_keytemplateas provided by Brewfather's Generate API Key screen
batch_idstringGet this by navigating to the desired batch on the brewfather website, the batch id is at the end of the URL in the address bar
day_iconstringdicon or letter to use to indicate days
http_timeoutint20in milliseconds - How long to wait for the Brewfather service to answer the request

Icônes

Vous pouvez remplacer les icônes de tendance de température utilisées par la propriété .TemperatureTrendIcon avec :

NameDefaultDescription
doubleup_icon↑↑increases of more than 4°C
singleup_iconincrease 2-4°C
fortyfiveup_iconincrease 0.5-2°C
flat_iconchange less than 0.5°C
fortyfivedown_icondecrease 0.5-2°C
singledown_icondecrease 2-4°C
doubledown_icon↓↓decrease more than 4°C

Vous pouvez remplacer les icônes par défaut d'état du brassin utilisées par la propriété .StatusIcon avec :

NameDefault
planning_status_icon\uF8EA
brewing_status_icon\uF7DE
fermenting_status_icon\uF499
conditioning_status_icon\uE372
completed_status_icon\uF7A5
archived_status_icon\uF187

Modèle (info)

modèle par défaut
{{ .StatusIcon }} {{ if .DaysBottledOrFermented }}{{ .DaysBottledOrFermented }}{{ .DayIcon }} {{ end }}{{ url .Recipe.Name .URL }} {{ printf \"%.1f\" .MeasuredAbv }}%{{ if and (.Reading) (eq .Status \"Fermenting\") }} {{ printf \"%.3f\" .Reading.Gravity }} {{ .Reading.Temperature }}\u00b0 {{ .TemperatureTrendIcon }}{{ end }}

Propriétés

NameTypeDescription
.StatusstringOne of "Planning", "Brewing", "Fermenting", "Conditioning", "Completed" or "Archived"
.StatusIconstringIcon representing above stats. Can be overridden with properties shown above
.TemperatureTrendIconstringIcon showing temperature trend based on latest and previous reading
.DaysFermentingintdays since start of fermentation
.DaysBottledintdays since bottled/kegged
.DaysBottledOrFermentedintone of the above, chosen automatically based on batch status
.Recipe.NamestringThe recipe being brewed in this batch
.BatchNamestringThe name of this batch
.BatchNumberintThe number of this batch
.MeasuredAbvfloatThe ABV for the batch - either estimated from recipe or calculated from entered OG and FG values
.ReadingAgeintage in hours of most recent reading or -1 if there are no readings available

Lecture

.Reading contient les données les plus récentes issues d'appareils ou de saisies manuelles, telles qu'affichées sur le graphique des mesures Brewfather du brassin. Si aucune mesure n'est disponible, .Reading sera null.

NameTypeDescription
.Reading.Gravityfloatspecific gravity (in decimal point format)
.Reading.Temperaturefloattemperature in °C
.Reading.Timeintunix timestamp of reading
.Reading.Commentstringcomment attached to this reading
.Reading.DeviceTypestringsource of the reading, e.g. "Tilt"
.Reading.DeviceIDstringid of the device, e.g. "PINK"

Propriétés supplémentaires

NameTypeDescription
.MeasuredOgfloatThe OG for the batch as manually entered into Brewfather
.MeasuredFgfloatThe FG for the batch as manually entered into Brewfather
.BrewDateintThe unix timestamp of the brew day
.FermentStartDateintThe unix timestamp when fermentation was started
.BottlingDatetimeThe unix timestamp when bottled/kegged
.TemperatureTrendfloatThe difference between the most recent and previous temperature in °C
.DayIconstringgiven by "day_icon", or "d" by default

Support des liens hypertexte

NameTypeDescription
.URLstringthe URL for the batch in the Brewfather app. You can use this to add a hyperlink to the segment if you are using a terminal that supports it. The default template implements this

Personnalisation avancée

Le modèle intégré fournit les informations essentielles. Cependant, vous pouvez utiliser les propriétés du brassin pour créer votre propre modèle. Pour référence, le modèle par défaut est le suivant :

{
"template": "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}{{.DayIcon}} {{end}}[{{.Recipe.Name}}]({{.URL}}) {{printf \"%.1f\" .MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{printf \"%.3f\" .Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}"
}

Conversion d'unités

Par défaut, les températures sont fournies en degrés Celsius et les densités en unités de densité spécifique décimales (X.XXX).

Les fonctions de conversion suivantes sont disponibles dans le modèle pour convertir vers d'autres unités :

Température

NameDescription
.DegCToFinput: float degrees in C; output float degrees in F (1 decimal place)
.DegCToKelvininput: float degrees in C; output float Kelvin (1 decimal place)

Densité

NameDescription
.SGToBrixinput float SG in x.xxx decimal; output float Brix (2 decimal places)
.SGToPlatoinput float SG in x.xxx decimal; output float Plato (2 decimal places)

(Ces conversions utilisent les formules polynomiales de Wikipedia)

Exemple

{
"template": "{{if .Reading}}{{.SGToBrix .Reading.Gravity}}°Bx, {{.DegCToF .Reading.Temperature}}°F{{end}}"
}

Pour afficher la densité au format SG XXXX (ex: "1020" au lieu de "1.020"), utilisez la fonction de modèle mulf

{
"template": "{{if .Reading}}{{.mulf 1000 .Reading.Gravity}}, {{.DegCToF .Reading.Temperature}}°F{{end}}"
}