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

13th
Jan 2019
Boris and Kayley Raskin
@boryanvbu
Jan 13 05:35
Hi, I am unable to get an Explorer Board with Edison to run offline. I am using a v1.3 2017 Explorer Board and plugging in a fully charged Dexcom G5 non-touch receiver directly into the rig using an OTG cable (host side into rig) and a battery pack to the UART port. OpenAPS stops running after I disconnect it from wi-fi. When I reconnect and check the log, it says "No deliverAt found. {"reason":"If current system time ... is correct, then BG data is too old." I ran the setup script with G5-upload parameter. Can anyone think of what I may be missing? Thanks!
Scott Leibrand
@scottleibrand
Jan 13 06:54
Check cgm-loop.log
Boris and Kayley Raskin
@boryanvbu
Jan 13 07:51

@scottleibrand , thanks for getting back to me. When I looked at the cgm-loop.log going back to the time when I was not connected to wi-fi, I see the following:

Sun Jan 13 00:12:01 EST 2019
dexcom_reader.constants.CrcError: Could not parse EGVRecord
100 2019-01-12T23:56:19-05:00
Sun Jan 13 00:13:02 EST 2019
dexcom_reader.constants.CrcError: Could not parse EGVRecord
100 2019-01-12T23:56:19-05:00
Sun Jan 13 00:14:01 EST 2019
dexcom_reader.constants.CrcError: Could not parse EGVRecord
100 2019-01-12T23:56:19-05:00
Sun Jan 13 00:15:01 EST 2019
AttributeError: 'NoneType' object has no attribute 'iter_records'
100 2019-01-12T23:56:19-05:00
Sun Jan 13 00:16:02 EST 2019
AttributeError: 'NoneType' object has no attribute 'iter_records'
100 2019-01-12T23:56:19-05:00
Sun Jan 13 00:17:02 EST 2019
AttributeError: 'NoneType' object has no attribute 'iter_records'
100 2019-01-12T23:56:19-05:00

I think when it is actually on wifi the following gets written to the log

Sun Jan 13 01:48:01 EST 2019
CGM Data  mins ago is fresh (< 5.1), waiting  mins for new data
finished waiting, let's get some CGM Data
cgm://JSON/oref0_glucose/monitor/glucose-oref0.json
Sun Jan 13 01:49:02 EST 2019
CGM Data  mins ago is fresh (< 5.1), waiting  mins for new data
finished waiting, let's get some CGM Data
cgm://JSON/oref0_glucose/monitor/glucose-oref0.json
Teamhrach
@Teamhrach
Jan 13 08:56

Hi, even after a dozen or so attempts I have not succeeded in getting the Pi rig set up and looping. After full installation, when I type ‘ls’ I get errors as follows;

Updating HAT Display...
Could not parse profile.json: { Error: ENOENT: no such file or directory, open '/root/myopenaps/settings/profile.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.<anonymous> (/root/src/openaps-menu/scripts/status.js:45:33)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/root/myopenaps/settings/profile.json' }

I watch the log during installation and noted that after executing the cd ~/src/oref0 && git checkout dev command it logged as follows;

(node:3856) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN package.json crypto@0.0.3 crypto is also the name of a node core module.
npm WARN package.json crypto@0.0.3 No license field.
npm WARN package.json json@9.0.6 No license field.
npm WARN package.json share2nightscout-bridge@0.1.6 license should be a valid SPDX license expression
npm ERR! fetch failed https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/request/-/request-2.87.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/qs/-/qs-6.5.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/verror/-/verror-1.10.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz

Does this give a clue to where the problem is or does anyone have any other suggestions?

