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

5th
Sep 2016
Eric Jensen
@elnjensen
Sep 05 2016 00:00
Then openaps report invoke glucose.json
cococay
@cococay
Sep 05 2016 00:01
i'll try that - that makes sense.. thx
garykidd
@garykidd
Sep 05 2016 00:01
@diabeticgonewild do you need mmeowlink if I am using either G5 dex sensor or NS for BG? THe way the docs read--you don't.
Eric Jensen
@elnjensen
Sep 05 2016 00:01
Oops, should be 'count=15' at the end of that, not just 15
@garykidd mmeowlink is for talking to various radio devices that talk to the pump.
You don't need it if you're using Carelink stick via USB.
But if you're using something like TI stick, you do need it.
garykidd
@garykidd
Sep 05 2016 00:04
@elnjensen copy that. Ido plan to add but cant seem to get my first rig looping. not sure what the issue is. It appears I am missing a number of vendors, like medtronic and dexcom but the associated devices have been added and work fine...hmmm
cococay
@cococay
Sep 05 2016 00:13

@elnjensen
Thank you, I'm pretty sure that is working .. of course he was JUST in ??? so the bg I see in the suggested report is 10... lol, but that makes sense.

I did correct the 'count ' and added them to them into monitor directory. Thanks!

Eric Jensen
@elnjensen
Sep 05 2016 00:14
@cococay You're welcome! As I said, I'm not 100% sure that that report is quite in the right format for the other commands, but hopefully it gets you closer. Let me know if you get sensible results once you've been back out of ??? for a while. I'm hoping to head to this method myself for an Edison rig I'm building, so I'll need to figure it out, too.
cococay
@cococay
Sep 05 2016 00:18

@elnjensen

Looks right:

here's the current glucose line in the suggested.json {"delta":-12,"glucose":65,"avgdelta":-12}

except maybe the avgdelta, but I'm assuming that's because it' not pulling regular reports?

I am still building reports at right now, but have most of them built except the few that needed glucose.json to complete

diabeticgonewild
@diabeticgonewild
Sep 05 2016 00:28
@garykidd You need mmeowlink:

Welcome to MMeowlink

MMeowlink lets OpenAPS connect to Medtronic pumps without using the CareLink stick.

Eric Jensen
@elnjensen
Sep 05 2016 00:29
Cool, that looks good. avgdelta is averaging over some past number of BG values, but you may not have enough yet for it to be accurate.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 00:32

@garykidd This whole setup is an intricate process, but it can be done a lot more simply than you think. It just takes practice and paying attention, no offense.

I have ADHD myself and I crosscheck everything I do and enter in Terminal/PuTTY. I check for ANY sort of error while a process is being entered (and is processing) and I double check and verify my work/"what I enter" to make sure that it's right and it makes logical sense.

Despite have ADHD, I'm good at catching errors and seeing mistakes that other people miss. It requires diligence and persistence.

Eric Jensen
@elnjensen
Sep 05 2016 00:37
OK, I've confirmed that my treatment data are making it to NS, which is great! However, it is convinced that they are in GMT, when in fact they are in EDT. So everything is showing up four hours earlier than it should on my NS timeline.

So clearly it's an issue of how I zone/format the data before uploading. Can anyone help with how this should be done? I'm currently running a report to try to rezone the pump history:

[report "monitor/pumphistory-zoned.json"]
use = rezone
reporter = JSON
astimezone = False
date = ['timestamp', 'dateString', 'start_at', 'end_at', 'created_at']
adjust = missing
input = monitor/pumphistory.json
device = tz
timezone =

from openaps.ini. But that doesn't change any of the dates. Should there be a timezone entry in there? Or in tz.ini?

diabeticgonewild
@diabeticgonewild
Sep 05 2016 00:44
@elnjensen Go here and follow these instructions, and I think you should be set: https://github.com/TC2013/aps-scripts/blob/master/fix_date.readme
It's a workaround for getting the time in your timezone, as the Edison doesn't have an RTC.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 00:51

@cococay Please see this....in particular starting at "get records from Nightscout":

openaps/docs#129

Actually, on the link above, ctrl/command + f:

"report nightscout/recent-treatments.json"

And you should be set!!!!

Eric Jensen
@elnjensen
Sep 05 2016 00:54
Thanks @diabeticgonewild - but the time on my computer is fine (set by NTP at startup from network). And the datestamps in my pumphistory.json files are fine, too. The issue is that when I upload them to Nightscout, it assumes that the dates (which are in my local timezone, EDT) are actually in GMT, which is four hours different.
So I'm trying to figure out how to rezone the data so that NS will interpret them correctly.
cococay
@cococay
Sep 05 2016 00:55

@diabeticgonewild
TY. I had done that - What Eric suggested helped and got me past the current hurdle - I now have a working glucose.json report using NS data.

But, I see there is more about uploading into NS there and will read through that as well, as I'm sure i will be working on that direction soon too. ( I have updated to the current Dev. branch)

diabeticgonewild
@diabeticgonewild
Sep 05 2016 00:56
@elnjensen is your locale on your Edison set?
garykidd
@garykidd
Sep 05 2016 00:56
@diabeticgonewild thanks. I have often encountered errors through the process. So I'll almost always ask about them. Sometimes you get feedback...sometimes you don't...sometimes the feedback you get is just a guess..sometimes it's correct but obscure. I can start over from sctratch again..I'm sure I'm going to get same errors...what will make the difference is the feedback I get here. I'm not really venting here--just sharing. I appreciate everyone
here for all there hard work and support.
I'm actually kind of lost at this point. The dev version of rtd don't work for me. I've tried the "new walkthrough style" and that helped me the most but there seem to be huge areas that need to developed.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:00
@garykidd I'm not saying start over from scratch. If something doesn't work right the first time, then there is an issue. Not all solutions to problems are straightforward. The quick and dirty way of solving problems is to "Google" and use "brute force" (AKA trial and error) . Don't expect an easy solution

@elnjensen Make sure the time on your Edison is correct and sync Dexcom clock

openaps use cgm UpdateTime --to now

garykidd
@garykidd
Sep 05 2016 01:01
@diabeticgonewild Yup; been at this since April
Eric Jensen
@elnjensen
Sep 05 2016 01:02

@diabeticgonewild It's a Raspberry Pi 3, but yes, it is:

pi@raspberrypi:~/openaps_ti $ date
Sun Sep  4 21:00:40 EDT 2016
pi@raspberrypi:~/openaps_ti $ cat /etc/timezone 
America/New_York

What does your tz.ini contain? Or any of your rezone report definitions from openaps.ini?

diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:04
@garykidd
  1. Flash the CC1111
  2. Install Ubilinux
  3. Solder the CC1111 chip in Serial to Edison
  4. MMeowlink Ubilinux Instructions
  5. Install OpenAPS dependencies (python, etc...)
  6. Install DEV version of OpenAPS via PIP
  7. Follow install templates
  8. Configure Advanced Meal Assist
  9. Nightscout setup and syncing
Eric Jensen
@elnjensen
Sep 05 2016 01:05
Also, both pump and CGM have times set that in sync with the computer:
pi@raspberrypi:~/openaps_ti $ openaps use cgm ReadDisplayTime ; echo " " ; date
"2016-09-04T21:03:59" 
Sun Sep  4 21:04:04 EDT 2016
pi@raspberrypi:~/openaps_ti $ openaps use pump read_clock ; echo " " ; date
"2016-09-04T21:04:14" 
Sun Sep  4 21:04:21 EDT 2016
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:05
Then it's likely your Nightscout site on Azure/Heroku/Whatever that is causing the issue.
garykidd
@garykidd
Sep 05 2016 01:08
@diabeticgonewild thanks. Maybe this wasn't clear but I reverted to trying to establish working rig on an RPi3 using the carelink stick. The plan was to get this working and step to edison rig after I get a bit more comfortable/fluent.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:09
@garykidd That's the way to go.
  1. RasPi with Carelink
  2. RasPi with CC1111 (via USB)
  3. Edison in serial with CC1111
