These are chat archives for nightscout/intend-to-bolus

20th
Sep 2016
Dana Lewis
@danamlewis
Sep 20 2016 00:01
@garykidd :confetti_ball: for you! (for filling out the form
we’re looking into an integration with openhumans as a way to donate data for research for purposes like that
ben wrote some scripts to take data from NS to put there, but we need to do some more work to explain how to use them, I think, and then make sure we’ll be able to export (as researchers) from OH the way we would need to
David Young
@wgs4
Sep 20 2016 00:03
so… don’t you hate when you discover you forgot to write down the root password of your raspberry pi… and its 3+ months later. :grimacing:
garykidd
@garykidd
Sep 20 2016 00:03
@danamlewis I am happy to share/contribute.
Dana Lewis
@danamlewis
Sep 20 2016 00:03
but that’s one of the reasons, too, we suggest downloading/tracking your data before starting to close the loop
so it’s easier to do before/after :)
awesome thanks @garykidd
garykidd
@garykidd
Sep 20 2016 00:05
@danamlewis Thank you. @scottleibrand @bewest @jasoncalabrese @elnjensen @ecc1 @diabeticgonewild @eluhrs Thank you all as well. And @everyone-else-that-has-helped me. Thank You.
Dana Lewis
@danamlewis
Sep 20 2016 00:05
:+1: :sparkles:
Scott Leibrand
@scottleibrand
Sep 20 2016 00:06
@wgs4 if you know the pi user password and have sudo, you can just change the root password
Dana Lewis
@danamlewis
Sep 20 2016 00:06
@wgs4 re: earlier comment, email just went out w/ more context on setup script to try
Scott Leibrand
@scottleibrand
Sep 20 2016 00:06
@wgs4 something like sudo passwd root
garykidd
@garykidd
Sep 20 2016 00:06
@danamlewis might even want to add a pre openaps A1c to the form...but I'm sure you thought about it and left it out for a reason.
Dana Lewis
@danamlewis
Sep 20 2016 00:07
@garykidd I don’t want to collect too much health info in that form. we did collect some of that type of info when we did our first self-reported outcomes study (way back when we only had 40 people in the community!)
David Young
@wgs4
Sep 20 2016 00:07
wouln’t I need to be logged in to be able to change root password? I’m tryin got ssh into the system which was been powered off for a while.
Dana Lewis
@danamlewis
Sep 20 2016 00:07
so if you look at the study blog, you’ll get a feel for the type of stuff we will likely collect again in the future when we do others
David Young
@wgs4
Sep 20 2016 00:07
I think I’ll just have to do a fresh install..
sorry, i only recall setting up root.
no biggie
Scott Leibrand
@scottleibrand
Sep 20 2016 00:16
@wgs4 default login is pi password raspberry
umich10
@umich10
Sep 20 2016 00:35
We are having difficulty setting up TI stick. Have Adafruit GoodFET v42. Looking for the pinout. Or if it's a no-go, someone local to SEA who has the debugger...
Tim Mecklem
@tmecklem
Sep 20 2016 00:41
I don't have much help to offer, but I'm pretty interested in your experience if you get the goodfet working.
diabeticgonewild
@diabeticgonewild
Sep 20 2016 01:00
I would recommend TI Debugger....
diabeticgonewild
@diabeticgonewild
Sep 20 2016 01:10
It's not that expensive, relative to the upkeep (needing 2-3 working setups...) of OpenAPS.
diabeticgonewild
@diabeticgonewild
Sep 20 2016 01:28
I seriously can't wait until the t:slim x2 comes out. It will cost $800 for me, which will suck. But still will be nice to have, as my t:slim pump will NOT be out of date...
umich10
@umich10
Sep 20 2016 01:34
Thanks for the input, @diabeticgonewild
diabeticgonewild
@diabeticgonewild
Sep 20 2016 01:39
You're welcome.
Eric
@ecc1
Sep 20 2016 01:58
@umich10 Pinout is here: www.ti.com/lit/pdf/swru082
garykidd
@garykidd
Sep 20 2016 02:00
Do I have to comment out one of ........./home/pi/bin/check-and-connect-bt-pan.sh or sudo wpa_cli scan
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

* * * * * /home/pi/bin/check-and-connect-bt-pan.sh

* * * * * sudo wpa_cli scan

