Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8ee8483
update example Go versions to verison with token based authentication
PieterGit Dec 25, 2018
c6ea53e
run travis with latest node 8 and node 10 (both LTS)
PieterGit Dec 25, 2018
d45d29c
remove init pump comms to set ww parameters. this is now done with ec…
PieterGit Dec 25, 2018
5e15e18
fix duplicate radio_locale in pump.ini and don't run default code in …
PieterGit Dec 25, 2018
e54bdbe
create pump.ini before nightscout autoconfigure-device-crud
PieterGit Dec 25, 2018
459c2e2
remove ww_ti_usb_reset
PieterGit Dec 25, 2018
5b720b1
remove extra empty line
PieterGit Dec 25, 2018
1d73dbb
WIP to deprecate old MDT CGM setup (new MDT CGM Go stuff just require…
cluckj Dec 25, 2018
4971861
remove depreacte medtronic non Go setup
cluckj Dec 25, 2018
ac43e91
rename openaps-*.sh to oref0-*.sh and adjust
PieterGit Dec 27, 2018
889cca7
remove crypto 0.0.3, it is included in Node
PieterGit Dec 27, 2018
e94cc78
update npm packages
PieterGit Dec 27, 2018
bd9a9c4
use jq >= 1.5 for slurpfile.
PieterGit Dec 27, 2018
1e2ac27
Introduce is_debian_jessie function and use it to install jq from jes…
PieterGit Dec 27, 2018
620ea30
still add openaps to oref0-packages for now
PieterGit Dec 27, 2018
a679bd9
remove creation of pump.ini as scott suggests
PieterGit Dec 27, 2018
9bad0e2
Merge branch 'dev' of https://github.com/openaps/oref0 into 201812_de…
PieterGit Jan 27, 2019
60aa85c
revert ac43e91a1a6a25fb3f42c1423ede7254a6e29cea renaming as scott sug…
PieterGit Jan 27, 2019
300a100
switch back to openaps-packages.sh instead of oref0-packages.sh as sc…
PieterGit Jan 27, 2019
9204022
on a fresh rpi3 there is no /usr/local/bin/mmtune so don't move it
PieterGit Jan 27, 2019
2c3d41b
Merge branch 'dev' of https://github.com/openaps/oref0 into 201812_dev
PieterGit Feb 17, 2019
9defb3c
implement changes as requested by scott
PieterGit Feb 17, 2019
d7c8a27
upgrade yargs to avoid security vulnerability . did a quick check of …
PieterGit Feb 17, 2019
2eeae2e
pull https://github.com/openaps/oref0/pull/1203 into this branch and …
cclauss Feb 17, 2019
72eac54
Merge branch 'dev' into 201812_dev
PieterGit Feb 17, 2019
21204a4
some cleanup, consistent radio_locale string in pump.ini
PieterGit Feb 17, 2019
e658acc
Merge branch '201812_dev' of https://github.com/PieterGit/oref0 into …
PieterGit Feb 17, 2019
54a0f25
there is no need to install the released oref0 globally, because oref…
PieterGit Feb 17, 2019
e074d61
prevent spurious grep message if monitor/mmtune.json is empty
PieterGit Feb 17, 2019
eb4d387
Merge branch 'dev' of https://github.com/openaps/oref0 into 201812_dev
PieterGit Feb 20, 2019
3b731e3
1) cleanup ugly pump.ini stuff for edison. 2) mmeowlink is not only n…
PieterGit Feb 20, 2019
07eba20
add missing then
PieterGit Feb 20, 2019
641fbdd
Merge branch 'dev' into 201812_dev
PieterGit Mar 1, 2019
ea1d009
fix package.json typo and upgrade coveralls to 3.0.3
PieterGit Mar 1, 2019
8d4f608
Merge branch 'dev' into 201812_dev
PieterGit Mar 2, 2019
4f95a21
remove webpack from this branch
PieterGit Mar 5, 2019
3665309
upgrade share2nightscout bridge and yargs
PieterGit Mar 9, 2019
7a809c9
Merge branch 'dev' of https://github.com/openaps/oref0 into 201812_dev
PieterGit Mar 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
sudo: false
node_js:
- "8.11.1"
- 8
- 10
script: make travis
after_script: make report
46 changes: 8 additions & 38 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source $(dirname $0)/oref0-bash-common-functions.sh || (echo "ERROR: Failed to r

# TODO: deprecate g4-upload and g4-local-only
usage "$@" <<EOT
Usage: $self <--dir=directory> <--serial=pump_serial_#> [--tty=/dev/ttySOMETHING] [--max_iob=0] [--ns-host=https://mynightscout.herokuapp.com] [--api-secret=[myplaintextapisecret|token=subjectname-plaintexthashsecret] [--cgm=(G4-upload|G4-local-only|G4-go|G5|MDT|xdrip|xdrip-js)] [--bleserial=SM123456] [--blemac=FE:DC:BA:98:76:54] [--dexcom_tx_sn=12A34B] [--btmac=AB:CD:EF:01:23:45] [--enable='autotune'] [--radio_locale=(WW|US)] [--ww_ti_usb_reset=(yes|no)]
Usage: $self <--dir=directory> <--serial=pump_serial_#> [--tty=/dev/ttySOMETHING] [--max_iob=0] [--ns-host=https://mynightscout.herokuapp.com] [--api-secret=[myplaintextapisecret|token=subjectname-plaintexthashsecret] [--cgm=(G4-upload|G4-local-only|G4-go|G5|MDT|xdrip|xdrip-js)] [--bleserial=SM123456] [--blemac=FE:DC:BA:98:76:54] [--dexcom_tx_sn=12A34B] [--btmac=AB:CD:EF:01:23:45] [--enable='autotune'] [--radio_locale=(WW|US)]
EOT

# defaults
Expand Down Expand Up @@ -104,9 +104,6 @@ case $i in
-p=*|--btpeb=*)
BT_PEB="${i#*=}"
;;
--ww_ti_usb_reset=*) # use reset if pump device disappears with TI USB and WW-pump
ww_ti_usb_reset="${i#*=}"
;;
-pt=*|--pushover_token=*)
PUSHOVER_TOKEN="${i#*=}"
;;
Expand Down Expand Up @@ -376,7 +373,7 @@ if [[ -z "$DIR" || -z "$serial" ]]; then
fi
read -p "Would you like to [D]ownload released precompiled Go pump communication library or install an [U]nofficial (possibly untested) version.[D]/U " -r
if [[ $REPLY =~ ^[Uu]$ ]]; then
read -p "You could either build the Medtronic library from [S]ource, or type the version tag you would like to use, example 'v2018.08.08' [S]/<version> " -r
read -p "You could either build the Medtronic library from [S]ource, or type the version tag you would like to use, example 'v2018.12.05' [S]/<version> " -r
if [[ $REPLY =~ ^[Ss]$ ]]; then
buildgofromsource=true
echo "Building Go pump binaries from source"
Expand All @@ -395,7 +392,7 @@ if [[ -z "$DIR" || -z "$serial" ]]; then
ecc1medtronicversion="tags/$REPLY"
echo "Will use https://github.com/ecc1/medtronic/releases/$REPLY."

