Direct naar hoofdinhoud

Nightscout

Onofficiรซle Beta-vertaling

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

Watโ€‹

Nightscout (CGM in the Cloud) is een open source, DIY-project dat realtime toegang tot CGM-gegevens mogelijk maakt via een HTTP REST API. Het wordt gebruikt voor het veilig op afstand bekijken van bloedsuikerdata vanaf elke locatie...inclusief Oh My Posh-segmenten in de opdrachtregel!

Voorbeeldconfiguratieโ€‹

Dit voorbeeld gebruikt standaard mg/dl omdat de Nightscout API de glucosewaarde (.Sgv) in mg/dl-formaat verstuurt. Hieronder staat ook een template voor het weergeven van de glucosewaarde in mmol/L. Wanneer je verschillende kleurbereiken gebruikt, moet je je hoge en lage glucosewaarden met 18 vermenigvuldigen en deze waarden in de templates gebruiken. Denk ook na over je achtergrond- en voorgrondkleuren. Gebruik bijvoorbeeld geen witte tekst op een gele achtergrond.

Het foreground_templates-voorbeeld hieronder kan worden ingesteld op slechts รฉรฉn kleur, mits die kleur zichtbaar is tegen elk van je achtergronden.

{
"type": "nightscout",
"style": "diamond",
"foreground": "#ffffff",
"background": "#ff0000",
"background_templates": [
"{{ if gt .Sgv 150 }}#FFFF00{{ end }}",
"{{ if lt .Sgv 60 }}#FF0000{{ end }}",
"#00FF00"
],
"foreground_templates": [
"{{ if gt .Sgv 150 }}#000000{{ end }}",
"{{ if lt .Sgv 60 }}#000000{{ end }}",
"#000000"
],
"leading_diamond": "๎‚ถ",
"trailing_diamond": "๎‚ฐ",
"template": "๎Šก {{ .Sgv }}{{ .TrendIcon }}",
"options": {
"url": "https://YOURNIGHTSCOUTAPP.herokuapp.com/api/v1/entries.json?count=1&token=APITOKENFROMYOURADMIN",
"http_timeout": 1500
}
}

Of geef weer in mmol/l (in plaats van de standaard mg/dl) met de volgende template:

{
"template": "๎Šก {{ if eq (mod .Sgv 18) 0 }}{{divf .Sgv 18}}.0{{ else }} {{ round (divf .Sgv 18) 1 }}{{ end }}{{ .TrendIcon }}"
}

Optiesโ€‹

NameTypeDefaultDescription
urltemplateYour Nightscout URL, including the full path to entries.json AND count=1 AND token. Example above. You'll know this works if you can curl it yourself and get a single value
headersmap[string]stringA key, value map of Headers to send with the request
http_timeoutint20in milliseconds - how long do you want to wait before you want to see your prompt more than your sugar? I figure a half second is a good default
informatie

Je kunt de trendiconen aanpassen, de trend elders plaatsen, tekst toevoegen - net wat je wilt! Zorg dat je NerdFont het gewenste glyf bevat of zoek er een.

IcoonBeschrijving
DoubleUpIconstandaard โ†‘โ†‘
SingleUpIconstandaard โ†‘
FortyFiveUpIconstandaard โ†—
FlatIconstandaard โ†’
FortyFiveDownIconstandaard โ†˜
SingleDownIconstandaard โ†“
DoubleDownIconstandaard โ†“โ†“

Template (informatie)โ€‹

standaard template
 {{ .Sgv }}

Eigenschappenโ€‹

NameTypeDescription
.IDstringThe internal ID of the object
.SgvintYour Serum Glucose Value (your sugar)
.DateintThe unix timestamp of the entry
.DateStringtimeThe timestamp of the entry
.TrendintThe trend of the entry
.DevicestringThe device linked to the entry
.TypestringThe type of the entry
.UtcOffsetintThe UTC offset
.SysTimetimeThe time on the system
.MillsintThe amount of mills
.TrendIconstringBy default, this will be something like โ†‘โ†‘ or โ†˜ etc but you can override them with any glyph as seen above