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

4th
Mar 2016
live4sw
@live4sw
Mar 04 2016 00:04
Quick question - which pi case do you guys use? I just got one of those laser etched cases but I don't like how the GPIO cable is just exposed to the air
Oskar Pearson
@oskarpearson
Mar 04 2016 00:34
@live4sw When Siobhan used a pi we used the official Raspberry pi case
Not perfect, but ok, I think
Matthias
@ceben80
Mar 04 2016 05:50
:clap:
schulzedj
@schulzedj
Mar 04 2016 06:18
So I'm getting the blank white screen with opening up my nightscout azure web browser...
Has anyone else experienced this with a dexcom share2 and an IOS device?
schulzedj
@schulzedj
Mar 04 2016 07:30
How do you paste pictures in this window?
Matthias
@ceben80
Mar 04 2016 07:34
Use the windows snipping tool....paste it here with ctrl+v :+1:
schulzedj
@schulzedj
Mar 04 2016 07:40
If only that actually worked on my end...paste does not show up as an option
Jim Matheson
@jmatheson
Mar 04 2016 07:42
if you have the image saved on your desktop you can click drag the icon into this window
Dana Lewis
@danamlewis
Mar 04 2016 07:54
@schulzedj Gitter is a pain for images. Per @jmatheson , save as screenshot and then drag into gitter and it'll appear for you. If on mobile device, stick it in Dropbox or the like and paste the link in here.
Julia Schober
@julza78
Mar 04 2016 08:44
Am I #38?
Scott Leibrand
@scottleibrand
Mar 04 2016 14:37
Or do we have 39 now? :-) Did you fill out Dana's form?
Milos Kozak
@MilosKozak
Mar 04 2016 14:37
Where is the form?
Scott Leibrand
@scottleibrand
Mar 04 2016 14:39
Linked from openaps/docs, towards the end.
Matthias
@ceben80
Mar 04 2016 14:39

@/all

https://github.com/zymbit/rpi-mkimg

I’ve found this script on github, which creates an image from a Raspberry Pi SD card
It shrinks the image at a small size.

To test the script, I made an image of a 16 GB SD card which has been successfully shrinked to 1.8 GB. Restoring this 1.8 GB image to a smaller SD card (8 GB) works great.

