Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1

Open
wants to merge 61 commits into
base: look-ahead-dev
Choose a base branch
from
Open

Dev #1

wants to merge 61 commits into from

Conversation

tim2000s
Copy link
Owner

No description provided.

tzachi-dar and others added 17 commits February 13, 2020 18:22
* Upload NS status when possible.

Before this checkin, ns-loop created the status data, and uploaded it to nightscout (if possible).
But in case of failure, the file will get overwritten.
This means that in the case of no internet, OAPS decisions get lost.
This checkin fixes it by adding timestamps to the files.
When internet is available, the files will be uploaded according to the correct order.
Files older than a day will be deleted.

Testing:
I have prevented uploading of files for a few hours, and when it was enabled again, data was shown correctly in nightscout site.
Decreased timeout, and saw the files being deleted.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* In the case that a status file does not contain iob delete it instead of uploading it.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
* deprecate/remove support for max_bg and wide_bg_target_range

* support target_bg in preferences.json

* populate target_bg from preferences.json to profile.json

* allow target_bg to override profile schedule in simulator
* don't loop on CGM data changing less than 1 mg/dL/5m for 45m

* typofix

* fix merge conflict error

* update tests to not be too flat

* continue to low-temp normally on too-flat readings <= 60 mg/dL

* only install/setup hostapd/dnsmasq if desired (to avoid breaking wifi)

* typofix

* treat hotspot_option as a string that must be "true"

* set up xdrip-js with DEXCOM_CGM_TX_ID

* whitespace
* Bugfixes for 0.7.1

- Rework nodejs/npm install
- Install openaps toolkit from github
- Ask user to upgrade their Debian Jessie install...

* Update openaps-install.sh

* Update openaps-install.sh

* Store MEDTRONIC_PUMP_ID and MEDTRONIC_FREQUENCY

This stores MEDTRONIC_PUMP_ID and MEDTRONIC_FREQUENCY in the user's ~/.bash_profile, so they can run commands without having to manually set them at login time.
* Upload NS status when possible.

Before this checkin, ns-loop created the status data, and uploaded it to nightscout (if possible).
But in case of failure, the file will get overwritten.
This means that in the case of no internet, OAPS decisions get lost.
This checkin fixes it by adding timestamps to the files.
When internet is available, the files will be uploaded according to the correct order.
Files older than a day will be deleted.

Testing:
I have prevented uploading of files for a few hours, and when it was enabled again, data was shown correctly in nightscout site.
Decreased timeout, and saw the files being deleted.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* In the case that a status file does not contain iob delete it instead of uploading it.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Add code to run js code on a shared server.

This saves initilaztion time.

Worked for a day, which means testing only started.

* Fix a typo.

* Code to start shared node.

* Add code that verifies that shared node is answering to requests and
starting it if needed.

* Add code to store program input in order to test it.

* fix dashes to be underscores

* Add json file to shared code.

* Add code to capture data of json commands.

* New json funciontality, and changes from tests.

* Trival changes to white spaces handeling.

* Minor refactoring to the code.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* install socat on all platforms for shared-node

* remove non-json debug output breaking json parsing

* Merge branch 'tzachi-share-node-ns-status' of https://github.com/tzachi-dar/oref0 into tzachi-dar-tzachi-share-node-ns-status

Conflicts:
	bin/oref0-ns-loop.sh

* install socat on all platforms for shared-node

* remove non-json debug output breaking json parsing

* Remove temp files from the shared node.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Stop copying data to test_data.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Ad an update script and call it every 15 minutes.

Co-authored-by: Tzachi Dar <tzachi.dar@gmail.com>
* Update index.js

* Update determine-basal.js

* Added 0.2 as default and 0.3 as safety limit

* fixed code spacing

* removed %
Recently I re-ran the setup script on DEV and ran into the parsedatetime error. I narrowed it down to what I think is a typo, there is a `===` when I believe `==` is what was meant. I modified this file locally and ran with no issues.
As per @renegadeandy pull request renegadeandy#1

just tested it and it works nicely, so making PR for Dev.
Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
* Better error handling for Autotune without BG-data

Prevents technical error on the logging which users of Autotune(Web) see.

* Improve error message on Autotune without BG-data

Informs users on where to start investigation.
geekygirlsarah and others added 12 commits October 16, 2021 20:32
* rewind, prime and battery indicates change

* rewind, prime and battery indicates change

* "fixed" prime only