garykidd
@garykidd
Sep 05 2016 01:13
OK, so being that I have been stuck where I am for a couple of days. If I reflash another sdcard and start over. Should I follow dev or master branch on rtd? assuming there is not a complete "new walkthrough style" doc to follow.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:14
DEV most likely, as it's more up to date, and you can likely avoid problems. But you may encounter errors, as it's not verified.
garykidd
@garykidd
Sep 05 2016 01:15
and similarly, dev version of openaps?
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:18
@garykidd That is correct
garykidd
@garykidd
Sep 05 2016 01:39
and just for an absolute sanity check.... I'm contemplating starting over and doing a line-by-line again...from http://openaps.readthedocs.io/en/dev/index.html
but still working off my current non-working project here....if I...
pi@raspberrypi:~/APS301 $ openaps report invoke nightscout/recent-missing-entries.json
I get the same error in my openaps do-everything
so I think it must be something from there...
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:43
No don't do it line by line. You have to understand the commands
You need to know the difference between a command/argument/qualifier/option
You will catch errors in the DOCS that way, and you will be able to get where you need to go on your own.
garykidd
@garykidd
Sep 05 2016 01:44
@diabeticgonewild I meant that in the sense of reading each and every line, 1 word at a time.....and not going too far ahead unless I completely understand every single thing / problem / question that preceded that "line"
@diabeticgonewild yeah, I found a handful and submitted some PR on them.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:45
You have to know what each command means, and be able to make your own.
Personally, if I were doing the RasPi setup.
garykidd
@garykidd
Sep 05 2016 01:45
anyway getting back to current implementation.....
pi@raspberrypi:~/APS301 $ cat nightscout/recent-missing-entries.json
pi@raspberrypi:~/APS301 $
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:47
I would update Raspbian and install all OpenAPS dependencies. Then I would install OpenAPS. Then I would link the pump and Dexcom, and do a test upload of both. Then:
  1. openaps/docs#132
  2. https://gist.github.com/bewest/d3db9ca1c144b845382c885138a8f66e
garykidd
@garykidd
Sep 05 2016 01:52
@diabeticgonewild so regarding 2., above, I was following a different link, but what am I supposed to do with that exactly? A little specific guidance will help me understand more broadly. thanks.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 01:54
Make a JSON file with details for other kinds of reports for use with OpenAPS
garykidd
@garykidd
Sep 05 2016 02:00
@diabeticgonewild I'm quite convinced I am going to have same issues re-doing everything. I recall hearing expression of what's crazy...doing the same thing over and over and expecting different results...or something like that. I think one problem I have relates to the recent-missing-entries report. One issue that I had along the way was that you can't seem to invoke a G5 with oref0-glucose....so I simply used iter_glucose for my cgm in lieu of. But perhaos the reformatting that's required is different....any ideas along these lines?
~~~~~~~~~~
SO, is there an easier way of getting report details other than cat openaps.ini ?
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:09

Did you follow this?

Note that if you use Nightscout visualization as described later, you can use the built-in tool mm-format-ns-glucose to help formatting the Minimed glucose data. If you do, run the tool against the original iter-glucose output (monitor/glucose.json), not the output from glucosetools.

I need to know that first, y/n?
garykidd
@garykidd
Sep 05 2016 02:14
hmmmm....did a link no get pasted (above)?
I'm using Dex G5 receiver as main BG input
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:16

It starts here:
Cleaning CGM data from Minimed CGM systems

http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/Using-oref0-tools.html

It applies to you!!! (read the last paragraph)

I am well aware you are using a G5.
garykidd
@garykidd
Sep 05 2016 02:16
and not using MM sensor...actually I have this but (i) my pump doesnt support it and (ii) it just isnt as good IMO.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:16
Read the last paragraph!
I KNOW you are not using a MM sensor.
garykidd
@garykidd
Sep 05 2016 02:19
hmmm...the way that reads to me is that that pertains to MM CGM setups though.....I guess you are reading it differently though?
Paul Martin
@Spazholio
Sep 05 2016 02:19
So…do any of the CGM watchfaces notify you when your AP isn’t working? Because after a 4 hour car ride where it just up and failed for most of it, that would be a super feature to have (or to be made aware of if I’m not enabling it correctly).
garykidd
@garykidd
Sep 05 2016 02:22
@Spazholio I read on my pebble time today....... "Check Rig" a couple of times...my setup is far from working but I think it points to the functionality......
Paul Martin
@Spazholio
Sep 05 2016 02:23
Nope, no message like that the entire drive.
Although I know why - SOMETHING has filled up the root partition.
garykidd
@garykidd
Sep 05 2016 02:24
sorry, what watchface are you using?
Paul Martin
@Spazholio
Sep 05 2016 02:24
I’ve used “CGM In The Cloud” and the “Nightscout” watchface. Mostly the former, but sometimes the latter.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:25
@garykidd NVM. I think you should be using ns-get
garykidd
@garykidd
Sep 05 2016 02:25
The NS watchface trips that "Check RIg" under certain circumstances anyway.
@diabeticgonewild hmmmm...NVM,.....Node Version Manager...got it......what should I be using ns-get for ...sorry I missed a transition somewhere...at least I think. Thanks @diabeticgonewild
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:28
Nevermind
Not Node version manager.
Sorry!
garykidd
@garykidd
Sep 05 2016 02:30
no worries.....almost seemed to apply though....funny.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:31

openaps use ns shell get entries.json 'count=288'

openaps/docs#129

Paul Martin
@Spazholio
Sep 05 2016 02:31
What are the tips/tricks to improve space usage on the Edison? I seem to recall mounting the /var/log dir under /home was one of them? I assume just stuffing that into /etc/fstab/ is sufficient for that?
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:33

Edit /etc/logrotate.conf and set the log rotation to daily from weekly and enable log compression by removing the hash on the #compress line, to reduce the probability of running out of disk space

https://github.com/oskarpearson/mmeowlink/wiki/Prepare-the-Edison-for-OpenAPS