*/5 * * * * (cd /home/pi/APS301 && time openaps do-everything) 2>&1 | logger -t openaps-loop
Eric Jensen
@elnjensen
Sep 20 2016 02:02
Working on re-flashing my Edison to jubilinux. Followed directions, all seemed to go fine, got to the point where it said to wait two minutes for it to reboot. Saw it reboot, then return to a 'rescue mode' prompt. Wasn't sure whether to keep waiting, and it rebooted again. Now I'm looking at this:
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill1.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill2.
[  OK  ] Started LSB: Raise network interfaces..
[  OK  ] Reached target Network.
[  OK  ] Reached target System Initialization.
         Starting Rescue Shell...
[  OK  ] Started Rescue Shell.
[  OK  ] Reached target Rescue Mode.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.
Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.
Type "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.
Give root password for maintenance
(or type Control-D to continue): 

******************************
PSH KERNEL VERSION: b0182929
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 10:14:01 Jan 13 2015

******* PSH loader *******
PCM page cache size = 192 KB 
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application ***
What should I do here? OK to unplug it? The flash process from the other window seems to have completed.
Eric
@ecc1
Sep 20 2016 02:03
Pretty sure the reboot is caused by the watchdog timer going off. The interface to it varies depending on kernel version, but I have this in my /etc/rc.local:
echo V > /dev/watchdog
echo 1 >/sys/devices/virtual/misc/watchdog/disable
You can enter those by hand when you first get a shell prompt if you're quick enough.
Eric Jensen
@elnjensen
Sep 20 2016 02:04
OK - but where am I with the flashing? Seems like it completed successfully? Now it's sitting at that Ready to receive application prompt and not doing anything.
Unsure as to whether unplugging at this point would cause problems. I don't have a command prompt at this point.
Eric
@ecc1
Sep 20 2016 02:05
Oh, sorry; thought it was looping. Might as well reboot it and see at this point.
Scott Leibrand
@scottleibrand
Sep 20 2016 02:06
Did you check the bottom of the troubleshooting section about that?
garykidd
@garykidd
Sep 20 2016 02:09
so I got wifi and BT to work..not sure what I did...but it only seems to connect upon reboot....is there somethign I can add or amend in my crontab pasted above?
Eric Jensen
@elnjensen
Sep 20 2016 02:09
Thanks, @scottleibrand - I seem to have a variant of the scenarios listed there. Didn't respond to the rescue mode prompt (and don't have it now), and don't have something that goes as far as the Ready to receive application scenario there either - that implies that you get a prompt back, which I don't have.
Guess I should have read through the troubleshooting before I started the other steps, so I would have responded to those prompts before they went away... :worried:
At this point it seems like just trying to reboot (with the reset button maybe?) is the only option.
Eric Jensen
@elnjensen
Sep 20 2016 02:17
OK, got it to reboot with the reset button, and then was quick enough (the second time) to catch it at the "hit any key" prompt.
Now trying to work out what to do here. It already had multi-user set for bootargs_target.
Eric
@ecc1
Sep 20 2016 02:21
You can set it to "rescue" (no quotes) if you want the single-user shell first.
Welcome to systemd :-)
Eric Jensen
@elnjensen
Sep 20 2016 02:23
OK! Had to reboot a few more times, but now have a regular login prompt. Thanks for your help!
garykidd
@garykidd
Sep 20 2016 02:34
Gents, is something wrong with my crontab above relating to BT/ wifi? if I run bt-pan client XX:XX:XX:XX:XX:XX from prompt I'll connect but it wont work---well maybe only upon reboot---- from crontab (every minute)? THoughts?
hmmmmmm...is this right if I...
pi@raspberrypi:~/APS301 $ check-and-connect-bt-pan.sh XX:XX:XX:XX:XX:XX
Connecting to YY:YY:YY:YY:YY
are those addresses supposed to match...the XX and the YY's?
Scott Leibrand
@scottleibrand
Sep 20 2016 03:15
@garykidd you might be in uncharted territory here
garykidd
@garykidd
Sep 20 2016 03:18
@scottleibrand par for course...no?
I take it those are supposed to match then Scott?
diabeticgonewild
@diabeticgonewild
Sep 20 2016 03:32
garykidd
@garykidd
Sep 20 2016 03:33
still working of of Rpi3 right now
yeah...maybe thing will just work fine once I switch to edison....doubt it.
Scott Leibrand
@scottleibrand
Sep 20 2016 03:34
yeah, Monica has played with BT tethering more than I have. I do know that those XX's and YY's are MAC addresses, which are the main BT identifier, and will need to match. there may be a local device and a remote, though.
garykidd
@garykidd
Sep 20 2016 03:35
@ monica from my post at 2234 do your MAC addresses match if you call that command
diabeticgonewild
@diabeticgonewild
Sep 20 2016 03:36
Is bluetooth.service enabled?
garykidd
@garykidd
Sep 20 2016 03:37
I ending up just adding bt-pan client [MAC ADDRESS] I guess it reconnects every minute...but it still works this far
do I need to enable it within cron as well?
my current cron is like this....
diabeticgonewild
@diabeticgonewild
Sep 20 2016 03:38
garykidd
@garykidd
Sep 20 2016 03:38
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
* * * * * /home/pi/bin/bt-pan client XX:XX:XX:XX:XX:XX
#* * * * * /home/pi/bin/check-and-connect-bt-pan.sh 
* * * * * sudo wpa_cli scan
*/5 * * * * (cd /home/pi/APS301 && time openaps do-everything) 2>&1 | logger -t openaps-loop
###################################################################################################################################################################################
diabeticgonewild
@diabeticgonewild
Sep 20 2016 03:43
If the bluetooth ONLY works after reboot, that means the Bluetooth Daemon is NOT starting...that's according to the thread I posted...

