Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 03 11:30

    efidoman on v2.1.6

    (compare)

  • Feb 03 11:27

    efidoman on master

    check for 8Jxxxx for new firmwa… Merge pull request #101 from xd… Merge pull request #102 from xd… (compare)

  • Feb 03 11:27
    efidoman closed #102
  • Feb 03 11:27
    efidoman opened #102
  • Feb 03 11:22

    efidoman on dev

    check for 8Jxxxx for new firmwa… Merge pull request #101 from xd… (compare)

  • Feb 03 11:22
    efidoman closed #101
  • Feb 03 11:21
    efidoman opened #101
  • Feb 03 11:21

    efidoman on 8Jxxxx

    check for 8Jxxxx for new firmwa… (compare)

  • Jan 20 11:27

    efidoman on master

    Create nodejs.yml Merge pull request #97 from xdr… add 8H to g6 new firmware tx ch… and 4 more (compare)

  • Jan 20 11:27
    efidoman closed #100
  • Jan 20 11:26
    efidoman opened #100
  • Jan 20 11:26

    efidoman on increase-timeouts

    (compare)

  • Jan 20 11:25

    efidoman on dev

    increase bt read-write timeout … Merge pull request #99 from xdr… (compare)

  • Jan 20 11:25
    efidoman closed #99
  • Jan 20 11:22
    efidoman opened #99
  • Jan 20 11:21

    efidoman on increase-timeouts

    increase bt read-write timeout … (compare)

  • Jan 06 18:00
    Ugitsisgv commented #87
  • Jan 06 17:46
    tynbendad commented #87
  • Jan 06 16:46
    Ugitsisgv commented #87
  • Jan 02 15:25

    efidoman on dev

    add 8H to g6 new firmware tx ch… Merge pull request #98 from xdr… (compare)

Vocylis
@Vocylis
Here is the log (last 100 lines) from the network log: http://dpaste.com/21G4NVC
fidoman
@efidoman
@Vocylis - Yes, you're right, still the same timeout problem. It hasn't proven to be any of the issues we've done troubleshooting on so far. However, I'd like to dig further into the bt-device because it did show the transmitter was paired when you ran it earlier. Usually the transmitter will not be paired unless it is in the few seconds while Logger is talking to it. Can you run the following commands and paste the results back here?
bt-device -l
bt-device -r DexcomJF
bt-device -r C1-C3-AE-D3-7A-36
bt-device -l
Vocylis
@Vocylis
@efidoman sure. I will check when I get home. Surprisingly, I'm noticing Logger notes showing up in my NS instance now. Maybe it corrected itself overnight after I changed the Bluetooth config. I'm not sure and will look into it more later.
Vocylis
@Vocylis
I didn't get home until late today. I will check in tomorrow.
Dave Cole
@Dave9111
Are there notes or docs regarding how to setup bluetooth on an OpenAPS Edison rig for logger/xdrip-js ?
Scott Leibrand
@scottleibrand
Just run setup.
Dave Cole
@Dave9111
Ok, then I'm already there. :-)
Vocylis
@Vocylis
Messages are now being passed to logger, but nightscout doesn't seem to be updating. From log:
2020-02-11T17:26:19.905Z transmitter Listening for transmitter 8JEAJF
messages passed to logger: [{"date":"1581375280000","type":"Backfill"}]
Here are the results of those commands @efidoman:
root@newcyborg:~# bt-device -l
Added devices:
Essential Phone (10:CD:B6:03:C3:16)
root@newcyborg:~# bt-device -r DexcomJF
Error: Device not found.
root@newcyborg:~# bt-device -r C1-C3-AE-D3-7A-36
Error: Device not found.
root@newcyborg:~# bt-device -l
Added devices:
Essential Phone (10:CD:B6:03:C3:16)
root@newcyborg:~#
thanksegon
@thanksegon
Hi, folks. I'm wondering if JS is able to run multiple rigs?
Scott Leibrand
@scottleibrand
Not unless you are willing to forego pairing a phone: there are only two channels that the G5/G6 transmitters can talk over.
thanksegon
@thanksegon
Scott, I would only need one rig to pair with a phone for BT internet. The others would be around my home using the wireless LAN. I'm hoping it's similar to today: three rigs but only one enacted, until I walk into the basement and then the rig down there enacts.
H
Scott Leibrand
@scottleibrand
Are you talking about rigs doing pump comms or CGM?
If you have one rig or phone uploading CGM data to NS, multiple rigs can use that for looping.
We have as many as 4 rigs going at once, with only one configured to use xdrip-js, and the others pulling from NS. The phone also uploads to Dexcom’s servers and NS pulls from there with the Share bridge.
PeetuHongisto
@PeetuHongisto
I reset my 81XXXX transmitter about 2 weeks ago, and now whet I start a new sensor it runs for a while and then goes to stopped mode. xdrip+ says tx expired... any ideas?
samueldemers2
@samueldemers2
@PeetuHongisto do you have the firmware number of your transmitter? Those finishing by .27 cannot be reset
PeetuHongisto
@PeetuHongisto
It's .25
fidoman
@efidoman
@Vocylis - Thanks for pasting the bt-device results. They show the results I would expect so that's not the issue. Are you still seeing the same timeout in the logs? If so, then the only suggestions I have left are here:
Try a different transmitter (if you have one). If this works, then the other tx has an issue, usually battery related.
Try a different rig (if you have one). If this works, then the other rig or it's install/configuration is likely the culprit.
If on an RPI, check the mode in /etc/bluetooth/main.conf. At least one user found that setting mode to Controller mode resolved the timeouts.
I think you have already tried the bluetooth controller mode change and that didn't help right?
Jesse van Leeuwen
@JesseLeeuwen

