I have a medical device (Dexcom) that sends my glucose level by BLE to my phone every ten minutes. My phone then sends that data to a server in the cloud. Another app on my phone can download that data from the cloud, as well as can my doctor. There are a few programs that can also get the data, including the Dexcom component in Home Assistant. From Home Assistant, I publish the data over MQTT to a few displays in my house, giving me a view of the latest reading.
What I would like to do is just intercept the data from the device.
When I put this line by itself, esp32_ble_tracker:
I see a lot of unknown BLE devices- I didn’t think I had so many in the house.
But the one I am interested in showed a name:
[20:03:13][D][esp32_ble_tracker:720]: Found device E9:5C:F3:80:0B:0F RSSI=-87
[20:03:13][D][esp32_ble_tracker:741]: Address Type: RANDOM
[20:03:13][D][esp32_ble_tracker:743]: Name: 'Dexcom0S'
[22:03:13][D][binary_sensor:036]: 'Dexcom': Sending state ON
[22:03:13][D][sensor:125]: 'Dexcom RSSI value': Sending state -99.00000 dB with 0 decimals of accuracy
How can I discover what else the device can tell me?
Thanks for the link. I had searched for a BLE scanner on my phone and found nothing useful. This one gives me more info, specifically the UUIDs of the services.
(One of these days I will get around to designing a case for them).
The idea is that I would replace the Wemos D1 on each display with an ESP32. If I am in the room with one of these displays, then it will publish the data to the other displays on my network. But when I travel, it would be a nice display in my hotel room, or on the dashboard of my car to give me an idea of where I am and where I am going (glucose-wise). I am too lazy to look at my watch with the Dexcom face. (Actually, I can’t count on the watch app to work reliably enough).
I use nightscout to store my data and xDrip+ to get it onto my phone from the dexcom.
HA has a nightscout integration and once it is in HA it can go to the displays in my house, or a notification to kodi or my smart tv or an esphome screen or a openhasp screen or whereever.
I believe that there is a limit to how many devices you can pair to a dexcom transmitter - I pair my phone and my pump. I think the limit may be two or three, so the idea of a number of esp32’s to pair to round the house might not work.
Cheers, hope you are keeping well, it’s a tough disease. It’ll be 50 years for me in a couple of years.
I hadn’t thought of that. I have two devices currently linked to the transmitter, my phone and the original Dexcom receiver. I am wondering if the four-character transmitter code is a PIN code? If so, the HA BLE tools won’t work anyway. I think it’s time to shelve this idea.
I have been unable to get Nightscout to work after they switched database providers about a year ago. Its the most incredibly convoluted Rube Goldberg integration that I’ve ever encountered. Sugarmate used to have an API where I could get my current BG (in JSON) from a simple web interface. They took that offline claiming that Dexcom made them do it.
xDrip is a data gatherer for android. It will also link to WearOS which may fix your watch problem.
Yeah nightscout is a bit tricky to set up, but works fine once you get it running. It’s not that hard, really a matter of finding the right online howto.
My problem with Nightscout is that I had a previous configuration with Nightscount. When they changed database providers a year ago, I wasn’t able to get the new database working, so I simply gave up since I had Home Assistant component and Sugarmate API which were both much easier to set up.
When Sugarmate stopped providing the API, I tried to set up Nightscout again, but I couldn’t because my email address already had an account, and it was in some kind of limbo. I may try again using a gmail address.
The dexcom G6 transmitter has only two BT “slots”: 1=(Dexcom_receiver, pump, or something else) 2=(mobile / phone). So in order to bond/authenticate to the transmitter for a BT reading, you need an available slot. Your case sounds like you are already using both slots, so probably not going to get far without changes.
I have considered hacking together an ESP32 reader so I do not need to have my phone with me while at home, for example. But an Xdrip±WearOS watch acting as a collector from the transmitter is probably a better solution and is already coded, you just need an appropriate watch and phone.