Perhaps....

sudo /etc/init.d/bluetooth start

Then...like in "startup programs..."...

/etc/init.d/bluetooth start

See: https://ubuntuforums.org/showthread.php?t=1174624

Try the first command without restarting. If THAT works, your problem is likely that...
jmcrawford
@jmcrawford
Sep 20 2016 03:46
You can likely do a "/etc/init.d/bluetooth status" to check if the process is running
Scott Leibrand
@scottleibrand
Sep 20 2016 04:12
if anyone has been waiting on Medtronic CGM (Enlite) support to run oref0-setup.sh, it is now ready for testing: openaps/oref0#219
Heiner1
@Heiner1
Sep 20 2016 06:25
I have a basal rate range from 0.25 to 0.45/h. does anybody know if it's possible
Scott Leibrand
@scottleibrand
Sep 20 2016 06:25
What do you mean "if it's possible"?
Heiner1
@Heiner1
Sep 20 2016 06:25
To use openaps
Scott Leibrand
@scottleibrand
Sep 20 2016 06:26
Yes, there are people using it with babies on basals of ~0.10 U/hr
Heiner1
@Heiner1
Sep 20 2016 06:26
Sorry I'm on mobile, difficult to write.
Scott Leibrand
@scottleibrand
Sep 20 2016 06:27
Are you still honeymooning?
One challenge might be if you're still producing insulin, you might end up continuing to go low even if OpenAPS completely turns off insulin delivery.
Heiner1
@Heiner1
Sep 20 2016 06:29
Thank you Scott, a bit later on the laptop. I'm very interested on this theme.
Matthias
@ceben80
Sep 20 2016 11:26
@scottleibrand the setup script works absolut fantastic :star2: ....awesome, took a new sd card running from scratch.
All ns treatments seems to up date when the loop is running, but I didn't see any temp basal to be updated, any idea :question:
Matthias
@ceben80
Sep 20 2016 11:31
blob
pi@pi3-aps-ti:~/myopenaps/enact $ cat enacted.json
{
  "bg": 194,
  "temp": "absolute",
  "snoozeBG": 175,
  "recieved": true,
  "predBGs": {
    "IOB": [
      194,
      191,
      188,
      186,
      184,
      182,
      180,
      179,
      178,
      176,
      175,
      175,
      174,
      173,
      171,
      169,
      167,
      165,
      163,
      160,
      157,
      155,
      153,
      150,
      148,
      146,
      144,
      142,
      140,
      139,
      137,
      136,
      135,
      134,
      133,
      133,
      132,
      132,
      131
    ]
  },
  "rate": 0.675,
  "reason": "COB: undefined, Dev: -35, BGI: 2.29, ISF: 35, Target: 95; Eventual BG 175 > 90 but Min. Delta -3.50 < Exp. Delta -2.2; setting current basal of 0.7 as temp. Setting neutral temp basal of 0.7U/hr",
  "eventualBG": 175,
  "timestamp": "2016-09-20T13:19:26.315473",
  "duration": 30,
  "tick": "+0",
  "IOB": -0.452
@scottleibrand I'm really impressed regarding the setup script, great job!!!
Tim Street
@tim2000s
Sep 20 2016 12:36
I have a blank SD card and a planned new I still of openAPS. New setup script on the DEV line?
Sandra Keßler
@SandraK82
Sep 20 2016 12:51
just tried the setting up Manual on got error on step 0:

running install_lib

creating /usr/local/lib/python2.7/dist-packages/openaps

error: could not create '/usr/local/lib/python2.7/dist-packages/openaps': Permission denied


Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-tSpXZg/openaps/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-YcLOIg-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-tSpXZg/openaps
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 295, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
requirement.install(install_options, global_options, args, *kwargs)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 707, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 716, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-tSpXZg/openaps/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-YcLOIg-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-tSpXZg/openaps

Matthias
@ceben80
Sep 20 2016 14:32
@scottleibrand running openaps uploadworks fine :+1:
blob
....will investigate into the logs
Matthias
@ceben80
Sep 20 2016 15:02
unfortunately running openaps uploadper cron will not update BASAL in ns.....
starting manualy openaps upload changes BASAL correct...hmm
Christer Jensen
@christerjensen
Sep 20 2016 15:05
@ceben80 Does your cron start with NIGHTSCOUT_HOST=https://yourstie.azurewebsites.net API_SECRET=YOURAPISECRET
Matthias
@ceben80
Sep 20 2016 15:06
yes
no problem with the openaps threatments like IOB, battery, reservoir etc. etc.
is there a "flag" in preferences.json suppressing BASAL update?
blob
all fine, but no update in BASAL
Scott Leibrand
@scottleibrand
Sep 20 2016 15:39
@SandraK82 probably just need a sudo in front of the pip lines. Want to PR that in? If you're already offline for the evening I'll do it later today.
@ceben80 did the blue line update? If not, you're probably just seeing the delay that comes from the fact that we have to do a pumphistory pull after setting a temp before it can be uploaded to treatments, but the devicestatus and openaps pill can be updated on enact.
Give it a couple minutes to do a pumphistory pull and another upload, and it should update automatically.
Matthias
@ceben80
Sep 20 2016 15:43
yes looks good to me
blob
but mayby has been update as I run openaps updatemanualy....
Matthias
@ceben80
Sep 20 2016 15:48
next example...my pump now has a TBR of 1.1 but see this sceenshot
blob
Sandra Keßler
@SandraK82
Sep 20 2016 15:50
@scottleibrand i will look into it
Matthias
@ceben80
Sep 20 2016 15:50
again after running it manualy
blob
Sandra Keßler
@SandraK82
Sep 20 2016 15:51
can not test it fully for now, just done local ns install and waiting for my ti usb
Matthias
@ceben80
Sep 20 2016 15:51
pi@pi3-aps-ti:~/myopenaps $ openaps upload
Uploaded
pi@pi3-aps-ti:~/myopenaps $
and hey...this fuxxing BG (sorry) :smile:
Scott Leibrand
@scottleibrand
Sep 20 2016 15:54
@ceben80 the aliases hide their debug output. You'll need to run the underlying reports to see everything going on.
Matthias
@ceben80
Sep 20 2016 15:54
it's ns-loop
or what you mean Scott?
Scott Leibrand
@scottleibrand
Sep 20 2016 15:55
do an openaps alias show upload or whatever and then run the components one by one without the 2>/dev/null etc.
Matthias
@ceben80
Sep 20 2016 16:02
ok the last openaps upload-recent-treatments sends the TBR to ns, but running it as standalone alias, running this in context of openaps upload won't work
Scott Leibrand
@scottleibrand
Sep 20 2016 16:11
Why is that?
Matthias
@ceben80
Sep 20 2016 16:12
don't know, but will run this loop overnight, the rig is looping and will send you a ns screenshot tomorrow :wink:
maybe I'm too impatient with this new environment, only want to test your setup routine, and this works great :clap:
thanks for today @scottleibrand
Scott Leibrand
@scottleibrand
Sep 20 2016 16:19
Heh k. Thx. :-)
Matthias
@ceben80
Sep 20 2016 16:59
@scottleibrand OMG....when copying my API secret to the cron job a completely different API was written, don't ask me why :angry: Damn :cry:
I am ashamed, apologize for this stupid posting here and again, great awesome setup script :star2:
Scott Leibrand
@scottleibrand
Sep 20 2016 17:00
Did you use the hashed secret in the script? It needs plain.
Not sure how to make that clearer, or check for it.
Matthias
@ceben80
Sep 20 2016 17:02
yes :cry: don't know what I copied....fuxx :smile:
now it's working
The idiot is sitting in front of the keyboard (me) :smile:
David Young
@wgs4
Sep 20 2016 17:03
@scottleibrand thanks for the default login info for the raspberry pi yesterday. I came in this morning and was able to access my install because I thankfully setup a private ssh key.
Matthias
@ceben80
Sep 20 2016 17:03
have a nice day Scott
blob
David
@davidkeddydb
Sep 20 2016 17:11
If I I have been backing up my openaps on bitbucket, can I take that and burn it to another SD card to have a back up I can use in the PI if something goes wrong?
Scott Leibrand
@scottleibrand
Sep 20 2016 17:26
Or you could do a full image of the SD card. Maybe easier than building a new setup and restoring from bitbucket. Or you could try oref0-setup, which can get you back up and running much faster than a full manual setup.
David
@davidkeddydb
Sep 20 2016 17:34
@scottleibrand Thanks. Excited to get started. Scared to death my SD card crashes and I have to start over. I am still working out what I have to enact vs what is captured in the Oref0 alias and then I should be ready to roll.
Tim Street
@tim2000s
Sep 20 2016 18:02
@davidkeddydb I've just stuck mine in github without appropriate keys. Seems like a safe bet.
David
@davidkeddydb
Sep 20 2016 18:06
@tim2000s I may very well do that in the future. I wasn't that comfortable at first working in git yet to try the whole gitignore file but I feel a little more confident now to give it a shot.
Brett
@burgertime14
Sep 20 2016 18:20
@scottleibrand oref0-setup is awesome, went from bare bones to fully functional in 5 minutes. Thanks for that, spent most of my evening last night working on creating a new loop and didn't get half done. No issues.
Scott Leibrand
@scottleibrand
Sep 20 2016 18:23
sweet, thx. please let us know if you find any gaps with the resulting loop (and please share what commands you ran if you manage to fix them)
Brett
@burgertime14
Sep 20 2016 18:23
:thumbsup:
Dana Lewis
@danamlewis
Sep 20 2016 18:23
Awesome @burgertime14!
cassknox
@cassknox
Sep 20 2016 18:29
Has anyone had an issue getting the openaps plugin to show up in nightscout? I'm not sure what I'm doing wrong, I added in the settings ENABLE openaps and it seems like all the other plugins show up except that one. I've also tried the pump plugin and that doesn't show either. Through my fumbling around on the azure settings, I had the treatments option in the right corner and now that is gone somehow too and I can't seem to get that back either... HELP!
R. Dennis Steed
@rdsteed
Sep 20 2016 18:30
Has anyone run openaps in the windows 10 bash shell?
Scott Leibrand
@scottleibrand
Sep 20 2016 18:31
I can't imagine why you'd want to, but if anyone has it's @amazaheri
R. Dennis Steed
@rdsteed
Sep 20 2016 18:37
I think it would be a simple path for people who want to start with overnight APS. A bedside laptop could talk to the pump, a G4 via wixel or Dexcom Share, and Nightscout while providing an very nice big screen and robust audio services. Seems like a nice way to ease into a do it yourself pancreas.
Scott Leibrand
@scottleibrand
Sep 20 2016 18:38
people who've tried that with a Mac keep getting frustrated by incompatibilities, so I suspect a Pi is still easier
but if you could iron all those out it might work
R. Dennis Steed
@rdsteed
Sep 20 2016 18:41
Not sure what happened to the Mac folks, but the Mac is a BSD flavored Unix whereas the Windows 10 bash shell is supposed to be ubuntu linux which would seem much closer to what is running on RPi or Edison.
Scott Leibrand
@scottleibrand
Sep 20 2016 18:42
worth a try. you have a Carelink or TI stick to test it out with?
R. Dennis Steed
@rdsteed
Sep 20 2016 18:42
I have some old carelink sticks and a 511 pump sitting around, but I haven't tried anything yet.
Sandra Keßler
@SandraK82
Sep 20 2016 18:50
@scottleibrand running on mac is simple if you know what are you doing
cassknox
@cassknox
Sep 20 2016 18:59
@danamlewis Has anyone had an issue getting the openaps plugin to show up in nightscout? I'm not sure what I'm doing wrong, I added in the azure settings ENABLE openaps and it seems like all the other plugins show up except that one. I've also tried the pump plugin and that doesn't show either. Through my fumbling around on the azure settings, I had the treatments option in the right corner and now that is gone somehow too and I can't seem to get that back either... Any idea what I'm doing wrong?
R. Dennis Steed
@rdsteed
Sep 20 2016 19:03
@SandraK82 @scottleibrand I guess the question is how hard is it if you don't know what you're doing ;-) Seriously, I've run node and python on windows. I've got a wixel listening to a G4 transmitter and sending info to a windows com port. Carelink Pro runs fine on my windows machine, so I know it can talk to the Carelink stick. I was thinking of trying some windows bat scripts, but was wondering if the new Bash shell in windows 10 would be worth checking out.
David
@davidkeddydb
Sep 20 2016 19:05
@rdsteed It is wicked hard if you don't know what you are doing :)
Ali Mazaheri
@amazaheri
Sep 20 2016 19:50
Hi @rdsteed as @scottleibrand said, @bewest and I did port the OpenAPS toolkit and early version of openaps-js and oref0 to Windows and I did run a successful loop on Win10, Surface and Intel Compute Stick. I believe @bewest
runs his loop on MAC too
R. Dennis Steed
@rdsteed
Sep 20 2016 19:53
@amazaheri Hi @amazaheri . Thanks for the info. Did you use the Win10 bash or translate to another scripting language (eg batch or powershell)?
Tim Street
@tim2000s
Sep 20 2016 20:16
Evening all. Trying to read into oref0 from a locally created file, with the following format for glucose values. Does the oref0 require a specific file format? This is what I'm starting from: {"value":"89","sgv":89,"type":"sgv","dateString":"2016-09-20T21:11:32+0100","date":1474402292000}
Scott Leibrand
@scottleibrand
Sep 20 2016 20:21
that looks reasonable, although it might also expect a "glucose" key, I can't recall
Sandra Keßler
@SandraK82
Sep 20 2016 20:22
@scottleibrand veriefied that my problem was with pip
Scott Leibrand
@scottleibrand
Sep 20 2016 20:22
"value" is not one we use, so you could just change that to "glucose"
@SandraK82 :+1: Someone else ran into it as well, so I pushed a fix already
Tim Street
@tim2000s
Sep 20 2016 20:23
What I get from monitor/glucose.json when I pull entries from NS is the following:
"dateString": "2016-09-20T20:46:31+0100",
    "value": "93",
    "sgv": 93,
    "date": 1474400791000,
    "_id": "57e193167821121d674d55f7",
    "type": "sgv"