my brother had been looping for a while but the explorer HAT needed to be flashed while flashing we reinstalled the rig because a message we got while trying to flash and command like reboot were not working.

we set up the rig again and faced the same issues as @Vocylis with the Bluetooth, we fixed it by restarting the Bluetooth service with the controller in "le" mode
things seemed to work but after the warm-up period we got two error's

2020-02-14T22:39:23.218Z bluetooth-manager Tx 50050200534b00004775000000000000160085ff
2020-02-14T22:39:23.686Z backfill-parser data notification callback 01003d000000754c0000920006eca14d00008b00
2020-02-14T22:39:23.691Z backfill-parser backfillRequestCounter=61, unknown=0
2020-02-14T22:39:23.886Z backfill-parser data notification callback 020006efcd4e0000870006f2f94f0000830006f4
2020-02-14T22:39:24.681Z backfill-parser data notification callback 0300255100007c0006f451520000720006f27d53
2020-02-14T22:39:24.785Z backfill-parser data notification callback 040000006a0006f1a95400006a0006f4d5550000
2020-02-14T22:39:24.891Z backfill-parser data notification callback 0500700006fb015700006f0006fd2d5800006e00
2020-02-14T22:39:24.995Z backfill-parser data notification callback 060006fe595900006d0006fe855a00006d0006fe
2020-02-14T22:39:25.131Z backfill-parser data notification callback 0700b15b00006a0006fedd5c0000660006fc095e
2020-02-14T22:39:25.191Z backfill-parser data notification callback 08000000690006fe355f0000650006fd61600000
2020-02-14T22:39:25.265Z backfill-parser data notification callback 0900640006fd8d61000071000604b96200009f00
2020-02-14T22:39:25.311Z backfill-parser data notification callback 0a00061ce5630000ab00060f11650000df000624
2020-02-14T22:39:25.385Z backfill-parser data notification callback 0b003d6600001e01063e696700003d01067f
2020-02-14T22:39:26.226Z transmitter timeout
2020-02-14T22:39:26.228Z transmitter Reading glucose
2020-02-14T22:39:26.250Z bluetooth-manager Tx 4e0aa9
2020-02-14T22:39:26.421Z bluetooth-manager Rx 51000100754c000069670000da000000fa455b12
2020-02-14T22:39:26.426Z bluetooth-manager Rx 51000100754c000069670000da000000fa455b12
2020-02-14T22:39:26.438Z transmitter Error: Error getting glucose: Error: cannot create new GlucoseRxMessage
    at Transmitter.readGlucose (/root/src/Logger/node_modules/xdrip-js/lib/transmitter.js:325:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
2020-02-14T22:39:26.447Z transmitter Initiating a disconnect
2020-02-14T22:39:26.455Z bluetooth-manager setting notify to false
2020-02-14T22:39:26.785Z bluetooth-manager disconnected peripheral
2020-02-14T22:39:26.797Z bluetooth-manager scanning again in 1 minute

and this error after a backfill-parser has ran

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:129:9)
    at Object.writeFile (fs.js:1159:14)
    at ReadFileContext.callback (/root/src/Logger/logger/index.js:284:10)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:238:13)