Paul Martin
@Spazholio
Sep 05 2016 02:33
Yeah, that bit’s all done. Once I deleted all the .gz files in /var/log (and subdirs) it only freed up 50MB.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 02:34
I don't know any other storage hacks.
Paul Martin
@Spazholio
Sep 05 2016 02:34
Ok, cool. Thanks. =)
Eric Jensen
@elnjensen
Sep 05 2016 02:35
@spazholio Do you have a sense of what is filling up your root partition?
Sounds like it's not the logs?
Paul Martin
@Spazholio
Sep 05 2016 02:35
Nope. That’s what I’m digging through now. Just did an apt-get clean and that didn’t get me much either.
Eric Jensen
@elnjensen
Sep 05 2016 02:36
You could try something like du -hsx /* to get a high-level view of the sizes of the top-level directories.
Don't know if that syntax is the same on Yocto, but that's what works on other Linuxes.
Paul Martin
@Spazholio
Sep 05 2016 02:37
My /usr/ is fairly huge.
Mostly in lib and share
Eric Jensen
@elnjensen
Sep 05 2016 02:37
OK, then you could push the next level down, e.g. du -hsx /usr/share/* etc. That's doesn't really tell you why those are big, though.
And in particular doesn't tell you what has changed. Do you know if you were close to full already? Or do you think something significant has added usage recently?
Paul Martin
@Spazholio
Sep 05 2016 02:39
I don’t think I was close to full. I mean, I could have been, but don’t think so...
Eric Jensen
@elnjensen
Sep 05 2016 02:39
/usr/share and /usr/lib stuff is likely to be for building software, doesn't seem like it would change a lot.
I guess you could also look for recent files that are large, though there's no guarantee it's individual files that are the problem.
Something like find / -size +100M -exec ls -lh {} \;
(Maybe not the greatest size threshold there, but you see what I mean hopefully.)
Oops, meant to add mod time in there too: find / -size +100M -mtime -1d -exec ls -lh {} \;
Paul Martin
@Spazholio
Sep 05 2016 02:44
Yep, I was already on the way to trying that when you typed it out. find is my friend.
Eric Jensen
@elnjensen
Sep 05 2016 02:45
@Spazholio While you're online, can you tell me what's in your tz.ini file? I'm trying to track down some puzzling behavior in my setup when I try to set timezones on data for NS.
Paul Martin
@Spazholio
Sep 05 2016 02:45
xargs, however, is my mortal enemy.
[device "tz”]
That’s it.
Eric Jensen
@elnjensen
Sep 05 2016 02:45
Yes, that's what mine looks like too. Hmm.
Not sure what that file is supposed to do. Do you have any reports that rezone any of your data? If so, how are they defined in openaps.ini?
Paul Martin
@Spazholio
Sep 05 2016 02:47
Apparently, this version is find is choking on the -mtime flag. Interesting.
Pretty much every single report of mine rezones. =)
Give me one in particular that you’re having issues with and I’ll give you what I have.
Eric Jensen
@elnjensen
Sep 05 2016 02:48

I have this for trying to rezone pump history:

[report "monitor/pumphistory-zoned.json"]
use = rezone
reporter = JSON
astimezone = False
date = ['timestamp', 'dateString', 'start_at', 'end_at', 'created_at']
adjust = missing
input = monitor/pumphistory.json
device = tz
timezone = America/New_York

Also tried it with the timezone as EDT.
But it doesn't change the data at all.

On the other hand, if I run it from the command line, it works OK:
openaps use tz rezone --timezone "EDT" monitor/pumphistory.json
Paul Martin
@Spazholio
Sep 05 2016 02:49
[report "monitor/pumphistory-zoned.json"]                                       
use = rezone                                                                    
reporter = JSON                                                                 
astimezone = True                                                               
date = timestamp dateString start_at end_at created_at                          
adjust = missing                                                                
input = monitor/pumphistory.json                                                
device = tz                                                                     
timezone = EDT
Eric Jensen
@elnjensen
Sep 05 2016 02:49
OK, looks essentially the same except for how that date entry is formatted.
Paul Martin
@Spazholio
Sep 05 2016 02:50
And here’s how it was created:
openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
Eric Jensen
@elnjensen
Sep 05 2016 02:51
OK, you have a bunch of extra fields there that I didn't have in my definition. Let me try that. (But weird that my sparer command-line works while the report doesn't.)
Thanks so much, giving this a try.
Paul Martin
@Spazholio
Sep 05 2016 02:51
When it comes to oddities like that, I tend to tap @bewest. I’ve managed to help him track down a few bugs hashing zoning stuff out with him.
Oh, and my /usr/share/doc dir is 63M and my /usr/share/locale is 74M
Eric Jensen
@elnjensen
Sep 05 2016 03:00
That did it! So it looks to me like when you specify all those extra fields in the report definition, it formats them correctly in openaps.ini as a JSON array (or whatever the right term is), and when you don't, it tries to fill in the defaults, but the formatting isn't quite right on the date = timestamp dateString start_at end_at created_at line (should be date = ['timestamp', 'dateString', 'start_at', 'end_at', 'created_at']) so the report doesn't work right.
Looks like a bug to me. I'll file an issue on github and see what @bewest and @scottleibrand think. But it looks like I'm good to go now for getting properly formatted data up to NS. Thanks so much for your help, @Spazholio ! :thumbsup:
Good luck with your space issues. I'll be working more on my Edison rig soon, so will likely have to wrestle with some of this as well.
Paul Martin
@Spazholio
Sep 05 2016 03:03
Hey, glad I could help. =)
Eric Jensen
@elnjensen
Sep 05 2016 03:04
If it's useful I could boot up my Edison and check some directory sizes. I've installed Yocto and a bunch of necessary packages (openaps etc.) but haven't added anything else in user space, e.g. I haven't run loop at all. Let me grab it - will just take a minute to have a look.
Paul Martin
@Spazholio
Sep 05 2016 03:06
Now I need to dig into my Pi3 and figure out how to get it using wpa_supplicant instead of Network Manager. Fun!
Well, I’m using Ubi if that saves you some time. =)
Eric Jensen
@elnjensen
Sep 05 2016 03:08
Ah, OK.
I have wpa_supplicant working OK on my Pi3 (for wifi and ethernet anyway - not BLE tethering) so let me know if you need to see any config files.
Paul Martin
@Spazholio
Sep 05 2016 03:10
Well, I have a good wpa_supplicant.conf that I finally got working with my elaborate work WiFi, so that’s my gold standard. But when I set up a new Pi3 image last night, it didn’t seem to care that the wpa_supplicant.conf file was there.
Alright, I have 223M free now. Should give me a touch of breathing room.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 03:18
@Spazholio Look at this network/etc/interfaces and ONLY pay attention to the last line. Add that final line (append it) to YOUR /network/etc/interfaces.
THEN
Just do something similar to the wpa_supplicant.conf on the link listed below, AND you should be set!
Paul Martin
@Spazholio
Sep 05 2016 03:19
This is what I have now on my Edison:
auto lo
iface lo inet loopback

auto usb0
iface usb0 inet static
    address 192.168.2.200
    netmask 255.255.255.0

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface home inet dhcp
iface work inet dhcp
iface iphone inet dhcp
iface danielle inet dhcp
iface ssm inet dhcp
iface nmcjetpack inet dhcp

allow-hotplug usb0
diabeticgonewild
@diabeticgonewild
Sep 05 2016 03:19
Trust me, that link gives the easy way of doing wpa_supplicant.conf! I searched for hours for a solution that was simple, and I found that page!
No, you want to keep the DEFAULT /network/etc/interfaces
Paul Martin
@Spazholio
Sep 05 2016 03:20
Duplicating it on the Pi3 doesn’t seem to work. I think it’s because it’s using systemd and is expecting to use a different networking manager….like NetworkManager.
diabeticgonewild
@diabeticgonewild
Sep 05 2016 03:20
You DO NOT WANT/NEED any static addresses!
Trust me!
Paul Martin
@Spazholio
Sep 05 2016 03:21
I need ONE static address - that’s for the USB network interface. Used very rarely. =)
diabeticgonewild
@diabeticgonewild
Sep 05 2016 03:21
Oh
Paul Martin
@Spazholio
Sep 05 2016 03:21
Also, when you said "Look at this network/etc/interfaces and ONLY pay attention to the last line. Add that final line (append it) to YOUR /network/etc/interfaces” - which E/N/I file were you referring to?
diabeticgonewild
@diabeticgonewild
Sep 05 2016 03:21
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
That list line is key
Paul Martin
@Spazholio
Sep 05 2016 03:23
Weird that it needs it since I have this line:
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
No?
Scott Leibrand
@scottleibrand
Sep 05 2016 03:48
@elnjensen the G5 transmitter actually does store history. There is a special opcode that Dexcom doesn't even use that can allow you to pull older data for backfill.
garykidd
@garykidd
Sep 05 2016 03:49
This message was deleted
ns://JSON/shell/nightscout/uploaded.json
reporting nightscout/uploaded.json
ns://JSON/shell/nightscout/recent-missing-entries.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 298, in main
    if spec.includes(get(elem)):
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 264, in get
    return parse(item.get(args.date))
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 1164, in parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 552, in parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 671, in _parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 188, in split
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 184, in next
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 177, in __next__
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 93, in get_token
AttributeError: 'NoneType' object has no attribute 'read'
No JSON object could be decoded
@scottleibrand any ideas here?
Scott Leibrand
@scottleibrand
Sep 05 2016 03:53
@garykidd sounds like you're right: I think you did in fact find the one issue with using iter_glucose instead of ored0_glucose b
(Earlier). Not sure what that last one is.
But looks like an empty input file.
garykidd
@garykidd
Sep 05 2016 03:56
ooops I deleted the intro to it....it's the first error I get when I openaps do-everything
right...so how can I double check/ fix what's supposed to be in nightscout/recent-missing-entries.json?
if you think I am on the right track here?
Scott Leibrand
@scottleibrand
Sep 05 2016 03:57
garykidd
@garykidd
Sep 05 2016 03:57
that is.
Scott Leibrand
@scottleibrand
Sep 05 2016 03:58
If so, we need to start narrowing down what is causing that issue, and figure out which part of the code is complaining about which date thing.
When you have an issue with a big alias like that, first step is to run all the component aliases & reports one by one in order to see which one actually fails.
garykidd
@garykidd
Sep 05 2016 04:01
That doesnt appear to be an issue at thispoint...here's the full output from openaps do-everything
I guess, for avoidance of doubt, when I gather-clean-data it seems to work without any errors
This message was deleted
pi@raspberrypi:~/APS301 $ openaps do-everything
PREFLIGHT
PREFLIGHT OK
cgm://JSON/iter_glucose_hours/raw-cgm/glucose-raw.json
reporting raw-cgm/glucose-raw.json
tz://JSON/rezone/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
reporting monitor/temp-basal-status.json
pump://JSON/reservoir/monitor/reservoir.json
reporting monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
reporting monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
reporting monitor/battery.json
pump://JSON/iter_pump_hours/raw-pump/pump-history-raw.json
reporting raw-pump/pump-history-raw.json
tz://JSON/rezone/monitor/pump-history.json
reporting monitor/pump-history.json
pump://JSON/read_bg_targets/raw-pump/bg-targets-raw.json
reporting raw-pump/bg-targets-raw.json
units://JSON/bg_targets/settings/bg-targets.json
reporting settings/bg-targets.json
pump://JSON/read_insulin_sensitivities/raw-pump/insulin-sensitivities-raw.json
reporting raw-pump/insulin-sensitivities-raw.json
units://JSON/insulin_sensitivities/settings/insulin-sensitivities.json
reporting settings/insulin-sensitivities.json
pump://JSON/read_selected_basal_profile/raw-pump/selected-basal-profile.json
reporting raw-pump/selected-basal-profile.json
pump://JSON/read_settings/raw-pump/settings.json
reporting raw-pump/settings.json
oref0://JSON/shell/settings/selected-basal-profile.json
reporting settings/selected-basal-profile.json
oref0://JSON/shell/settings/settings.json
reporting settings/settings.json
get-profile://text/shell/oref0-monitor/profile.json
Could not sort temptargets_data.  Optional feature temporary targets disabled.
reporting oref0-monitor/profile.json
calculate-iob://text/shell/oref0-monitor/iob.json
reporting oref0-monitor/iob.json
determine-basal://text/shell/oref0-predict/oref0.json
{"iob":-0.297,"activity":0.0007,"bolussnooze":0,"basaliob":-0.297,"netbasalinsulin":-0.05,"hightempinsulin":0.25,"time":"2016-09-05T03:58:04.000Z"}
{"delta":0,"glucose":122,"short_avgdelta":-5.5,"long_avgdelta":-6.1}
{"duration":16,"rate":0,"temp":"absolute"}
{"max_iob":2,"type":"current","max_daily_safety_multiplier":3,"current_basal_safety_multiplier":4,"autosens_max":1.5,"autosens_min":0.7,"autosens_adjust_targets":true,"override_high_target_with_low":false,"bolussnooze_dia_divisor":2,"dia":4,"model":{},"current_basal":1.1,"basalprofile":[{"i":0,"start":"00:00:00","rate":1.1500000000000001,"minutes":0},{"i":1,"start":"03:00:00","rate":1.35,"minutes":180},{"i":2,"start":"07:30:00","rate":1.2000000000000002,"minutes":450},{"i":3,"start":"12:00:00","rate":1.1,"minutes":720},{"i":4,"start":"22:00:00","rate":1.1,"minutes":1320}],"max_daily_basal":1.35,"max_basal":2,"out_units":"mg/dL","min_bg":105,"max_bg":135,"sens":50}
Carb Impact: -5.9 mg/dL per 5m; CI Duration: NaN hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
reporting oref0-predict/oref0.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
reporting oref0-enacted/enacted-temp-basal.json
ns://JSON/shell/nightscout/preflight.json
reporting nightscout/preflight.json
ns://JSON/shell/nightscout/recent-treatments.json
reporting nightscout/recent-treatments.json
ns://JSON/shell/nightscout/uploaded.json
reporting nightscout/uploaded.json
ns://JSON/shell/nightscout/recent-missing-entries.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __ca
Scott Leibrand
@scottleibrand
Sep 05 2016 04:04
Ok, so let's look at the recent-missing-entries report definition and see what it's doing.
garykidd
@garykidd
Sep 05 2016 04:04
 output = self.main(args, app)
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 298, in main
    if spec.includes(get(elem)):
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 264, in get
    return parse(item.get(args.date))
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 1164, in parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 552, in parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 671, in _parse
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 188, in split
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 184, in next
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 177, in __next__
  File "build/bdist.linux-armv7l/egg/dateutil/parser.py", line 93, in get_token
AttributeError: 'NoneType' object has no attribute 'read'
No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 48, in main
    reporters.Reporter(report, device, task)(output)
  File "/home/pi/src/openaps/openaps/reports/reporters/__init__.py", line 33, in __call__
    self.blob = self.serialize(data)
  File "/home/pi/src/openaps/openaps/reports/reporters/__init__.py", line 31, in serialize
    return self.method.serialize(render(data), self)
  File "/home/pi/src/openaps/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
is there another way to pull that than from openaps.ini file?
Scott Leibrand
@scottleibrand
Sep 05 2016 04:05
Yes. openaps report show
Add a --cli if needed.
garykidd
@garykidd
Sep 05 2016 04:07
[report "nightscout/uploaded-entries.json"]
oper = upload-non-empty-type
use = shell
reporter = JSON
device = ns
remainder = entries.json nightscout/recent-missing-entries.json
json_default = True
pi@raspberrypi:~/APS301 $ openaps report show
pump://JSON/read_bg_targets/raw-pump/bg-targets-raw.json
units://JSON/bg_targets/settings/bg-targets.json
pump://JSON/read_insulin_sensitivities/raw-pump/insulin-sensitivities-raw.json
units://JSON/insulin_sensitivities/settings/insulin-sensitivities.json
pump://JSON/read_clock/raw-pump/clock-raw.json
tz://JSON/clock/monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
determine-basal://text/shell/oref0-predict/oref0.json
pump://JSON/iter_pump_hours/raw-pump/pump-history-raw.json
tz://JSON/rezone/monitor/pump-history.json
pump://JSON/model/model.json
pump://JSON/reservoir/monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0://JSON/shell/settings/settings.json
pump://JSON/read_settings/raw-pump/settings.json
oref0://JSON/shell/settings/selected-basal-profile.json
pump://JSON/read_selected_basal_profile/raw-pump/selected-basal-profile.json
pump://JSON/read_temp_basal/raw-pump/temp-basal-status.json
pump://JSON/reservoir/raw-pump/reservoir.json
pump://JSON/read_status/raw-pump/status.json
pump://JSON/read_battery_status/raw-pump/battery.json
cgm://JSON/iter_glucose_hours/raw-cgm/glucose-raw.json
tz://JSON/rezone/monitor/glucose.json
ns://JSON/shell/nightscout/recent-treatments.json
ns://JSON/shell/nightscout/uploaded.json
ns://JSON/shell/nightscout/recent-missing-entries.json
ns://JSON/shell/nightscout/uploaded-entries.json
ns://JSON/shell/nightscout/preflight.json
get-profile://text/shell/oref0-monitor/profile.json
calculate-iob://text/shell/oref0-monitor/iob.json
pump://JSON/model/settings/model.json
ns-status://JSON/shell/nightscout/openaps-status.json
ns://JSON/shell/nightscout/uploaded-recent-devicestatus.json
pi@raspberrypi:~/APS301 $ cat nightscout/recent-missing-entries.json
pi@raspberrypi:~/APS301 $
Scott Leibrand
@scottleibrand
Sep 05 2016 04:11
You'll need to specify the report you want to show, and then add --cli after that to see the full definition.
Or add -h if you're ever not sure what else you need.
It's the input file (maybe entries.json) that has the json problem.
be back shortly.
garykidd
@garykidd
Sep 05 2016 04:14
pi@raspberrypi:~/APS301 $ openaps report show nightscout/recent-missing-entries.json --cli
openaps use ns shell format-recent-type tz entries monitor/glucose.json
I think this may be corroborating my hypothesis about the oref0_glucose vs. iter_glucose....but hav haven't ent fully connected the dots (yet).
garykidd
@garykidd
Sep 05 2016 04:21
pi@raspberrypi:~/APS301 $ openaps use ns shell format-recent-type tz entries monitor/glucose.json
actually hung after entering..
Dana Lewis
@danamlewis
Sep 05 2016 04:21
@Spazholio I'm not sure either of the two watchface you're using pull in OpenAPS data? You might check out something like Urchin for displaying closed loop data, which then makes it more obvious if your loop is not working. You can also create some pushover alerts from NS if you want notifications of it not working..
Paul Martin
@Spazholio
Sep 05 2016 04:23
Pushover got WAAAAAY too noisy for me. But I may have to take another look at it. And as much as I like Urchin, the other two have the at-a-glance thing down a bit better.
Dana Lewis
@danamlewis
Sep 05 2016 04:23
Sounds like you need to create your own then ;)
Ditto for re looking at pushover and checking to see what alarms you actually want and when
Paul Martin
@Spazholio
Sep 05 2016 04:28
I really like the cleanliness of the DIN Time watchface. And yeah, I’ve considered trying my hand at making my own. I’d LOVE it if the Edison could push a BT message to my phone or some such. Unsure how such a thing would actually work though...
garykidd
@garykidd
Sep 05 2016 05:11
@scottleibrand
pi@raspberrypi:~/APS301 $ cat raw-cgm/glucose-raw.json
[
  {
    "trend_arrow": "45_UP", 
    "system_time": "2016-02-24T00:31:37", 
    "display_time": "2016-09-05T01:01:27", 
    "glucose": 120
  },
```
====================
pi@raspberrypi:~/APS301 $ cat monitor/glucose.json
[
  {
    "trend_arrow": "45_UP", 
    "system_time": "2016-02-24T00:31:37", 
    "display_time": "2016-09-05T01:01:27-04:00", 
    "glucose": 120
  },
```
Scott Leibrand
@scottleibrand
Sep 05 2016 05:13
@garykidd so you need to create a "date" field from the info in display_time
I have a one-liner to do that with json somewhere...
garykidd
@garykidd
Sep 05 2016 05:15
does that look right after being run through tz reformat?
I actually searched rtd for that but nada
Scott Leibrand
@scottleibrand
Sep 05 2016 05:18
Or we could update the ns device to handle display_time if date is missing.
garykidd
@garykidd
Sep 05 2016 05:23
@scottleibrand hmmm....any guidance appreciated...
kinda wonder what the specific circumstances are that requires this type of @manipulation
[FYI, my keybpard seems to have swapped @ for "]
feeling encouraged but fighting mr. sandman.
Christer Jensen
@christerjensen
Sep 05 2016 06:17
Had my 715 pump looping without anyone attached yesterday - looks promising. I have not enacted the basal suggestions to the pump yet. Should the nightscout webpage update the temp basals - or will they only show when the pump has acknowledged them? It seems like openaps uses the basalprofile from the pump (hence I have to sync the basalprofile on the web-profile?). Right now its not looping - it looks like it needs the Dexcom plugged into the Raspberry Pi even if it is collecting values from Nightscout - I'll have to remove that feed from the Dexcom somehow. I might be wrong here - it might be that the loop used the Dexcom raw values but I removed the part where those values are uploaded to Nightscout (hence it seemd like it used the nightscout values from the screenshot attached). https://dl.dropboxusercontent.com/u/24731481/openaps.jpg
Scott Leibrand
@scottleibrand
Sep 05 2016 06:57
@garykidd there are some examples of similar transformations in https://github.com/scottleibrand/openaps-sh/blob/mmeowlink/setup.sh
garykidd
@garykidd
Sep 05 2016 09:00
@scottleibrand thanks. Not following. Can you give me a little more guidance though this is really confusing. Was thinking that I may have a lot better chance of figuring out how to actually invoke the previoulsy troublesome oref0_glucose report. After all it provides perfectly fine output from use....hmmm
garykidd
@garykidd
Sep 05 2016 09:24
any ideas why a can use oref0_glucose and add an oref0_glucose report, but can't invoke it without encountering "integer to long to convert to long C" error. Anyway, hopefully with the issue submitted, it'll be clear to someone. I get that you have to figure out a lot of this stuff yourself--but I'm quite sure I need more help. Thanks for your continued help @all.
Eric Jensen
@elnjensen
Sep 05 2016 12:54
@scottleibrand That's interesting about the G5 transmitter caching history. Do we know what the opcode is (e.g. does Nate use it in Loop and x DripG5), or do we just think/know it exists but can't access it?
Eric Jensen
@elnjensen
Sep 05 2016 13:02
I've been having fewer successful runs of my loop overnight the past several nights, so added more logging last night to try to troubleshoot. I get a variety of different errors (need more than zero values to unpack, IndexError: bytearray index out of range, etc.) partway through the loop. It looks like it is just not getting all the way through all of the reports, and I'm guessing it's a range issue. (More blankets the past few nights.) What's interesting to me, though, is that the preflight (which is just read_clock) almost never fails. Do you think that indicates that I'm close to being in range (i.e. close to strong-enough signal), but not quite strong enough to get all the way through a full download of data from some of the longer reports? Clock just needs a small amount of info, but others (e.g. pump history) need more. Does this sound correct?
If I grep through the logs and count which reports raise errors in a given fail, it looks like this:
pi@raspberrypi:~/openaps_ti $ grep -E 'openaps.*raised' /var/log/messages | perl -nae 'print "$F[5]\n"' |sort |uniq -c
      1 enact/enacted.json
      4 monitor/clock.json
     13 monitor/pumphistory.json
      2 monitor/temp_basal.json
     20 settings/bg_targets_raw.json
      8 settings/insulin_sensitivities_raw.json
     26 settings/settings.json
Eric Jensen
@elnjensen
Sep 05 2016 13:10
So it's failing most often on settings, then bg_targets, then pumphistory. Obviously the history is important, but the settings and targets aren't going to change during the night. I wonder about not running the get_profile part of the loop during the night - would need to check that those reports are less than, say, 12 hours old - but perhaps that could help. Possible that it could just fail on other things, but curious about people's thoughts / experiences with this.
Colin Lennon
@colinlennon
Sep 05 2016 13:17
@elnjensen Are you using a Carelink stick?
Eric Jensen
@elnjensen
Sep 05 2016 13:26
@colinlennon No, it's TI stick. Had been working great (and has still been good during the day) but just struggling at night now.
Colin Lennon
@colinlennon
Sep 05 2016 13:32
@elnjensen Oh, okay. You're correct that the larger reports are more likely to fail, I have found that too, although I'm using an ERF so my range is not as good as you should have with a TI stick. I'm running auto-sens, so I pull 24+ hours pump history which I found often failed, so I only refresh that report on every tenth loop now.
Do you do an mmtuneat the start of every loop? What kind of mmtune values are you seeing overnight?
Eric Jensen
@elnjensen
Sep 05 2016 13:35
I don't tune each time - just once an hour. Stopped tuning frequently because I get the same value every time. And I don't think the loops overnight that are immediately after a tune are more likely to be successful, but I should double check that.
I should check the tune strengths, though - good idea.
Colin Lennon
@colinlennon
Sep 05 2016 13:37
@elnjensen I was previously running mmeowlink 0.7 and found that after updating to the latest version (0.8.5 I think), I get far fewer failures now. Might be worth checking which version you're on.
Eric Jensen
@elnjensen
Sep 05 2016 13:42
Thanks, will do!
Eric Jensen
@elnjensen
Sep 05 2016 14:15
I'm running latest mmeowlink version, 0.8.5, so that's not the issue. I think it's just signal strength. May need to try moving the pump, though it's hard to keep it in place when I'm sleeping.
Scott Leibrand
@scottleibrand
Sep 05 2016 14:38
@elnjensen you might try an approach like in my refresh-loops setup.sh of refreshing each loop independently, in order of importance...
I think @loudnate knows what the glucose history opcode is and has tested with it, but not sure if it's in xDripG5 or similar.
Eric Jensen
@elnjensen
Sep 05 2016 16:23
Thanks, @scottleibrand . In the openaps setup.sh on github it looks like you're invoking the settings each time (from within the gather alias) - so I'm not sure if I understand what you're suggesting. Maybe I'm looking in the wrong place?
Scott Leibrand
@scottleibrand
Sep 05 2016 16:55
Only if everything else succeeds. If one of the more important ones fails, it retries those first until they're current.
It also enacts as soon as it refreshes even just the current temp basal, if pumphistory etc. are recent enough.
Eric
@ecc1
Sep 05 2016 18:50

Ubuntu for Edison: https://communities.intel.com/thread/106126

I haven't tried this yet myself, and note that BT isn't supported yet, but it's huge progress.

Brandon Faloona
@bfaloona
Sep 05 2016 18:52

Big shout out to the entire community here for all the ways everyone helps each other out!

I got the following email from my mom on Saturday, with the subject line:

Crying I'm so HAPPY :joy:

Screen Shot 2016-09-03 at 3.18.40 PM.png
Dana Lewis
@danamlewis
Sep 05 2016 18:54
:) :+1: :confetti_ball: :clap:
Scott Leibrand
@scottleibrand
Sep 05 2016 18:59
@jasoncalabrese just merged a fix for your oref0_glucose issue. Would be nice if you can test before we do a full release of openaps with that.
Eric Jensen
@elnjensen
Sep 05 2016 19:12
:thumbsup: @bfaloona !
eyim
@eyim
Sep 05 2016 19:20
👍
Matthias
@ceben80
Sep 05 2016 20:44
@bfaloona :tada: :star2: ....great!
Brandon Faloona
@bfaloona
Sep 05 2016 20:46
Ok, enough celebrating, back to work. :smile:
I'm making the leap from Pi to Edison and I'm hoping I can pull it off in a few short days.
Here are my planning notes (hardware, goals, etc)
If anyone can point me to better / newer docs to get me started, please let me know.
Eric Jensen
@elnjensen
Sep 05 2016 20:51
I'm excited that I now have my OpenAPS loop correctly reporting everything to Nightscout! I had skipped over that part of the setup initially since I was getting most of the info there via a RileyLink and iOS app and so could do post-facto visualization on the temp basals, etc. But it's nice now to have the near-real-time status of the loop, without an extra device. :stars:
Brandon Faloona
@bfaloona
Sep 05 2016 20:52
Thanks @ceben80
Eric Jensen
@elnjensen
Sep 05 2016 20:52
Quick question about NS display - right now my pump status is showing up in red - it says "110.75U 1.24v 2m ago normal" so it doesn't seem like any of those should indicate an error condition: battery is OK, reservoir is OK. Is it just red all the time?
Brandon Faloona
@bfaloona
Sep 05 2016 20:54
@elnjensen nightscout allows you to configure the low battery voltage level. Sounds like you should lower it. It is one of the config environment variables.
Eric Jensen
@elnjensen
Sep 05 2016 20:55
Cool, thanks. But not in the NS profile? Do I do this on Azure end?
Brandon Faloona
@bfaloona
Sep 05 2016 20:56
Yes. The value is PUMP_WARN_BATT_V
Eric Jensen
@elnjensen
Sep 05 2016 20:57
And any suggestions what voltage to use? It's currently showing two bars. "Half full", though of course that's not linear with the voltage. In fact, 1.24 V seems a little low, now that I think of it, for two bars - usually it seems that after I pull a battery from the pump it is at 1.3V or so. Hmm.
It's a regular alkaline, FWIW.
Eric Jensen
@elnjensen
Sep 05 2016 21:02
Ah, just dropped to one bar! Interesting. OK, this is useful to know. Think I'll just keep the warning where it is for now.
John Dodds
@johners97
Sep 05 2016 21:16
Hello. I am currently making a transmitter for the Freestyle Libre. Has anyone here done this and integrated the data with the DIYAPS?
Tim Mecklem
@tmecklem
Sep 05 2016 21:18
I’m helping someone set up openaps with enlite as the cgm via mmeowlink. I get normal stuff back from the pump except for openaps use pump iter_glucose 100
It returns:
@@@ 5
{‘raw’: ‘00000000’}
{‘date’: ‘’}
{‘body’: ‘’}
[]
anyone have any ideas?
John Dodds
@johners97
Sep 05 2016 21:21
I was previously using OpenAPS with the enlite cgm system, however I think it is quite expensive and inaccurate; therefore I have discontinued use seeing as I am a student on a tight budget. So, I am just wondering, if anybody here has successfully done as I aforementioned! I believe the FS Libre to be quite accurate too, and significantly cheaper, as well as being less invasive
Oh well, I will come back once I have my foot in the door of this blueReader business :P
Matthias
@ceben80
Sep 05 2016 21:25
....yeah
John Dodds
@johners97
Sep 05 2016 21:26
Yeah?
Matthias
@ceben80
Sep 05 2016 21:26
Great project :+1:
John Dodds
@johners97
Sep 05 2016 21:26
I have looked at that already :p
Matthias
@ceben80
Sep 05 2016 21:26
:tada:
Paul Martin
@Spazholio
Sep 05 2016 21:35
@elnjensen Are you using regular or lithium batteries in the pump?
Hristina Dimova
@xpucuto
Sep 05 2016 21:42
@johners97 a member of my group has a sister with Down syndrome , so far he has developed an automated device which scans the sensor and sends the data to the cloud ( he is not using nightscout ) . His final goal is to be able to send remote blouses to his sister according to her CGM data. Here is the link to the project in github : https://github.com/gyordanov2000/FreeStyle-Libre-to-CGM the FB page is with the same name .
Terri Lyman
@tatigger
Sep 05 2016 21:43
I think that when I created the vendor NS I may have used an incorrect url. Can anyone tell me how to look at it to verify the settings, and if I have made an error, do I just remove the device and reload it? Or can it be redirected to a different url?
Tim Mecklem
@tmecklem
Sep 05 2016 22:08
If I point openaps at a newer pump and the same enlite cgm, I get data.
Brandon Faloona
@bfaloona
Sep 05 2016 22:13
@tatigger try openaps device show ns to see what you have now
running remove then add sounds like a good idea if the url is wrong.
Terri Lyman
@tatigger
Sep 05 2016 22:15
Thanks @bfaloona . Yep, it's in there incorrectly. So to update the url, do I remove and reinstall the device ns? or is there another way?
Brandon Faloona
@bfaloona
Sep 05 2016 22:16
Devices are stored in openaps.ini, so you could edit that file.
Terri Lyman
@tatigger
Sep 05 2016 22:17
Thanks : )
Brandon Faloona
@bfaloona
Sep 05 2016 22:17
Using the command is preferred, I think.
You bet.
Terri Lyman
@tatigger
Sep 05 2016 22:17
It seems the most direct way to handle it.
Jason Calabrese
@jasoncalabrese
Sep 05 2016 22:18
amazing results @bfaloona
Terri Lyman
@tatigger
Sep 05 2016 22:33
So does this $ nightscout autoconfigure-device-crud https://my.nightscout.host averylongplainsecret mean I need to enter " $ nightscout autoconfigure-device-crud https://<MyNightscoutHerokuURL> <MyAPI_Secret>" ?
I am trying to correctly add my nightscout to my OpenAPS instance
Because that is what I did and I got this error:
Cannot GET /api/v1/-h
Brandon Faloona
@bfaloona
Sep 05 2016 22:40

Hey Edison folks, can you help me vet the following assumption?

If I plug all these things together, will I be able to power the rig with a 5v power bank plugged into the battery block? I assume this will also recharge the built in battery. I also assume that the built in battery will act as a backup so power banks can be hot swapped.

Down the road I plan to upgrade the built in battery (only 400mAh) so an external power bank is not required.
And lastly, can USB micro power be supplied to the base block AND the battery block at the same time?
Brandon Faloona
@bfaloona
Sep 05 2016 22:48
@tatigger What you have looks correct. The error shows the url ending in -h which looks odd. Can you try rerunning the command?
The averylongsecret you provide here is longer that (but based on I think) the API_SECRET configured in heroku.
The instructions cover that, but the details are escaping me at the moment.
Jason Calabrese
@jasoncalabrese
Sep 05 2016 22:55
@tatigger you don't enter the $, thats just saying to enter the command at the prompt
Terri Lyman
@tatigger
Sep 05 2016 22:57
Yeah. : ) No $ sign. Do I use the long API that says API Key that has dashes, letters and numbers in it. Assigned by heroic?
LOL Heroku
Russell Gardner
@RussGG
Sep 05 2016 23:00
I am going through and invoking the reports I have and making sure I can read the reports. I received this... }pi@raspberrypi:~/ccgopenaps2 $ openaps report invoke oref0-enacted/enacted-temp-basal.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0-enacted/enacted-temp-basal.json raised can't open 'oref0-predict/oref0.json': [Errno 2] No such file or directory: 'oref0-predict/oref0.json' so I am guessing I haven't created this report oref0-predict/oref0.json how is that report created?
Terri Lyman
@tatigger
Sep 05 2016 23:02
Never mind! It seems to all be connected now. : )
Jason Calabrese
@jasoncalabrese
Sep 05 2016 23:16
:+1:
Tim Mecklem
@tmecklem
Sep 05 2016 23:17
I’m perplexed by this output from iter_glucose with enlite and a 722 2.4a pump. The other calls work but openaps use pump iter_glucose 5 always shows:
@@@ 5
{‘raw’: ‘00000000’}
{‘date’: ‘’}
{‘body’: ‘’}
[]
The pump shows BG data on the device graph, and another pump returns values when connected to the same enlite sensor.
I have reached a dead end.
:/
Brandon Faloona
@bfaloona
Sep 05 2016 23:20
@RussGG Not created, or just not invoked.
Russell Gardner
@RussGG
Sep 05 2016 23:21
I tried invoking and received an error
Brandon Faloona
@bfaloona
Sep 05 2016 23:21
try openaps report show oref0-predict/oref0.json
Which setup instructions are you following?
Russell Gardner
@RussGG
Sep 05 2016 23:22
}pi@raspberrypi:~/ccgopenaps2 $ openaps report show oref0-predict/oref0.json
determine-basal://text/shell/oref0-predict/oref0.json
Brandon Faloona
@bfaloona
Sep 05 2016 23:24
Can you paste error you get on invoking it? Do you have an ore0-predict folder?
@tmecklem Don't give up!
Tim Mecklem
@tmecklem
Sep 05 2016 23:24
:)
trying with a carelink stick now.
¯_(ツ)_/¯
Russell Gardner
@RussGG
Sep 05 2016 23:25
@bfaloona pi@raspberrypi:~/ccgopenaps2 $ openaps report invoke oref0-predict/oref0.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 719, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, 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-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/invoke.py", line 23, in main
device = app.devices[report.fields['device']]
KeyError: 'determine-basal'
Brandon Faloona
@bfaloona
Sep 05 2016 23:25
@tmecklem Are you using production or dev of openaps and oref0?
Tim Mecklem
@tmecklem
Sep 05 2016 23:25
good questions.
one sec
I had to switch tiny computers to have more usb ports for carelink
production for both atm
and up to date with master of mmeowlink
Russell Gardner
@RussGG
Sep 05 2016 23:28
@bfaloona pi@raspberrypi:~/ccgopenaps2 $ ls
bewest-aliases.json last_four_pump_hours.json ns.ini pump.ini read_battery_status.json read_settings.json
bewest-aliases.json.save model.json ns-reports.json pump-session.json read_carb_ratios.json settings
cgm.ini monitor ns-reports.json.save raw-pump read_current_history_pages.json status.json
cgm-remote-monitor nightscout openaps.ini read_basal_profile_std.json read_insulin_sensitivities.json tz.ini
Tim Mecklem
@tmecklem
Sep 05 2016 23:32
same result with Carelink stick
I’ll try the dev branch of openaps and oref0
Brandon Faloona
@bfaloona
Sep 05 2016 23:35
@RussGG can you run openaps report show --cli oref0-predict/oref0.json, then run the command it returns
Russell Gardner
@RussGG
Sep 05 2016 23:36
@bfaloona ccgopenaps2 $ openaps report show --cli oref0-predict/oref0.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 719, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, 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-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/show.py", line 75, in main
print format_cli(device)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/show.py", line 16, in call
return self.format_cli(thing)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/show.py", line 19, in format_cli
usage = self.app.devices[report.fields.get('device')]
KeyError: 'determine-basal'
Brandon Faloona
@bfaloona
Sep 05 2016 23:36
@RussGG it's hard to read your ls entry above. Try using backticks and tripple backticks to show commands and console output.
It's complaining about determine-basal, so I would inspect devices and reports with that name.
Russell Gardner
@RussGG
Sep 05 2016 23:39
ccgopenaps2 $ ls
bewest-aliases.json last_four_pump_hours.json ns.ini pump.ini read_battery_status.json read_settings.json
bewest-aliases.json.save model.json ns-reports.json pump-session.json read_carb_ratios.json settings
cgm.ini monitor ns-reports.json.save raw-pump read_current_history_pages.json status.json
cgm-remote-monitor nightscout openaps.ini read_basal_profile_std.json read_insulin_sensitivities.json tz.ini
Ok I will run reports That have basal in them
Brandon Faloona
@bfaloona
Sep 05 2016 23:42
@RussGG well, it says that is actually a field name, not a report name. :(
Russell Gardner
@RussGG
Sep 05 2016 23:42
LOL!!! I don't want to see you with that face!!!!!
Brandon Faloona
@bfaloona
Sep 05 2016 23:43
no worries! :wink:
Russell Gardner
@RussGG
Sep 05 2016 23:44
@bfaloona pi@raspberrypi:~/ccgopenaps2 $ cat raw-pump/temp-basal-status.json
{
"duration": 0,
"rate": 0.0,
"temp": "absolute"
I know you are saying it isn't a report issue but I did get a result on basal reort!
Eric Jensen
@elnjensen
Sep 05 2016 23:46
@RussGG Going all the way back to your initial error in trying to invoke this, one thing that's not clear early in the docs (though it gets explained later) is that when you have a report with a name like oref0-predict/oref0.json, the first part (before the slash) is actually a directory name, and the second part is a file within that directory. So if you haven't created the oref0-predict directory, you can't invoke that report. So do mkdir oref0-predict and then see what happens when you invoke. You may still get an error, but it might be a new one. :smile_cat:
Tim Mecklem
@tmecklem
Sep 05 2016 23:48
updated to openaps 0.1.6-dev and same result with iter_glucose
Eric Jensen
@elnjensen
Sep 05 2016 23:49
And to reinforce @bfaloona 's point, it's a lot easier to read your output if you format it a bit. If you have multi-line output (like from a ls command, then type three backticks (` but with no spaces between), then paste your output, then do three more. That gives nicely-formatted output like this:
pi@raspberrypi:~/openaps_ti $ cat monitor/pumphistory-zoned.json  |head
[
  {
    "_type": "TempBasalDuration", 
    "_description": "TempBasalDuration 2016-09-05T19:30:33 head[2], body[0] op[0x16]", 
    "timestamp": "2016-09-05T19:30:33-04:00", 
    "_body": "", 
    "_head": "1601", 
    "duration (min)": 30, 
    "_date": "a15e134510"
  },
Russell Gardner
@RussGG
Sep 05 2016 23:50
@elnjensen Wahoo I have the the directory now! No luck on invoking
Garrett Webb
@garetis
Sep 05 2016 23:51
Broad question: Is this GIT corruption, and is it now fixed?
pi@raspberrypi:~/openaps2 $ openaps use cgm iter_glucose 1
[
  {
    "trend_arrow": "FLAT",
    "system_time": "2016-09-05T23:27:13",
    "display_time": "2016-09-05T18:28:46",
    "glucose": 126
  }
]Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/openaps/openaps/cli/__init__.py", line 52, in __call__
    self.epilog( )
  File "/home/pi/openaps/bin/openaps-use", line 50, in epilog
    super(UseToolApp, self).epilog( )
  File "/home/pi/openaps/openaps/cli/__init__.py", line 75, in epilog
    self.create_git_commit( )
  File "/home/pi/openaps/openaps/cli/__init__.py", line 83, in create_git_commit
    if self.repo.is_dirty( ) or self.repo.index.diff(None):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/repo/base.py", line 606, in is_dirty
    len(self.git.diff('--cached', *default_args)):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 457, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 923, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 707, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 128
stderr: 'error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
fatal: loose object 6010bebfb57a87d12cd08248f180058aeb173c6a (stored in .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a) is corrupt'
pi@raspberrypi:~/openaps2 $ crontab -e
No modification made
pi@raspberrypi:~/openaps2 $ oref0-reset-git
Attempting to fix git corruption.  Please wait 15s.
error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
fatal: loose object 6010bebfb57a87d12cd08248f180058aeb173c6a (stored in .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a) is corrupt
Error: Could not find last valid commit; aborting.
oref0-fix-git-corruption: no process found
error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
error: object file .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a is empty
fatal: loose object 6010bebfb57a87d12cd08248f180058aeb173c6a (stored in .git/objects/60/10bebfb57a87d12cd08248f180058aeb173c6a) is corrupt
Saving backup to: /tmp/git-1473119315
Initialized empty Git repository in /home/pi/openaps2/.git/
[master (root-commit) 7e6c12e] initializing openaps 0.1.6-dev
 1 file changed, 212 insertions(+)
 create mode 100644 openaps.ini
pi@raspberrypi:~/openaps2 $
Eric Jensen
@elnjensen
Sep 05 2016 23:53
@RussGG What happens now when you invoke? May not work, since the determine-basal parts are really the key bit of the whole process - they need your current CGM data, history from the pump, pump basal settings, insulin on board, etc. So if you can't get that specific report working at an early stage, but can get some things working (e.g. you can pull some info from the pump into a report, and ditto some info from the CGM), you might consider just moving on to learn more about how all the different reports eventually get used together to allow the algorithm to calculate a new basal rate for you.
Russell Gardner
@RussGG
Sep 05 2016 23:55
test ~/ccgopenaps2 $ ls bewest-aliases.json model.json ns-reports.json.save raw-pump read_insulin_sensitivities.json bewest-aliases.json.save monitor openaps.ini read_basal_profile_std.json read_settings.json cgm.ini nightscout oref0-predict read_battery_status.json settings cgm-remote-monitor ns.ini pump.ini read_carb_ratios.json status.json last_four_pump_hours.json ns-reports.json pump-session.json read_current_history_pages.json tz.ini
Eric Jensen
@elnjensen
Sep 05 2016 23:55
Looks like that is wrapped in single backticks. Try three at start, and three at end.
(Singles are good for individual, inline commands though.)
(I tried and failed to show three in my example - wasn't sure how to get it to show them instead of just interpreting as formatting.)
Russell Gardner
@RussGG
Sep 05 2016 23:59
@elnjensen Thanks for the help. I am pulling glucose numbers from nightscout and can get them into reports and I'm also getting info from the pump into reports .
Test 2 bewest-aliases.json model.json ns-reports.json.save raw-pump read_insulin_sensitivities.json bewest-aliases.json.save monitor openaps.ini read_basal_profile_std.json read_settings.json cgm.ini nightscout oref0-predict read_battery_status.json settings