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

17th
Mar 2019
boc-the-git
@boc-the-git
Mar 17 01:14

Sorry @elodaille01 I've not read all your messages - and am not an expert - but are you running the latest version of dev? You could check by running cd /root/src/oref0/ && git status

The errors you're seeing look very similar to what myself and several others were experiencing about 10 days ago (that got fixed)

Jon Cluck
@cluckj
Mar 17 01:22
looks like your jq is out of date, can you run apt-get -y -t jessie-backports install jq
jaylagorio
@jaylagorio
Mar 17 01:46
I come bearing sad news. After several attempts to follow the directions to restart a sensor while skipping the two hour warmup period and still using OpenAPS with the touchscreen receiver it appears Dexcom has closed the hole that lets us do that. With the non-touchscreen receivers you would wait until you were between readings, do a quick stop/start, and then put the receiver in the microwave or an RF blocking bag. OpenAPS would continue chugging along with either your Dexcom app or xdrip-js, and two hours later you take the receiver out of the microwave or RF bag. The transmitter gets the stop/start with the start message tagged as two hours ago, and all told you only lose 10 - 15 minutes of readings. Dexcom fixed this in the touchscreen receivers. The receiver tracks when the start message is actually sent to the transmitter successfully, not just when you do the stop/start, and timestamps it with the time it actually sends it. Now you're back to waiting two hours.
zasteph
@zasteph
Mar 17 02:55

trying to setup a spare rig on pi with a hat.
in the oref0 setup, G4-load is not supported anymore, even though it is still listed:

"What kind of CGM would you like to configure?: G4-upload
Unsupported CGM. CGM=G4-upload has been replaced by CGM=G4-go (default). Please change your CGM in oref0-runagain.sh

What kind of CGM would you like to configure?: G4-Go
Ok, G4-Go it is.

If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)"

My I don't know what Share is, I think my CGM does not have Share; how do I skip this step then? Thank you.

Scott Leibrand
@scottleibrand
Mar 17 05:19
Just press enter.
elodaille01
@elodaille01
Mar 17 07:02
@boc-the-git ....thank you for your reply !! yes I installed dev branch..what should I do to fix it please ?
@cluckj ty, I will try.. ;-)
elodaille01
@elodaille01
Mar 17 07:13
@cluckj current version is 'jq-1.5-1-a5b5cbe now'..but still the same issue
Stargazer32584
@Stargazer32584
Mar 17 13:40

Hi guys,

today, i changed the I2C OLED on the Explorer HAT. The soldering was fine. The rig runs perfect, but the display ist black. It is the same as the original 0.96 inch OLED. On the backside of the display, the resistor is on 0x78 adress, like the original. I installed the branch from @cluckj, the x12-fix, and now, i wait for the pump to test it. But the display should work without the pump. The "HAT display updatet" - message is in the loop.

Thanks a lot..

zasteph
@zasteph
Mar 17 13:47
@scottleibrand pressing enter will display the same message over and over...

What kind of CGM would you like to configure?: G4-Go
Ok, G4-Go it is.

If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)
If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)
If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)
If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)

ok, I convinced it :)

What kind of CGM would you like to configure?: G4-upload
Unsupported CGM. CGM=G4-upload has been replaced by CGM=G4-go (default). Please change your CGM in oref0-runagain.sh

What kind of CGM would you like to configure?: G4-upload
Unsupported CGM. CGM=G4-upload has been replaced by CGM=G4-go (default). Please change your CGM in oref0-runagain.sh

Override validation and use "G4-upload"? y/[N] y
Ok, G4-upload it is.

Explorer Board HAT detected.
Would you like to [D]ownload released precompiled Go pump communication library or install an [U]nofficial (possibly untested) version.[D]/U

what should I pick here, please, now that I entered G4-upload?
Jon Cluck
@cluckj
Mar 17 14:33
download should be fine
Jon Cluck
@cluckj
Mar 17 14:39
@Stargazer32584 can you check to see if the i2c connection is working? you'll need to install i2c-tools, then i2cdetect -y 1
Stargazer32584
@Stargazer32584
Mar 17 15:04
@cluckj the 'i2ctetect -y 1' don't find the adress of the display. At first, i done 'i2c-tools'. Then reboot.
The display was the same as the original. In the past, there was an problem with the SCL and SCA labeling. They was inverted. But...the labels was the same as the original.
Jon Cluck
@cluckj
Mar 17 15:05
what does it show?
should be this, if everything's connected properly:
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Stargazer32584
@Stargazer32584
Mar 17 15:15
And there seems to be the problem. He detects nothing. There are no numbers or signs.
Jon Cluck
@cluckj
Mar 17 15:16
yeah, runi2cdetect -l to see if it's somehow on another bus?
should say i2c-1 i2c bcm2835 I2C adapter I2C adapter
Stargazer32584
@Stargazer32584
Mar 17 15:22

So...the 'i2cdetect -l' gives the following back:

i2c-1 i2c bcm2835 I2C adapter I2C adapter

