Direct naar hoofdinhoud

Brewfather

Onofficiële Beta-vertaling

Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden →

Wat

Alle brouwers opgelet! Houd de status van je Brewfather-batch direct in je commandoregel bij met het brewfather-segment!

Je hebt je User ID en API Key nodig zoals gegenereerd in het instellingenscherm van Brewfather, met de scopes batches.read en recipes.read ingeschakeld.

Voorbeeldconfiguratie

Dit voorbeeld gebruikt het standaard segmenttemplate om details weer te geven die passen bij de status van de batch

Daarnaast wordt de achtergrond van het segment rood als de laatste meting ouder is dan 4 uur - wat kan helpen om problemen aan te geven, bijvoorbeeld als een Tilt of soortgelijk apparaat elke 15 minuten zou moeten loggen naar Brewfather.

informatie

Temperatuureenheden zijn in graden Celsius en soortelijk gewicht wordt uitgedrukt in X.XXX waarden.

{
"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"
}
}

Opties

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

Pictogrammen

Je kunt de pictogrammen voor temperatuurtrend overschrijven zoals gebruikt door template-eigenschap .TemperatureTrendIcon met:

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

Je kunt de standaardpictogrammen voor batchstatus overschrijven zoals gebruikt door template-eigenschap .StatusIcon met:

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

Template (informatie)

standaard template
{{ .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 }}

Eigenschappen

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

Meting

.Reading bevat de meest recente gegevens van apparaten of handmatige invoer, zichtbaar in de Readings-grafiek van Brewfather. Als er geen metingen beschikbaar zijn, is .Reading 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"

Extra eigenschappen

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

Hyperlinkondersteuning

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

Geavanceerd templating

Het ingebouwde template biedt belangrijke informatie, maar je kunt de batch-eigenschappen gebruiken om je eigen template te bouwen. Ter referentie ziet het standaardtemplate er zo uit:

{
"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}}"
}

Eenheden omrekenen

Standaard worden temperatuurmetingen gegeven in graden Celsius, en metingen van soortelijk gewicht in decimale SG-eenheden (X.XXX).

De volgende conversiefuncties zijn beschikbaar in het template om naar andere eenheden om te rekenen:

Temperatuur

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)

Soortelijk gewicht

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)

(Deze gebruiken de polynoomconversies van Wikipedia)

Voorbeeld

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

Om soortelijk gewicht weer te geven als SG in XXXX-formaat (bijvoorbeeld "1020" in plaats van "1.020"), gebruik je de mulf template-functie

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