fidoman
@efidoman
@JesseLeeuwen - Yes, the sessions for backfill may take longer to complete than the few seconds the transmitter is allowed to stay awake each 5 minute BLE cycle. The tx session is timing out due to the speed of the RPI and the number of records it is trying to process. Does this cycle repeat? If so, then I think I can fix it with some logic to not try backfill if the prior backfill fails.
Let me know if this is a one time error. Or it repeats over and over.
fidoman
@efidoman
@JesseLeeuwen - In the meantime, if it is a repetitive and blocking issue, you can comment out this line in Logger to disable backfill temporarily
Jesse van Leeuwen
@JesseLeeuwen
@efidoman thanks for the reply, this repeats every loop. I will try to disable the backfill and see if it works
samueldemers2
@samueldemers2
@dcacklam Did you manage to fix the transmitter timeout from your RPi 0 rig ? I have the same trouble at the moment and the transmitter work fine with another setup (and yeah, I stopped them for a while to test eveything).
Jesse van Leeuwen
@JesseLeeuwen

@efidoman disabling the backfill doesn't seem to resolve the issue.

we were able to connect and send the start message but it doesn't seem to work now the warmup period is over.

every loop looks similar to this:

02/15 20:29:46 Removing existing Dexcom bluetooth connection = Dexcom6M
02/15 20:29:47 Removing existing Dexcom bluetooth mac connection also = E4-60-E3-69-A0-10
[{"device":"xdripjs://alfons-p","xdripjs":{"state":36,"txStatus":0,"stateString":"No Response","stateStringShort":"No Response","txId":"8GUD6M","txActivation":1581721200000,"mode":"not-expired","timestamp":1581794705841},"created_at":"2020-02-15T19:25:05.881Z","_id":"5e4846ad371fd4000479ea99"}]
02/15 20:29:49 Upload to NightScout of cgm status pill record entry worked
02/15 20:30:03 Starting Logger
02/15 20:30:05 Parameter (watchdog):  false
02/15 20:30:05 Parameter (utc): true
02/15 20:30:05 Parameter (auto_sensor_restart): false
02/15 20:30:06 Parameter (fakemeter_only_offline): false
02/15 20:30:06 Parameter (alternateBluetoothChannel): false
02/15 20:30:06 Parameter (transmitter): 8GUD6M
02/15 20:30:07 Dexcom tx version is 2.18.2.98 (new firmware)
02/15 20:30:07 Logger mode=not-expired
bt-device is /usr/bin/bt-device
02/15 20:30:07 Using UTCString  -u
02/15 20:30:08 check_last_glucose_time - epochdate=1581795006,  entry_timestamp=1581735860
02/15 20:30:08 Time since last glucose entry in seconds = 59146 seconds
02/15 20:30:08 Adding backfill message since 1581735920000

02/15 20:30:15 Removing existing Dexcom bluetooth connection = Dexcom6M
02/15 20:30:16 Removing existing Dexcom bluetooth mac connection also = E4-60-E3-69-A0-10
02/15 20:30:16 clearing out logger to xdrip-js messages
02/15 20:30:17 Calling xdrip-js ... node logger 8GUD6M /root/myopenaps/monitor/xdripjs/xdrip-js-messages.json false
2020-02-15T19:31:03.703Z transmitter Listening for transmitter 8GUD6M
messages passed to logger: []

2020-02-15T19:31:05.552Z bluetooth-manager on -> stateChange: poweredOn
2020-02-15T19:31:05.585Z bluetooth-manager starting scanning
2020-02-15T19:31:05.662Z bluetooth-manager on -> scanStart
2020-02-15T19:34:19.879Z bluetooth-manager Sat Feb 15 2020 20:34:19 GMT+0100 (Central European Standard Time): peripheral: Dexcom6M with rssi -93
{ id: '8GUD6M', rssi: -93, address: 'e4:60:e3:69:a0:10' }
2020-02-15T19:34:20.171Z bluetooth-manager on -> scanStop
2020-02-15T19:34:20.915Z bluetooth-manager on -> connect
2020-02-15T19:34:21.367Z bluetooth-manager on -> peripheral services discovered
2020-02-15T19:34:21.976Z bluetooth-manager on -> service characteristics discovered
2020-02-15T19:34:21.998Z transmitter Authenticating with transmitter, alternate bt channel: false
2020-02-15T19:34:22.086Z bluetooth-manager Tx 01970c130a004943a202
2020-02-15T19:34:22.194Z bluetooth-manager Rx 0399b69dd47c03abe5c09c10d66916bc43
2020-02-15T19:34:22.288Z bluetooth-manager Tx 0464962498f0661894
2020-02-15T19:34:22.440Z bluetooth-manager Rx 050102
2020-02-15T19:34:22.447Z transmitter transmitter responded with status message 050102
2020-02-15T19:34:22.449Z transmitter Requesting bond
2020-02-15T19:34:22.498Z bluetooth-manager Tx 0619
2020-02-15T19:34:22.542Z bluetooth-manager Tx 07
2020-02-15T19:34:22.545Z transmitter Bonding request sent. Waiting for user to respond.
2020-02-15T19:34:22.555Z bluetooth-manager setting notify to true
2020-02-15T19:34:22.572Z smp got data 0b01
2020-02-15T19:34:22.575Z smp got security request
2020-02-15T19:34:37.573Z transmitter Error: Error enabling notification: timeout
    at Transmitter.enableNotify (/root/src/Logger/node_modules/xdrip-js/lib/transmitter.js:236:11)