Julia Schober
@julza78
Mar 04 2016 14:39
yes i filled it in👍
Scott Leibrand
@scottleibrand
Mar 04 2016 14:41
@ceben80 awesome! Could you add that to the docs where it mentions backing up your SD card? Would be nice to speed up the process of writing backups to new SD cards.
Matthias
@ceben80
Mar 04 2016 14:44
A major challenge for me, didn't add anything to whatever in github :confused:
easy ^^ just fill in your changes give it a name and press green button :*
Matthias
@ceben80
Mar 04 2016 14:52
@LadyViktoria thx, will try it, but currently very busy
LadyViktoria
@LadyViktoria
Mar 04 2016 14:52
ich mach auch mal feierabend... schönes wochenende :*
Scott Leibrand
@scottleibrand
Mar 04 2016 14:53
For more detailed walkthrough of how to make edits, see: https://github.com/openaps/docs/blob/dev/docs/Resources/my-first-pr.md
it's pretty easy. :-)
Matthias
@ceben80
Mar 04 2016 14:56
:+1:
schulzedj
@schulzedj
Mar 04 2016 15:15
@danamlewis - walked through the NS steps last night and I'm not clear where exactly the data is being pulled from. I have the gitter set up with the source code, I created the sandbox (though at this point I don't think anything is in there) and then there's the bridge.
There seems to be a bit of a gap in the docs as it rela
schulzedj
@schulzedj
Mar 04 2016 15:21
Relates to the connection stream- can I have both Mongo and the Bridge in there? Do I need to do anything special on my actual Share2 app? http://www.nightscout.info/wiki/welcome/nightscout-with-ios-and-dexcom-share
fallon225
@fallon225
Mar 04 2016 15:51
We haven't filled out the form yet. Form says 3 days, so it's still sitting open, haven't submitted it yet.
live4sw
@live4sw
Mar 04 2016 15:59
Hey - was getting this error after doing retry-loop
pi@raspberrypi:~/myopenaps1 $ openaps retry-loop
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 907, in <module>
    stick.open( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 869, in open
    log.info('%s' % self.product_info( ))
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 510, in product_info
    return self.query(ProductInfo)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 504, in query
    return self.process( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 491, in process
    ack, response = self.command.respond(raw)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 66, in respond
    raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:

^CTraceback (most recent call last):
  File "/usr/local/bin/openaps", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.10', 'openaps')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 724, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1650, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps", line 168, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps", line 154, in run
    builtins.dispatch(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/builtins.py", line 48, in dispatch
    get_alias(args.command, app)(args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/builtins.py", line 34, in __call__
    exit(call(cmd + args.args))
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1384, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
Unplugged and replugged the carelink stick and now it's working again, but any thoughts?
Maybe bad stick?
Matthias
@ceben80
Mar 04 2016 16:05

@scottleibrand regarding the mkimg.sh script above, the advantage is not necessarily the speed.

But creating an image with windows using Win32Imager will always create an image which is as large as the card and it can happen that it's not possible to restore an image on a new card with the same size. Happened yesterday, a message comes up like “SD card is to small”.

Due to the shrinking process the huge image will become very small and fits to a smaller new card.

Currently I'm shrinking a 32 GB sd card to approximately 1.9 GB – awesome.
I restored this 1.9 GB on a new 16 GB card (originaly comes from a 32 GB) - it works.

Scott Leibrand
@scottleibrand
Mar 04 2016 16:05
That's typical. You need to add oref0-reset-usb to your preflight if it and mm-stick warmup both fail.
@ceben80 yeah, but it should also be 4x as fast to write a 2GB image as an 8GB one, right?
i experimented with truncating images to make them smaller, but that requires first compacting everything so no data is in the part you truncate off.
Matthias
@ceben80
Mar 04 2016 16:07
probably yes :wink:
Scott Leibrand
@scottleibrand
Mar 04 2016 16:08
That will be especially helpful with my 32GB SD cards. ;-)
Matthias
@ceben80
Mar 04 2016 16:08
shrinking a 32 GB card to 1.9 GB - awesome
Dana Lewis
@danamlewis
Mar 04 2016 16:19
@julza78 Yes you are included in the official count :)
@schulzedj Ok. Tagging @eyim Or @logichammer who have more recently gone through NS setup and may have some pointers
live4sw
@live4sw
Mar 04 2016 16:21
@scottleibrand oh that's strange, I thought I already had my preflight set up for that:
preflight = ! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json 2>/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || (sudo oref0-reset-usb && echo PREFLIGHT SLEEP && sleep 120); echo PREFLIGHT FAIL; exit 1)"
Scott Leibrand
@scottleibrand
Mar 04 2016 16:55
That logic looks a bit off. Might work, but you'll need to test it manually next time it happens. But your sleep 120 will only ever trigger if you reset USB, for one thing...
eyim
@eyim
Mar 04 2016 17:19
@schulzedj Happy to help
Rachel Sandlain
@audiefile
Mar 04 2016 17:24
@schulzedj try the cgm in the cloud Facebook group for help setting up a nightscout site or the basics on features. There are a ton of resources there. To answer your question, yes you should have both mongo and share login in your azure site. Blank white screen usually means there is a typo in your mongo connection string or github didn't deploy properly to azure.
live4sw
@live4sw
Mar 04 2016 17:26
Thanks scott - I think that is from the doc but clearly I don't understand the logic well enough. I am going to spend some time with bash basics and figure out what i'm doing wrong.
live4sw
@live4sw
Mar 04 2016 18:11

Ok, so two things - first, the code from above is the same code in the doc, so if there's an issue with it we'd probably want to edit the doc.

Second, so in plain english, I read the logic as remove old clock.json, if that works invoke clock.json, if that command succeeds, check clock.json to make sure there's a T in it, then display PREFLIGHT OK.

If any of those commands don't execute, check to see if there's a stick there, if not, reset the usb ports, then display PREFLIGHT SLEEP, then sleep for 2 minutes. After that is done, display PREFLIGHT FAIL and exit with code 1, which will cause the loop alias to break out and display No CGM Data

which is not always accurate since it's really caused by anything that causes the sequence to break. it's also not clear to me why it sleeps 120 seconds after resetting the USB ports, maybe that is to give the ports time to reset? Or maybe it's to give another pi a chance to loop if there's an issue, in which case I guess we'd want to make sure that you sleep 120 for any error, not just when you reset USB
live4sw
@live4sw
Mar 04 2016 18:17
But, it does seem to at least work where it matters, which is that if there's any problem initially, check for a working stick, and if there's an issue, cycle USB and then it will just try again at the next 5 minute mark
Scott Leibrand
@scottleibrand
Mar 04 2016 18:34
You're exactly right: the 120s sleep should be on any preflight fail, not on reset-usb.
And I think the rest of your interpretation is correct too, so not sure why you had to manually reseat it.
Milos Kozak
@MilosKozak
Mar 04 2016 19:41
@scottleibrand @danamlewis sorry i didn't found the link where to register .... we're on day #1 :)
(and for anyone else who is looping consistently, i.e. 3+ nights, please fill that out! if you want to be anonymous, that’s fine. and you can also email me at dana@openaps.org if you prefer instead)
Milos Kozak
@MilosKozak
Mar 04 2016 19:45
:+1: still tuning sw on android but running :)
Dana Lewis
@danamlewis
Mar 04 2016 19:53
:)
Rachel Sandlain
@audiefile
Mar 04 2016 19:54
@MilosKozak I find the tuning is perpetual. :smile: New things to play with are being developed constantly!
Milos Kozak
@MilosKozak
Mar 04 2016 19:57
heh things are much easier on pure linux. android does too much unwanted operations :D
Mark Wilson
@mddub
Mar 04 2016 20:06
@jasoncalabrese @jmatheson @danamlewis @scottleibrand i just pushed a new version of the urchin watchface which reduces the font size of the time to fit the height of the container. based on your photos it seemed to be a fairly universal need
(see new tests at bottom of http://barber-lilita-24405.bitballoon.com/)
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:14
nice
Dana Lewis
@danamlewis
Mar 04 2016 20:14
neat @mddub !
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:18
installed, looks good, an extra pixel or 2 of padding might be good
growing the font size of BG/status based on the available height would be a good extension
I want to get OpenAPS IOB and expected bg there, wondering what the best way to do that is, if it's coming from device status it would be time sensitive
congratulations @MilosKozak
Mark Wilson
@mddub
Mar 04 2016 20:23
@jasoncalabrese i'm 90% done with an openaps status option, just doing some final testing with my own setup
i prepend recency in minutes to the beginning of the status, and compare the timestamps in the most recent devicestatus with the created_at of the second most recent to decide if it ran
so as long as your status is updating every minute, you'd know the timing
that said, i haven't found it that bad generating a text summary from my loop which includes the time
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:28
nice
Mark Wilson
@mddub
Mar 04 2016 20:28
let me know if you have any ideas, i'm basically doing a stripped-down version of the openaps plugin
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:28
what about multiple status lines? would that fit with how things are setup?
Mark Wilson
@mddub
Mar 04 2016 20:29
like a second layout element which also has status text?
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:29
just like the current status bar
but allow multiple
Mark Wilson
@mddub
Mar 04 2016 20:30
yeah, been thinking about doing that for a while, will probably add it eventually but not anytime soon
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:30
in my case Uploader battery, Dexcom raw + IOB and temp - OpenAPS would be great
Mark Wilson
@mddub
Mar 04 2016 20:31
so, multiple elements in different areas of the screen showing different statuses is a lot of work, but making the current status bar able to include multiple choices separated by newlines wouldn't be that bad
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:32
uploader battery isn't so needed for me, but I do like having raw and iob
had NS iob before
Mark Wilson
@mddub
Mar 04 2016 20:33
yeah, makes sense to be able to show more than just one
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:34
a single area that would grow in lines as needed with some combination of these calculated fields
Mark Wilson
@mddub
Mar 04 2016 20:35
growing with content would be nice but i don't think it's worth the work
live4sw
@live4sw
Mar 04 2016 20:35

@scottleibrand It sounds to me like the only necessary change is to change:

$ openaps alias add preflight '! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json 2>/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || (sudo oref0-reset-usb && echo PREFLIGHT SLEEP && sleep 120); echo PREFLIGHT FAIL; exit 1)"'

to

$ openaps alias add preflight '! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json 2>/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || sudo oref0-reset-usb; echo PREFLIGHT FAIL; sleep 120; exit 1)"'

This is a little confusing since there must have been some reason for the prior PREFLIGHT SLEEP-related language in the docs, maybe @danamlewis has some idea? But if that makes sense to you I will submit the change.

Mark Wilson
@mddub
Mar 04 2016 20:35
i've tried to make every status option (except custom text/url) fit on one line, so you'd know how many lines you need if you've chosen multiple
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:35
one thing I had to deal with for the pill was multiple rigs, so I couldn't just use the last status
Mark Wilson
@mddub
Mar 04 2016 20:36
oh, hmm
i guess a few people are doing that now, huh
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:37
so the rig under the bed uploads sometimes during the day, every 20mins in my case
but hasn't seen the pump since morning
maybe we expose that from NS?
Screenshot 2016-03-04 12.38.44.png
indy-e3 is at school, e1 and e2 are waiting at home
Mark Wilson
@mddub
Mar 04 2016 20:41
would the pill show waiting if the e1 update were the most recent?
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:42
no, would use the better looping/enacted status
Mark Wilson
@mddub
Mar 04 2016 20:42
ah, so you look for any success in the last prefs.warn / 2 minutes
for suggested and enacted
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:42
yeah
so 15m by default
so if I see the ⌁ I know some rig set or canceled a temp in the last 15m
the freqs aren't so useful, but the rssis help sometimes
Mark Wilson
@mddub
Mar 04 2016 20:45
so to support multiple rigs, instead of last status, last status with suggested in past 15 minutes should be a reasonable approximation
but go any deeper and you should probably just generate your own summary anyway
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:47
yeah, that should work
the pill is using most recent and I think is looking at the last 6 hours, but thats a little much
Mark Wilson
@mddub
Mar 04 2016 20:48
yeah, i'm just caching the last 2 hours
i think as a single-rig user i'd have an issue where if i had a successful run 15 minutes ago and then the last 2 loops since then failed to complete but uploaded, i'd keep seeing the successful run
so i'd assume the rig went offline
Scott Leibrand
@scottleibrand
Mar 04 2016 20:50
@live4sw sounds like you're on the right track. I do this: openaps alias add preflight '! bash -c "rm -f monitor/clock.json && echo -n \"PREFLIGHT \" && openaps report invoke monitor/clock.json 2>/dev/null >/dev/null && grep -q T monitor/clock.json && echo OK || ( ( mm-stick warmup 2>&1 || sudo oref0-reset-usb ) | egrep -v \"^ \"; echo FAIL; openaps get-bg; sleep 120; exit 1 )"'
Mark Wilson
@mddub
Mar 04 2016 20:53
i guess i could split it by device like you do
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:53
thats why I watch the last loop time, if is more than 15m since a suggest or enact something isn't right, but I don't get an alert till 30m
if we exposed generic properties you'd have access to any plugin
but would probably need extra formatting layout unless we add something else for NS plugins
Mark Wilson
@mddub
Mar 04 2016 20:55
yeah, would love to grab this all from the api
Jason Calabrese
@jasoncalabrese
Mar 04 2016 20:57
even with /api/v2/properties you'd have to do some formatting I think
I think I could make a dumb initial version of that pretty quicky
but whenever I start thinking of it and consider all the possible uses and options it gets really complicated
Mark Wilson
@mddub
Mar 04 2016 21:01
yeah, and at the end of the day, v1 is still good enough
live4sw
@live4sw
Mar 04 2016 21:09
@scottleibrand I will submit a revision with my changed language. Is there anything additional that your version does that's worth adding to the docs?
Scott Leibrand
@scottleibrand
Mar 04 2016 21:10
don't think so, for carelink anyway
live4sw
@live4sw
Mar 04 2016 21:13
great, submitted