Use Diabetes Data from xdrip without nightscout

I found an easy workaround for my problem.
The latest notification sensor in the HA companion app can be configured to send xdrip notifications to HA. It works. Data is coming in every 5 minutes when xdrip is updated.

Now i need to make a sensor from the attribute and make myself a nice dashbaord card and some fancy automations based on the Sugar value.

3 Likes

Your post has reminded me that you use camaps fx. I am currently on a tandem pump. But I have an option to move to a ypsopump plus camaps fx. I am curious what you think of this combo? Cheers.

CAMAPS was a big improvement in our case. We were on Medtronic before. Now I do almost no manual corrections during the night.
They is still lots of room for improvement on the follower app. But together with xdrip it is fine.

1 Like

Thanks. Such a game changer, wish we’d had pumps 50 years ago.

Curious to know more about configuring that last notification stuff. A how to would be great…

that is an easy task, but I need to translate german HA app content to english. It may differ from the actual wording.
Do you receive xdrip notifications with the BC values every 5 minutes on you smartphone?
Within the settings of you home assistant companion app, go to Sensor settings, scroll down to notification sensors and click on latest notification. click on whitelist and search for xdrip and activate it. That“s it. You will find the BC Values in the latest notification entity of HA. You need to look at the attributes, as well.

Hope that helps.

Thanks again. I have done some fiddling and think I have set up notifications right now, but that allow list is looking and impossible to search. I’ll play again after work.

The list is awfully long with strange names, but you will find xDrip+ almost at the bottom. Make sure you receive the xdrip notification in HA, only.

What is your setup to get CAMAPS data to HA?
I want to connect it too but CAMAPS doesn’t have an integration of API.
Do you have Dexcom G6/Freestyle Libre to CAMAPS and parallelly to xdrip with nightscount? I am under the impression that you cannot connect G6 to 2 apps (CAMAPS & xdrip+).
Thanks for sharing your setup :slight_smile:

My G6 is connected to 2 devices - my phone via xdrip and my tandem pump.

1 Like

But you have to during sensor change enter the code in both apps?

No, I enter the 4 digit code in my phone. I have to restart the sensor on my pump, but you skip the code.

Thanks. I tried that but it messed up the CamAps app. Luckily the xdrip can have ā€œCompanion Appā€ as source and it gets the data I need. Also I am trying to connect Ypsopump. But it works now and I can now work with the data.

@wilko There’s a blood glucose sensor in the HA companion app now, for android. This sensor just reflects data from glucose readings in Health Connect (Google Health). You can setup Xdrip to publish data to Health Connect, then enable the glucose sensor in the companion app and it will reflect the xdrip values. If you’re using android, its a great solution and works flawlessly. No need for nightscout, no need for intercepting notifications.

https://xdrip.readthedocs.io/en/latest/use/interapp/#google-health-connect

1 Like

Hi @Wilko, can you share you final solution for this problem?

I have a similar scenario, I have CamAPS FX (and both xdrip and the HA companion app reading the android notifications). Xdrip send the data to Nightscout (hosted on Railways) and the HA Companion App forward all other notifications to my iPhone (like battery, low glucose, etc).

But now that the CamAPS FX app is available natively for the iPhone I will need an alternative way to send my glucose from the iPhone if I switch (since I cannot do the xdrip magic) to something that HA can read.

Did you find any integration to get CamAPS or Glooko values into HA natively?

I did not try the Health Connect Option, yet. Thank you sdholden28 for pointing that out.

I am still using the notification interception within the HA Android App and it works just fine. I have some template sensors which show me the values of interest. Which are for me BG, trend, delta and age of the value. Not sure if google health will provide all of these.

As far as I know, the only option for IOS Users is switching to Android, since IOS does not allow access to the notifications for any app. Maybe you can use an old android phone to receive the Dexcom sensor values from the second Bluetooth slot, at least while at Home.

I switched to camapsfx and an ypso pump a week ago. I am still using a dexcom g6.

The path to getting blood sugar into home assistant is now

G6 → camapsfx → xdrip companion app driver → nightscout → rest api → home assistant.

Google health only provides the actual BG reading. I have a template sensor which keeps track of the value changes, giving me the ā€œage of valueā€ you have as well. Since trend and delta are just calculated from the BG readings, I’m sure you could create template sensors to generate those values based on the last however many readings you like. No reason to change your setup if it’s working for you of course.

This got me thinking. A delta sensor would only require the previous value and the current one, so that’s easy. For trend, it turns out that HA actually has a trend sensor for exactly this type of thing. I didn’t know that and I’ve never used it. I’m going to set one up and compare it with the xdrip trend readings. I’ll report back.

1 Like

@Wilko The Xdrip trend is really simple, and only compares the last two readings. Screenshot of the xdrip docs attached. No ā€œtrendā€ sensor or derivative sensor needed in HA. I created a helper to hold the previous value and an automation to set current value to previous whenever a new value comes in. Then there’s a template sensor for the delta, and then another template sensor which translates the delta into the trend and adds arrows for visualization. Happy to provide code snippets if anyone is interested.


2 Likes

That’s a really long route to get the data into home assistant. Is there any reason that you don’t just use the Dexcom integration?