2020-02-15T19:34:37.590Z transmitter Initiating a disconnect
2020-02-15T19:34:37.595Z bluetooth-manager setting notify to false
2020-02-15T19:34:40.600Z transmitter timeout
2020-02-15T19:34:47.702Z bluetooth-manager disconnected peripheral
2020-02-15T19:34:47.705Z bluetooth-manager scanning again in 1 minute
samueldemers2
@samueldemers2
@dcacklam finally a few reboot seem to have fixed it for now... I'll keep monitoring.
Jesse van Leeuwen
@JesseLeeuwen
@efidoman I restarted the Bluetooth service with: sudo /etc/init.d/bluetooth restart and it seems to loop successfully.
fidoman
@efidoman
:+1:
I'll try to figure out a way to refactor the backfill to give up if it times out. Backfill is nice, but shouldn't cause glucose values not to come through.
Jesse van Leeuwen
@JesseLeeuwen
I think the issue is more the Bluetooth instability on the raspberry pi zero W. The first time we set up Logger we had timeouts aswell. restarting Bluetooth and setting the ControllerMode fixes a lot.
Vocylis
@Vocylis
@efidoman I am still seeing the same timemout message. Unfortunately I don't have another transmitter or rig. But, the transmitter was only a few days old when this started happening. I don't have another rig, unfortunately. I previously set my controller mode to le. That seemed like it made it start passing messages to logger. But logger isn't uploading anything to ns.
Vocylis
@Vocylis
restarting bluetooth like Jesse mentioned seemed to change the messages in the log
but my rig nor ns is using the parsed info, I guess?
Vocylis
@Vocylis
No more timeouts it appears
Jesse van Leeuwen
@JesseLeeuwen

@Vocylis have you tried to comment the
https://github.com/xdrip-js/Logger/blob/900f63138cb742bf904c9c97cb79484d009f1d1c/xdrip-get-entries.sh#L2011

It disables the backfill in our case it helped to loop successfully, we enabled back after a couple of successful loops.
The file is Located: /root/src/Loger/xdrip-get-entries.sh
change line 2011 to :
# addToMessages "[{\"date\":\"${backfill_start}\",\"type\":\"Backfill\"}]" $xdripMessageFile

fidoman
@efidoman
@Vocylis - Yes, it looks like you aren't getting the timeouts anymore, which is great. I agree with @JesseLeeuwen 's advice. That is the quickest way right now to disable backfill. I'm trying to why that is failing. It is missing a function callback. I will fix that bug now.
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:129:9)
    at Object.writeFile (fs.js:1159:14)
    at ReadFileContext.callback (/root/src/Logger/logger/index.js:284:10)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:23)
fidoman
@efidoman
It should be resolved now. You can update this one easily and then there shouldn't be any need to disable backfill.
cd ~/src/Logger && git pull
fidoman
@efidoman
whoops, don't do the update of Logger just yet. I have a typo
fidoman
@efidoman
all good now
Dave Cole
@Dave9111
We just started up a rig running Openaps on an Edison rig with xdrip-js. After pairing the transmitter it came up and ran. :-) This is for my daughter who is 500 miles away, however I have access to her rig via ssh. The logger log showed that it is disconnecting a Dexcom bluetooth connection, and I think that is the Dexcom phone app running on Android? So I changed the xdrip json config file so that the rig uses an alternate channel, but it still appears to be knocking the Dexcom bluetooth connection offline and the Dexcom app on her phone won't work when this new rig is running. I asked her if she had anything else paired with her phone and of course, she does... a Bluetooth speaker and a set of headphones. I suspect that the extra paired active devices are causing issues. Does this sound correct? I would really like the Dexcom phone app to run along with the Edison rig and xdrip-js. BTW, great work on xdrip-js! Thanks!
fidoman
@efidoman
@Dave9111 - Lot's of folks have contributed to xdrip-js and continue to do so. Agreed, great work. Although I'm sure it's possible, I haven't ever had an issue with other phone bt connections knocking the tx connection off. More likely, it is a conflict caused by another system using the same tx bt channel. Does your daughter have a Dexcom receiver? Is that completely turned off? Any chance you can cut-n-paste a segment of the Logger logfile here so we can take a look at specifically what's happening?