Jon Cluck
@cluckj
Mar 17 15:40
the i2cdetect -y 1 didn't even show 48?
Stargazer32584
@Stargazer32584
Mar 17 15:44
No...same as the first detect..
Jon Cluck
@cluckj
Mar 17 15:47
that's not a good sign, when the screen (3c) is broken, the battery monitor (48) is usually still there
Stargazer32584
@Stargazer32584
Mar 17 15:49
Is the battery monitor to the xdrip site also affected ? Or is it still on the display ?
Jon Cluck
@cluckj
Mar 17 15:52
if it's not showing the device, it can't get the battery voltage
Stargazer32584
@Stargazer32584
Mar 17 15:54
If the screen doesn't work, the battery voltage sensor also won't work ?
Jon Cluck
@cluckj
Mar 17 15:57
it'll work if it's just the screen that's not showing up in i2cdetect, but it's saying that both your screen and battery monitor aren't being detected
Eric
@ecc1
Mar 17 16:20
if the new device is wired wrong, it could be interfering with SDA and SCL for all the I2C devices
I'd disconnect those 2 lines and see if the ADC reappears
Stargazer32584
@Stargazer32584
Mar 17 16:23
@ecc1 , @cluckj If is disconnect the SCL and SDA, the scan give me a '48'back.
Eric
@ecc1
Mar 17 16:23
bingo
Jon Cluck
@cluckj
Mar 17 16:25
^
Stargazer32584
@Stargazer32584
Mar 17 16:26
If i connect the display with right connection, the '48' disappears. If i change SCL and SDA, the '48' is also away..
I soldered the display as a plug-in connection.
But how can i wired the display right ?
Eric
@ecc1
Mar 17 16:29
I would say this proves it's not the right connection. Not sure, but I'd google for all the examples people have of hooking them up, and see if there are a couple of common pinout variations out there
Jon Cluck
@cluckj
Mar 17 16:30
you may have burned a trace on the HAT?
Stargazer32584
@Stargazer32584
Mar 17 16:33
I don't think and see a burned trace on the HAT. But in these little "world", this is without guarantee.
Eric
@ecc1
Mar 17 16:36
Do you have access to an oscilloscope?
Stargazer32584
@Stargazer32584
Mar 17 16:50
@ecc1 Unfortunately not...
Eric
@ecc1
Mar 17 16:52
can you post a clear photo of your OLED module?
Eric
@ecc1
Mar 17 17:07
do you have a breadboard and jumper wires so you can experiment without soldering it to the hat?
Stargazer32584
@Stargazer32584
Mar 17 17:13
Yes..i have..
Eric
@ecc1
Mar 17 17:15
I would try jumpers from the Pi's 3.3V, ground, SCA and SCL pins to the display and see if it works when it's off the HAT
Stargazer32584
@Stargazer32584
Mar 17 17:24
Okay...what should i do ?
Eric
@ecc1
Mar 17 17:33
I'd remove the HAT (or use another Pi if you have one) and just connect jumpers to those GPIO pins -- see https://pinout.xyz/
My other rule of thumb: always order at least 2 of everything when buying from random Chinese suppliers
Stargazer32584
@Stargazer32584
Mar 17 17:51
@ecc1 I tested the configuration directly on the I2C-Bus on a RPi 2. Now, he detects the display wit '3c'..
Eric
@ecc1
Mar 17 17:56
OK, so it sounds like something is wrong with the connection on the HAT, probably a bad trace like @cluckj suggested. When the display is attached to the HAT, can you test continuity (with a multimeter) between its 4 pins and the corresponding GPIO pins (with the battery / USB disconnected!)
You might be able to work around a broken trace by soldering a wire. But the fact that it affected the other I2C device makes me think something's shorted, not open. Check again for any chance of solder bridges
Stargazer32584
@Stargazer32584
Mar 17 18:02
I connected the display to the HAT and connect the multimeter on the 4 pins on the top of the display. On every contact, there is a value.
Eric
@ecc1
Mar 17 18:07
Make sure the power is off, battery not connected. Then check using the Ohms setting to make sure there is very low resistance between, for example, the SDA pin on the display and the corresponding Pi GPIO pin. Repeat for each of the 4 pins
Stargazer32584
@Stargazer32584
Mar 17 18:45
Okay...i will do this.
I tried the display directly on the Pi Zero. Runs perfectly without the HAT. So...the error must be on the HAT. I will measure the resistence. I will notice the result and post it here..
Stargazer32584
@Stargazer32584
Mar 17 19:26

Okay....everything is alright. There was a little, little,little tiny contact on one pin. I fix it with a toothpick an now...the display is online. Thanks to you all for your great support !!!

Tomorrow, i will interact with the pump again.