read -p "Also enter the ecc1/dexcom version, example 'v2018.07.26' <version> " -r
read -p "Also enter the ecc1/dexcom version, example 'v2018.12.05' <version> " -r
ecc1dexcomversion="tags/$REPLY"
echo "Will use https://github.com/ecc1/dexcom/$REPLY if Go-dexcom is needed."
fi
Expand All @@ -420,20 +417,6 @@ if [[ -z "$DIR" || -z "$serial" ]]; then
# Force uppercase, just in case the user entered ww
radio_locale=${radio_locale^^}

# check if user has a TI USB stick and a WorldWide pump and want's to reset the USB subsystem during mmtune if the TI USB fails
ww_ti_usb_reset="no" # assume you don't want it by default
if ! is_edison; then
if [[ $radio_locale =~ ^WW$ ]]; then
echo "If you have a TI USB stick and a WW pump and a Raspberry PI, you might want to reset the USB subsystem if it can't be found during a mmtune process. If so, enter Y. Otherwise just hit enter (default no):"
echo
if prompt_yn "Do you want to reset the USB system in case the TI USB stick can't be found during a mmtune proces?" N; then
ww_ti_usb_reset="yes"
else
ww_ti_usb_reset="no"
fi
fi
fi

if [[ -z "${radio_locale}" ]]; then
radio_locale='US'
fi
Expand Down Expand Up @@ -993,15 +976,6 @@ if prompt_yn "" N; then
fi
fi

