-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Describe the bug
OpenAPS rig no longer able to loop since migrating Nightscout from Heroku to Railway.
The rig is unable to get BG data from railway/nightscout (however it is able to send pump data to nightscout just fine).
/var/log/openaps/pump-loop.log: "Waiting up to 4 minutes for new BG.........." (but never gets BG)
/var/log/openaps/ns-loop.log: "Loading CGM data from Nightscout failed {"code":"CERT_HAS_EXPIRED"}
BG url: https://melaniejellis.up.railway.app/api/v1/entries/sgv.json?count=288&token=
Note: From Edison bash console I can get the data no problem using curl. Only seems to be an issue from node js
node js version: nodejs/unknown,now 8.17.0-1nodesource1 i386 [installed]
Note: railway uses "Lets Encrypt" for certification. Is node version too old to support "Lets Encrypt"? (I was reluctant to try upgrading node js in case it breaks something else.)
To Reproduce
Steps to reproduce the behavior:
- Migrate nightscout from heroku to railway: https://nightscout.github.io/vendors/railway/migration/?fbclid=IwAR3PVqKdfU7rVO8n41LHfi83FgupH7ZO8rHvZs_ECIinnuYZZ5CJoKKaBRk
- Check if rig is still looping
Expected behavior
Rig should continue looping after upgrading nightscout from heroku to railway
Smartphone:
model: Samsung S21
xdrip: 344deb4-2022.11.16
Setup Information:
- Pump type: Medtronic 722, v. 2.4A firmware
- CGM type: "xDrip-DexcomG6" with anubis transmitter
- Rig type: Edison/Explorer Board rig
- Linux version:
3.10.98-jubilinux-edison (robin@robin-i7) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #3 SMP PREEMPT Sun Aug 13 04:22:45 EDT 2017 - oref0 version: 0.7.1-dev (we updated from github to latest dev on 14/01/2023)
Additional context
I'm creating this bug report on behalf of @melaniejellis - who I've been helping get her openAPS rig looping again.
I'm not completely familiar with the openAPS system so apologies if this turns out this is not be a bug (but rather something we've missed in the setup.)
I implemented a temporary work around to get melanie looping again... which was to add the following lines to /usr/bin/oref0-get-ns-entries (https://github.com/openaps/oref0/blob/dev/bin/oref0-get-ns-entries.js). This allows the ns script to get the BG data, ignoring the certificate issue:
headers["User-Agent"] = 'openaps';
var uri = nsurl + '/api/v1/entries/sgv.json?count=' + records + tokenAuth;
var options = {
uri: uri
, json: true
, timeout: 90000
, headers: headers
, gzip : true
+ , agentOptions: {
+ rejectUnauthorized: false
+ }
};
Look forward to hearing (if this is a real bug) what is the proper fix.