Eric
@ecc1
Mar 17 19:38
Great!
Abigail Cember
@acember
Mar 17 20:42
@scottleibrand (#carb_absorption) I'm talking about the latter: the calculation of how many carbs are on board (although I guess giving it some estimate up front would amount to the same thing.) I've just had a few situations where the rig thinks I still have carbs on board where very clearly I have digested everything already , then it keeps giving me insulin where it otherwise wouldn't and I go low. It seems to use the assumption that the more you eat, the longer it takes for stuff to go in. But I personally don't find that to be true: I can eat one bowl of cereal or two bowls of cereal, and the carbs will hit me right away in both cases and be gone equally fast.
I can right a whole essay about my observations of carbohydrate metabolism, but I'm going to restrain myself and instead go work on my BT issue :)
@cluckj Did you mean update oref0?
Jon Cluck
@cluckj
Mar 17 20:52
yeah
Abigail Cember
@acember
Mar 17 20:59
Not for a while... and I'm currently trying to figure out how to get to the bottom of the network log 😒
Found it!
Jon Cluck
@cluckj
Mar 17 21:04
anything interesting there?
Abigail Cember
@acember
Mar 17 21:11
Yes! I didn't have hotspot enabled in preferences...but I'm not sure that was the problem(?). Still investigating here...
Jon Cluck
@cluckj
Mar 17 21:12
idk if hotspot is what you want? that turns on a wifi access point that you can connect to with your phone in case your rig can't get onto either bluetooth or wifi
Abigail Cember
@acember
Mar 17 21:13
Oh, no...that isn't what I need.
It tells me that Bluetooth PAN is not connected -- which I knew, but isn't this what's supposed to happen automatically when wifi is dropped? (I purposely turned wifi off using that iwconfig command from the docs page about BT tethering).
Jon Cluck
@cluckj
Mar 17 21:17
I was hoping for some enlightening error messages :laughing:
I'm not familiar enough with the auto-connect code to know how to debug it :\
Eric
@ecc1
Mar 17 21:20
light it on fire and switch to network-manager ?
Abigail Cember
@acember
Mar 17 21:20
Maybe this:
No BT MAC provided: not activating local-only hotspot
Jon Cluck
@cluckj
Mar 17 21:20
lol
that might be it
Abigail Cember
@acember
Mar 17 21:21
@ecc1 Is "lighting it on fire" some kind of CS or IT slang that I don't know? :P
Jon Cluck
@cluckj
Mar 17 21:21
see if your bluetooth MAC is in preferences.json? and maybe .bash_profile and crontab?
Abigail Cember
@acember
Mar 17 21:21
What's network-manager?
OK, what variable should it be under in preferences?
Jon Cluck
@cluckj
Mar 17 21:21
BT_MAC?
network-manager is the reason I have no idea how the oref0-online stuff works :o
Eric
@ecc1
Mar 17 21:24
@acember just a geeky way of disparaging some piece of technology. see also "kill it with fire" and "nuke it from orbit" :-)
Jon Cluck
@cluckj
Mar 17 21:24
"fire it into the sun" is my fav
Abigail Cember
@acember
Mar 17 21:25
Nerds. Should I worry about what color the text editor wants to make my IP address? It's treating colons as special characters...
Jon Cluck
@cluckj
Mar 17 21:31
should be fine as long as the whole thing is contained in quotes
Abigail Cember
@acember
Mar 17 21:43
It stills says that no BT MAC is provided 😢
But when I go to bluetoothctl it's there.
Jon Cluck
@cluckj
Mar 17 21:46
can you check ~/.bash_profile for it?
I think the only place it's stored is in preferences, but I'm not entirely sure
Abigail Cember
@acember
Mar 17 21:48
not there!
Abigail Cember
@acember
Mar 17 22:02
But it sounds like it isn't necessarily supposed to be..
If there's a way to synchronize the clock with no ethernet, no wifi, and no ssh access, that's what I'm after here (if not for the clock issue, I'm happy looping offline by plugging in the receiver). Right now if I pick my rig up and go, say, to Starbucks, I can plug it in there but it will never start looping because the clock has been unsynchronized -- hence the need for BT.
Abigail Cember
@acember
Mar 17 22:09
Is there a reason the rig clock can't be set from a plugged in receiver?
Raymond Richmond
@PedanticAvenger
Mar 17 22:15
If you can grab a timestamp from an incoming piece of data possibly but I don't recall seeing any direct call to query the clock on a receiver.
Scott Leibrand
@scottleibrand
Mar 17 22:31
Rig clock is supposed to get set from the pump clock if you’re offline and don’t have NTP.
We elected not to pull clock from receiver because everyone has a different CGM setup.
@acember we don’t assume a fixed rate of carbs/hr or anything like that. Instead, we observe how much your BG rises (or fails to fall) relative to what it should do based solely on insulin activity. Then we convert the total mg/dL of excess positive deviations into grams of carbs using your carb ratio.
Scott Leibrand
@scottleibrand
Mar 17 22:38
@acember do you have UAM enabled? If not, you should turn that on: it provides a second opinion as COB starts to decay about how much to dose, and should help with avoiding too much insulin when BG isn’t rising from disappearing carbs.
If you already have that enabled, and you’re doing something that tends to cause carbs to disappear, like physical activity, you can set a high target to inform oref0 about that.
tekkushi
@tekkushi
Mar 17 22:49
@acember does the rig connect to bluetooth when is it turn on and the bluetooth tethering is turnesd on??