# from 0.5.0 the subg-ww-radio-parameters script will be run from oref0_init_pump_comms.py
# this will be called when mmtune is use with a WW pump.
# See https://github.com/oskarpearson/mmeowlink/issues/51 or https://github.com/oskarpearson/mmeowlink/wiki/Non-USA-pump-settings for details
# use --ww_ti_usb_reset=yes if using a TI USB stick and a WW pump. This will reset the USB subsystem if the TI USB device is not found.
# TODO: remove this workaround once https://github.com/oskarpearson/mmeowlink/issues/60 has been fixed
if [[ ${ww_ti_usb_reset,,} =~ "yes" ]]; then
openaps alias remove mmtune
openaps alias add mmtune "! bash -c \"oref0_init_pump_comms.py --ww_ti_usb_reset=yes -v; find monitor/ -size +5c | grep -q mmtune && cp monitor/mmtune.json mmtune_old.json; echo {} > monitor/mmtune.json; echo -n \"mmtune: \" && openaps report invoke monitor/mmtune.json; grep -v setFreq monitor/mmtune.json | grep -A2 $(cat monitor/mmtune.json | jq -r .setFreq) | while read line; do echo -n \"$line \"; done\""
fi
echo Checking kernel for mraa installation
#if uname -r 2>&1 | egrep "^4.1[0-9]"; then # don't install mraa on 4.10+ kernels
# echo "Skipping mraa install for kernel 4.10+"
Expand Down Expand Up @@ -1034,6 +1008,11 @@ if prompt_yn "" N; then
# TODO: switch this back to master once https://github.com/openaps/openaps/pull/116 is merged/released
#echo Installing latest openaps dev && sudo pip install --default-timeout=1000 git+https://github.com/openaps/openaps.git@dev || die "Couldn't install openaps"
#fi

# create pump.ini
echo '[device "pump"]' > pump.ini
echo "serial = $serial" >> pump.ini
echo "radio_locale = $radio_locale" >> pump.ini

# we only need spi_serial and mraa for MDT CGM, which Go doesn't support yet
if [[ ${CGM,,} =~ "mdt" ]]; then
Expand All @@ -1051,8 +1030,6 @@ if prompt_yn "" N; then
else
# radio_locale requires openaps 0.2.0-dev or later
openaps device add pump mmeowlink subg_rfspy $ttyport $serial $radio_locale || die "Can't add pump"
#openaps alias add wait-for-silence '! bash -c "(mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 1 | grep -q comms && echo -n Radio ok, || openaps mmtune) && echo -n \" Listening: \"; for i in $(seq 1 100); do echo -n .; mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 30 2>/dev/null | egrep -v subg | egrep No && break; done"'
#openaps alias add wait-for-long-silence '! bash -c "echo -n \"Listening: \"; for i in $(seq 1 200); do echo -n .; mmeowlink-any-pump-comms.py --port '$ttyport' --wait-for 45 2>/dev/null | egrep -v subg | egrep No && break; done"'
if [[ ${radio_locale,,} =~ "ww" ]]; then
if [ -d "$HOME/src/subg_rfspy/" ]; then
echo "$HOME/src/subg_rfspy/ already exists; pulling latest"
Expand All @@ -1067,10 +1044,6 @@ if prompt_yn "" N; then
# It will remove empty line at the end of pump.ini and then append radio_locale if it's not there yet
grep -q radio_locale pump.ini || echo "$(< pump.ini)" > pump.ini ; echo "radio_locale=$radio_locale" >> pump.ini
fi
else
echo '[device "pump"]' > pump.ini
echo "serial = $serial" >> pump.ini
echo "radio_locale = $radio_locale" >> pump.ini
fi

# Medtronic CGM
Expand Down Expand Up @@ -1278,9 +1251,6 @@ if prompt_yn "" N; then
#Necessary to "bootstrap" Go commands...
if [[ ${radio_locale,,} =~ "ww" ]]; then
echo 868.4 > $directory/monitor/medtronic_frequency.ini
#Store radio_locale for later use
# It will remove empty line at the end of pump.ini and then append radio_locale if it's not there yet
grep -q radio_locale pump.ini || echo "$(< pump.ini)" > pump.ini ; echo "radio_locale=$radio_locale" >> pump.ini
else
echo 916.55 > $directory/monitor/medtronic_frequency.ini
fi
Expand Down
75 changes: 0 additions & 75 deletions bin/oref0-subg-ww-radio-parameters.sh

This file was deleted.

70 changes: 0 additions & 70 deletions bin/oref0_init_pump_comms.py

This file was deleted.

123 changes: 0 additions & 123 deletions bin/oref0_subg_ww_radio_parameters.py

This file was deleted.

Loading