added filter for "fixed" primes only to count as site change. therefore manual primes will be ignored.
* Add config settings for low-battery shutdown thresholds

Adds a pair of config settings for low-battery shutdown thresholds.
One config setting is for Edison (denominated in millivolts), the
other is for Pi (given as percentage). This config setting is needed
for USB-powered Pi rigs, where the battery level indicator just
returns a random number, which might occasionally be zero.

* If unable to update with git pull, prompt before aborting

This is mainly for convenience during development; a checkout in
some weird branch doesn't necessarily return success when you
"git pull", but that doesn't necessarily mean you want to abort
oref0-runagain.sh.

* Fix bug that would clobber sshd_config

Depending on the initial contents of sshd_config, this would sometimes
try to add a line to it, but instead completely overwrite it to contain
only that line.

* Extend timeout on JS syntax check unit tests

On Pi Zero hardware, these tests would sometimes time out because
starting the nodejs interpreter is slow (even with a fixed nodejs
interpreter). Extend the timeout to 4s, from the default of 2s, so they
pass.

* Clean up require() usage in IOB unit test, making it pass without timeout on Pi Zero

* Add bash-unit-test-temp to gitignore

* Check for bad (super slow) RPi nodejs versions, install nvm version if found

* Tweak log messages about battery level
getting multiplication less or equal to 0 means that we have a really low target with a really low halfBasalTarget
with low TT and lowTTlowersSensitivity we need autosens_max as a value
we use multiplication instead of the division to avoid "division by zero error"
* Add high_bg enable SMB toggle

Still need to implement UTs, but this is an initial commit to get eyes on and daytime testing.

* Add logging

Also move the enableSMB_always at the end as it originally was

* Implement enableSMB_high_bg with dev

* Update determine-basal.js

Fix profile variable name for high bg target

Co-authored-by: Steven Bell <steven11@mail.usf.edu>
…nths. (#1232)

* Add a script to delete device status entries that are older than 2 months.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Fixes to delete old device status:
1) Create a local backup of the data.
2) Add number of days to delete as a parameter.
3) Add a nightly mode (parameters are given as enviorment variables).

* Write the backedup records in one line.

* New implmentation:
Delete all entries in one command.

* Fix enviorment variable for nightly mode.
* move oref0-calculate-iob to shared node.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* move oref0-meal to shared node.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Add more files to strict mode.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* move oref0-get-profile.js to shared node.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* start using oref0-get-profile

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Fix issues that have been found when running autosens.js in strict mode.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* move oref0-get-ns-entries to shared node.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Fix creation of test data for oref0-get-profile.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Add printing to oref0-get-ns-entries and it's successors.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Add printing to oref0-meal (only very high level)

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* Fix some minor errors found in testing.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>

* comment out echo dir_name from ns-loop.log

* comment out echo dir_name in pump-loop.log

Co-authored-by: Scott Leibrand <scottleibrand@gmail.com>
* comment out shared-node cp to avoid full disk

* #1417: define undefined var dev5m
mountrcg and others added 30 commits June 18, 2022 19:41
…#1419)

* fix: Remove edison nodesource installation

* fix: npm upgrade to latest *compatible* version, not the literal latest

The previous command (which installs npm@latest) results in the installation
of a version of npm which is almost certainly incompatible with the installed
(regardless of source) version of nodejs

* fix: Use n instead of apt for installing node & npm

* fix: Improve node execution time check function

- Remove what should be a redundant install, instead opt to fail if node is missing.
Given that openaps-packages.sh handles installing node, this failing check indicates
an unmitigated failure in the process previously, so let's not continue and make things
potentially worse.
- Attempt to remove existing nodejs/npm packages using apt
- Warn the user if versions of node and npm remain
- Switch nvm for n, using installed version of n if available
Else, bootstrap install n as done elsewhere.

* fix: Replace broken grep statements
This commit calls convert_bg on various console.error() print statements, which should improve readability for mmol/L users and leave mg/dL users' experience unaffected.
This reverts commit 80493da.

This is causing future IOB predictions to be incorrect (highly negative).
That causes the predBG lines to swoop up and to the right.
That results in (slightly) too much insulin being dosed in some situations.
…lse mmtune (#1457)

* on loop failure, retry preflight; if successful, refresh pumphistory, else mmtune

* wait_for_silence  before retrying preflight

* need to return, not keep invoking fail()

* only try preflight one more time before mmtuning
In some places a space is used instead of a colon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.