renegadeandy
@renegadeandy
Jan 13 09:46
Hi all. I want to setup offline looping, but the local xdripaps is giving me an unauthorised error in my xdrip uploaded.
I believe it uses API_SECRET
for me this is a token and is in my rigs bash_profile, however when I try to add my rigs base url of http://token=mytokenstuffherr@myrigsbtip:5000/api/v1 I'm getting a 401 unauthorised. Any ideas why?
About to board a 10 hour flight... Would love to fix it before that happens...!
renegadeandy
@renegadeandy
Jan 13 11:00
I'm wondering if this is because xdripaps doesn't support tokens... I've tried adding another env variable and changed the python script accordingly
renegadeandy
@renegadeandy
Jan 13 11:09
Hmm, that hasn't worked either... So at this point I've commented out the return 401 to see if I can force it to go thru with no auth(I know I know before people start shouting at me)
jaylagorio
@jaylagorio
Jan 13 17:13
@boryanvbu The CRC error is what I was getting with a touchscreen device because the data it returns isn't what the current version expects. How new is the non-touchscreen receiver you have? The AttributeError is what I see when I don't have the receiver connected at all. If those errors are alternating maybe you have a bad USB or OTG cable in the mix? Trying to get a good combination of USB and OTG cables was a challenge for me, some USB cables only reliably supply power and the data is hit-or-miss or non-existent.
Boris and Kayley Raskin
@boryanvbu
Jan 13 17:28
@jaylagorio, the sticker on the back of the non-touchscreen receiver I was using says the mfg date is 2017-11-11 and model # LBL-010785 Rev006. Maybe offline looping is flaky with the newer firmware? Although, we have used this receiver offline successfully prior to a re-flash of the Edison. I have some older receivers (mfg date 2016-12-30 Rev006 and mfg date 2016-03-28 Rev05) that I can try.
Cables are brand new, so I think the OTG cable might have been unplugged when I was getting the AttributeErrors.
jaylagorio
@jaylagorio
Jan 13 17:31
On your receiver, go to Settings -> Device Info. What's the Part #, Part Rev, SW #, and SW Rev?
I have a 2017-09-15 device, Part #MT22719, Part Rev 15, SW #SW10617, SW Rev 4.0.1.059
jaylagorio
@jaylagorio
Jan 13 17:37
Also is the difference between it working or not really only being on wifi or not? Are you also using a cell phone to go from transmitter -> Dexcom App -> Dexcom Servers -> Nightscout using Share Bridge?
Boris and Kayley Raskin
@boryanvbu
Jan 13 17:37
@jaylagorio, my receiver is exactly the same as yours Part# MT22719, Part Rev: 015, SW# SW10617, SW Rev: 4.0.1.059.
My data flows from transmitter -> Spike on iOS -> Dexcom Servers -> Nightscout
jaylagorio
@jaylagorio
Jan 13 17:40
So that explains how you're getting good data on wifi. So does your cgm-loop.log file also have errors even when you're connected to wifi?
"Although, we have used this receiver offline successfully prior to a re-flash of the Edison." This is pretty strange to me. Maybe a bad install of the Dexcom_reader package or the openaps package? Those are the projects that govern whether data gets out of the Dexcom receiver correctly.
Boris and Kayley Raskin
@boryanvbu
Jan 13 17:45
I just checked the cgm-loop.log and it doesn't look like anything has been written to it since I reconnected to wifi last night.
Chris Heywood
@ChrisH187
Jan 13 17:48
Hi all, I seem to have completely lost comms between my rig and pump (722). I'm using OpenAPS with Libre/MiaoMiao to Xdrip+ and an Edison/Explorer board rig. The loop has been fine but now seems to get stuck when it tries to match the pump time, it can not reach the pump and as a result fails. I've tried a different rig which I know to be working (it worked on a friends pump immediately before the test) and this gave me the same problem. Mmtune returns constant -99. In addition this morning I got an A64 error, which appears to back up my thoughts that the pump is the problem. Is there another way of testing the pumps comms other than mmtune? I'm just trying to rule out any other possible cause before accepting that the pump is dead! Thanks, Chris.
Problem 5.PNG
jaylagorio
@jaylagorio
Jan 13 17:49
Huh. Yeah, sounds like something's weird with the installation. I used 0.7.0-dev yesterday and it seemed to work out fine.
Boris and Kayley Raskin
@boryanvbu
Jan 13 17:49
I've tried re-running the script several times already, will running "cd ~/src/oref0 && git checkout master && git pull && sudo npm install -g oref0" reinstall the Dexcom_reader package? Or you think I should switch to dev?
jaylagorio
@jaylagorio
Jan 13 17:51
I think oref0-setup is what installs openaps, is what installs Dexcom_reader. All things being equal you might consider switching to dev and then running oref0-setup and if that doesn't work you can switch back
Unless it doesn't work in only the same ways that it's not working now, and then you can stay on the latest because you haven't actually lost anything
Boris and Kayley Raskin
@boryanvbu
Jan 13 17:52
ok, I will try that. Thanks @jaylagorio
Ebgineer
@Ebgineer
Jan 13 17:52
@ChrisH187 Have you tried a new battery? If the battery is too low the pump will keep running but shut off radio communication to save power.
jaylagorio
@jaylagorio
Jan 13 17:53
@ChrisH187 Unfortunately the only mention of A64 error points directly at a comms issue https://www.reddit.com/r/diabetes/comments/7esecd/medtronic_a64_error/
Since the user is posting about a basic meter transmission and not something more complex like looping, I would imagine the radio's out
Chris Heywood
@ChrisH187
Jan 13 17:54
@Ebgineer Yes I changed it twice but unfortunately it made no difference.
jaylagorio
@jaylagorio
Jan 13 17:54
@Ebgineer I thought about that too, but have never gotten an error (other than a notice to change the battery) when the battery has gotten so low it shuts the radio off
Ebgineer
@Ebgineer
Jan 13 17:54
Yeah I'd have to agree the A64 is troubling.
jaylagorio
@jaylagorio
Jan 13 17:55
That's a real shame, I'm sorry
Chris Heywood
@ChrisH187
Jan 13 17:56
No other option then but to source a new pump? I take it there is no way of doing some sort of restore function?
jaylagorio
@jaylagorio
Jan 13 18:00
I don't know of a factory reset function, maybe someone else does? Perhaps leaving the battery out of the pump for 10 - 20 minutes might be enough? Honestly not sure.
Ebgineer
@Ebgineer
Jan 13 18:00
I haven't found a good description of A64 yet, so hard to say if it can be MacGyver'd to working condition.
Chris Heywood
@ChrisH187
Jan 13 18:01
@jaylagorio @Ebgineer Thanks. I'll try leaving the battery out as a last shot before looking for a new pump.
Ebgineer
@Ebgineer
Jan 13 18:28
Hm, seems that it is rather hard to find a list of all the medtronic pump alarm codes. Anyone have a link to such a reference?
Riko L
@Ricco555
Jan 13 19:27
Hi .. just switched to 0.7.0 .. but the radio on Explorer Board is dead it seams. the error on 0.6.2. was causing constant reboot, and now it says: Continuing oref0-pump-loop at Sun Jan 13 20:25:20 CET 2019
mmtune: radio_locale = WW
radio_locale=WW
2019/01/13 20:25:22 cannot connect to CC111x radio on /dev/spidev5.1
2019/01/13 20:25:22 cc111x: no response
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Chris Heywood
@ChrisH187
Jan 13 19:41
@Ebgineer @jaylagorio The battery trick didn't work.. Thanks for your help but it looks like my hunt for a new pump has started.
Evgeny Pakhomov
@eupakhomov
Jan 13 19:42
Riko L
@Ricco555
Jan 13 19:42
tried reflashing got This code is only tested on CC1110. Unsupported chip id = 0x00
maybe edison got nudged out of the board somehow, visually looks ok. could try to re-seat it, if anyone has better idea or experience with this let me know.
Evgeny Pakhomov
@eupakhomov
Jan 13 19:47
Might be the reason. You could try to use the build of ccprog I prepared when I had similar case with PI + Explorer HAT: https://github.com/eupakhomov/ccprog
but you will have to find GPIO pins mapping for Edison.
Probably 19,7,36.
Riko L
@Ricco555
Jan 13 19:48
@eupakhomov tried ./ccprog -p 19,7,36 erase -> that above was the error.
Evgeny Pakhomov
@eupakhomov
Jan 13 19:51
@Ricco555 above is the link to my custom build (including the check causing the error message removed - see Why this branch readme part). At least you will be able to get your chip state.
Dana Lewis
@danamlewis
Jan 13 20:02
Do try to reseat the board before trying more diagnostics, if you haven’t already reseated
Riko L
@Ricco555
Jan 13 20:07
will try reseating first. then @eupakhomov your build
Evgeny Pakhomov
@eupakhomov
Jan 13 20:49
@Ricco555 hopefully everything will work and no "then" needed.
Riko L
@Ricco555
Jan 13 22:42
@eupakhomov tried reseating, same thing. tried your ccprog: $ ./ccprog -p 19,7,36 reset
Using pins: DC=19, DD=7, RESET=36
This code is only tested on CC1110. Unsupported chip id = 0x00.
could not update FWT!
.. so I received the same message, also for commands status and write spi...hex. Is there any way to force edison to "refresh" /dev/spidev5.1 ? when I run openaps mmtune it throws exception configparser.DuplicateOptionError: While reading from './pump.ini' [line 4]: option 'radio_locale' in section 'device "pump"' already exists.
renegadeandy
@renegadeandy
Jan 13 23:58
my bluetooth pan appears to have completely stopped
my edison is not connecting to my phone at all
what should i try to do to fix it