zreptil / nightscout-reporter

a web app to create PDF documents from nightscout data
https://nightscout-reporter.zreptil.de/
BSD 3-Clause "New" or "Revised" License
59 stars 47 forks source link

Eigener Pi4 Nightscout ist nicht erreichbar #58

Closed Unrealsweb closed 3 years ago

Unrealsweb commented 3 years ago

Bekomme beim Reporter folgenden Hinweis: Die angegebene URL ist nicht erreichbar. Wenn die URL stimmt, dann kann es an den Nightscout-Einstellungen liegen. In der Variable ENABLE muss das Wort "cors" stehen, damit externe Tools wie dieses hier auf die Daten zugreifen dürfen.

Wenn diese URL geschützt ist, muss ausserdem der Zugriffsschlüssel korrekt definiert sein. Diesen erreicht man über "Administrator-Werkzeuge" auf der persönlichen Nightscout Seite.

Habe noch bei ns10be eine Instanz damit geht es, was kann ich an meiner Config am Server ändern ?

zreptil commented 3 years ago

Kommst Du denn mit der URL, die Du im Nightscout Reporter angibst im Browser, in dem Du den Nightscout Reporter aufrufst auf diese Seite drauf?

Unrealsweb commented 3 years ago

Ja von jedem Rechner aus mit "https://meine.seite.url:portnummer/"

zreptil commented 3 years ago

Dann ruf da doch mal folgendes auf: "https://meine.seite.url:portnummer/api/v1/status.json" und schick mir das, was Dir da angezeigt wird. Vielleicht kann ich Dir dann sagen, wo das Problem liegt.

Unrealsweb commented 3 years ago

{"status":"ok","name":"nightscout","version":"14.2.2","serverTime":"2021-10-05T08:14:21.344Z","serverTimeEpoch":1633421661344,"apiEnabled":true,"careportalEnabled":true,"boluscalcEnabled":true,"settings":{"units":"mg/dl","timeFormat":24,"dayStart":7,"dayEnd":21,"nightMode":false,"editMode":"on","showRawbg":"always","customTitle":"Mein Nightscout","theme":"colors","alarmUrgentHigh":true,"alarmUrgentHighMins":[30,60,90,120],"alarmHigh":true,"alarmHighMins":[30,60,90,120],"alarmLow":true,"alarmLowMins":[15,30,45,60],"alarmUrgentLow":true,"alarmUrgentLowMins":[15,30,45],"alarmUrgentMins":[30,60,90,120],"alarmWarnMins":[30,60,90,120],"alarmTimeagoWarn":true,"alarmTimeagoWarnMins":"15","alarmTimeagoUrgent":true,"alarmTimeagoUrgentMins":"30","alarmPumpBatteryLow":false,"language":"en","scaleY":"log","showPlugins":"careportal delta direction upbat rawbg","showForecast":"ar2 openaps","focusHours":3,"heartbeat":60,"baseURL":"","authDefaultRoles":"readable careportal","thresholds":{"bgHigh":220,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":60},"insecureUseHttp":false,"secureHstsHeader":true,"secureHstsHeaderIncludeSubdomains":false,"secureHstsHeaderPreload":false,"secureCsp":false,"deNormalizeDates":false,"showClockDelta":false,"showClockLastTime":false,"frameUrl1":"","frameUrl2":"","frameUrl3":"","frameUrl4":"","frameUrl5":"","frameUrl6":"","frameUrl7":"","frameUrl8":"","frameName1":"","frameName2":"","frameName3":"","frameName4":"","frameName5":"","frameName6":"","frameName7":"","frameName8":"","authFailDelay":5000,"adminNotifiesEnabled":true,"DEFAULT_FEATURES":["bgnow","delta","direction","timeago","devicestatus","upbat","errorcodes","profile","bolus","dbsize","runtimestate","basal","careportal"],"alarmTypes":["simple"],"enable":["delta","direction","timeago","devicestatus","ar2","profile","careportal","boluscalc","food","rawbg","iob","cob","bwp","cage","sage","iage","treatmentnotify","basal","pump","openaps","upbat","errorcodes","simplealarms","bridge","mmconnect","loop","treatmentnotify","bgnow","bolus","dbsize","runtimestate","simplealarms"]},"extendedSettings":{"pump":{"warnBattP":30,"urgentBattP":20,"warnBattV":1.35,"warnClock":30,"urgentBattV":1.3,"urgentClock":60,"retroFields":"reservoir battery clock","enableAlerts":true,"fields":"reservoir battery clock status","warnRes":50,"urgentRes":10},"openaps":{"retroFields":"status-symbol status-label iob meal-assist rssi","warn":30,"urgent":60,"enableAlerts":false,"fields":"status-symbol status-label iob meal-assist rssi freq","colorPredictionLines":true},"loop":{"warn":30,"urgent":60,"enableAlerts":false},"bwp":{"snoozeMins":10,"warn":0.5,"urgent":1,"snooze":0.1},"cage":{"info":44,"display":"hours","warn":48,"urgent":72,"enableAlerts":true},"sage":{"info":144,"warn":164,"urgent":166,"enableAlerts":false},"iage":{"info":44,"warn":48,"urgent":72,"enableAlerts":false},"profile":{"history":false,"multiple":false},"devicestatus":{"advanced":true,"days":1}},"authorized":null,"runtimeState":"loaded"}

zreptil commented 3 years ago

Da fehlt genau das, was in der Fehlermeldung beschrieben wird: "Die angegebene URL ist nicht erreichbar. Wenn die URL stimmt, dann kann es an den Nightscout-Einstellungen liegen. In der Variable ENABLE muss das Wort "cors" stehen, damit externe Tools wie dieses hier auf die Daten zugreifen dürfen."

Du musst auf dem Server in der Variable ENABLE cors reinschreiben. Das steht bei Dir nicht drin und damit kann Nightscout Reporter nicht darauf zugreifen.

Unrealsweb commented 3 years ago

Danke, hatte es jetzt noch einmal eingetragen und nu klappt es.