Sandra Keßler
@SandraK82
Sep 20 2016 20:23
ah nice, was about to make pr
Tim Street
@tim2000s
Sep 20 2016 20:23
My question I guess is if the order is different, does it matter, and if the _id is missing, again, does it matter?
Scott Leibrand
@scottleibrand
Sep 20 2016 20:24
order and _id don't matter, just the presence, names, and formats of the glucose, date, and dateString fields I think.
give it a shot and see if it complains. :)
Tim Street
@tim2000s
Sep 20 2016 20:25
Right, but I don't have a glucose field in my monitor/glucose.json, that's why it's a little confusing!
Scott Leibrand
@scottleibrand
Sep 20 2016 20:29
I'm not 100% sure it's needed
give it a shot as is, and see if it complains
Tim Street
@tim2000s
Sep 20 2016 20:30
I'll add an "_id" to it as well and see what happens
Scott Leibrand
@scottleibrand
Sep 20 2016 20:38
I'm quite sure that the _id thing is just a mongodb internal identifier, and is not needed by oref0. not so sure about the exact names expected for the glucose/sgv and date/dateString fields.
Tim Street
@tim2000s
Sep 20 2016 20:39
Just done a big check out and realised I am missing a few things in the overall file format. Think it should be easy to fix.
Brandon Faloona
@bfaloona
Sep 20 2016 20:59
@danamlewis @scottleibrand Any updates on when the new explorer edison board can be purchased? We are eager to build a rig from one! :sparkles:
Scott Leibrand
@scottleibrand
Sep 20 2016 21:16
@bfaloona no news yet. hoping for sometime next month, but still lots of moving pieces.
Jason Calabrese
@jasoncalabrese
Sep 20 2016 21:23
:+1: @SandraK82
Dana Lewis
@danamlewis
Sep 20 2016 21:33
re: explorer board - this is the current source of truth on the update: https://diyps.org/2016/09/15/openaps-rigs-are-shrinking-in-size/
@cassknox re: trouble having the openaps plugin show up, what version of NS are you using?
Brandon Faloona
@bfaloona
Sep 20 2016 22:06
@danamlewis @scottleibrand Ok, thanks!
Tim Street
@tim2000s
Sep 20 2016 22:08
Awesome @scottleibrand - I'm now closed looping with no need to go out to nightscout to feed the data into the loop. All on the pi with the 640Uploader mod and a spot of bash!
Dana Lewis
@danamlewis
Sep 20 2016 22:09
@tim2000s :confetti_ball:
“a spot of bash will do it!” ;)
Tim Street
@tim2000s
Sep 20 2016 22:09
A bit of bash and a spot of sed ;)
C-Ville
@C-Ville
Sep 20 2016 22:14
@danamlewis I am so looking forward to the explorer Board
Matthias
@ceben80
Sep 20 2016 22:22
@danamlewis me too :wink:
Tim Street
@tim2000s
Sep 20 2016 22:24
Now onto trying to get OpenAPS to upload to NS. My monitor/glucose.json looks like this:
[
{"value":"157","sgv":157,"type":"sgv","dateString":"2016-09-20T23:16:32+0100","date":1474409792000},
{"value":"158","sgv":158,"type":"sgv","dateString":"2016-09-20T23:11:32+0100","date":1474409492000},
{"value":"158","sgv":158,"type":"sgv","dateString":"2016-09-20T23:06:32+0100","date":1474409192000},
{"value":"164","sgv":164,"type":"sgv","dateString":"2016-09-20T23:01:32+0100","date":1474408892000},
{"value":"161","sgv":161,"type":"sgv","dateString":"2016-09-20T22:56:32+0100","date":1474408592000},
{"value":"130","sgv":130,"type":"sgv","dateString":"2016-09-20T22:21:32+0100","date":1474406492000},
{"value":"123","sgv":123,"type":"sgv","dateString":"2016-09-20T22:16:32+0100","date":1474406192000},
{"value":"121","sgv":121,"type":"sgv","dateString":"2016-09-20T22:11:32+0100","date":1474405892000},
{"value":"119","sgv":119,"type":"sgv","dateString":"2016-09-20T22:06:32+0100","date":1474405592000},
{"value":"121","sgv":121,"type":"sgv","dateString":"2016-09-20T22:01:32+0100","date":1474405292000},
{"value":"115","sgv":115,"type":"sgv","dateString":"2016-09-20T21:56:32+0100","date":1474404992000}
]
But when I run: openaps use ns shell format-recent-type tz entries monitor/glucose.json | json -a dateString | wc -l I'm getting this error:
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps_contrib-0.0.15-py2.7.egg/openapscontrib/timezones/__init__.py", line 296, in main
    data = json.load(argparse.FileType('r')(stream))
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 2 column 2 (char 3)
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 58, in run
    reporter(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 33, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 31, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 56, in prerender_json
    return json.loads(data)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
json: error: input is not JSON: Unexpected 'N' at line 1, column 1:
        No JSON object could be decoded
I think someone else had similar last week.
Tim Street
@tim2000s
Sep 20 2016 22:49
Got it - it's the recent-missing-treatments piece. As I don't need that I can ignore it and the NS scripts work.
Tim Street
@tim2000s
Sep 20 2016 22:56
So here's a slightly different question. Due to my 640/Enlite/CNL link not always communicating, I need to check that the file I'm creating with the latest glucose values in it is different from the earlier file, and that's based on the time stamp in the file. I'm not quite sure of the best way in bash to do it. Basically I have latest_sg.json and latest_sg_prev.json that both look like this and I need to compare the datestring for an if statement:
{"value":"157","sgv":157,"type":"sgv","dateString":"2016-09-20T23:51:32+0100","date":1474411892000}
Tim Street
@tim2000s
Sep 20 2016 23:31
blob
Phew. Got there!
R. Dennis Steed
@rdsteed
Sep 20 2016 23:52
Of possible interest to those building a rig, just received an email from Pebble announcing a sale. Classic $69.95 and Time $99.99.