So essentially it works when you are home, and there is a manual alternative when you are out?
Yea it works when Iām home, and when Iām out I look at my pump instead. When I get home everything gets updated. I prefer it this way so I donāt need to carry anything around.
I can also have these stations at work for example. Unfortunately the only other solution is carrying around another device I need to charge and because I already have my graph on my pump it seemed a little excessive.
I understand, and that is cool. Cheers. (Work is home for the next 4 weeks sigh.)
Hi, thought I might drop this information in here for anyone interested:
https://github.com/home-assistant/core/pull/33852
Just added this as a custom component. Great work! Thank you!
Sure thing! Let me know if you have any issues!
Hereās a repository for anyone wishing to add as a custom component while waiting on the official integration:
You can also comment any bugs there if you run into any.
Seems Iāve run into an error regarding dependencies while trying to install the custom component. Any ideas?
Somewhere in your log file there should be an entry about installing pydexcom with pip. Try looking through the logs
grep pydexcom /config/home-assistant.log
PS I assume you restarted home assistant after adding and configuring the custom component?
So fixed up that error and installed pydexcom. But although HA notified me of two new devices, those sensors are not there. Also when attempting to setup the Intergration, it continually says my credentials are wrong (theyāre not. Unless these credentials are not my dexcom login/password?)
I have setup Share and even added myself as a follower.
My username and password are also manually setup in config.
Alright. So after a day trying to get this component to work, I found my brick wall ā Canadian Dexcom Accounts.
I couldnāt figure out why this Intergration wouldnāt accept my credentials, over and over again. Then I figured Iād try making a new account and see if that fixed up the problem. I found myself bouncing around multiple dexcom registration sites and somehow ended up on one that didnāt already have my email associated with an account (weird), so I signed up with the same email I was currently using in the account on my Dexcom G6 app (just to see what would happen) and surprisingly it signed up just fine. I then used those new (same) credentials in the Intergration and they worked just fineā¦ got the two sensorsā¦ butā¦ unknown states.
This whole time my original account is still logged into the app. So I dug deeper.
Turns out, dexcom has different accounts for different countries! The url uam1.dexcom.com is the US dexcom registration site (United States was the only country choice during signup), and uam2.dexcom.com is for Canada, and possibly other countries. They donāt have a single database for all their accounts, hence why I could sign up on the US one with an email address I already signed up for in the Canadian one.
Heres the kickerā¦ this custom component ONLY validates the US associations; or more specifically, the uam1.dexcom.com ones, not uam2.dexcom.com ones. And since my Dexcom app is in the Canadian App Store, it only validates Canadian accounts. When I tried to enter the US account I made with a different username, it couldnāt be found in the dexcom app login.
So this is something to be considered before the official hass Intergration launch. Iām not sure about other countries (other then US) but Canada definitely isnāt working.
Just did. Although, reading through the code I see references to server_ous and server_us for authentication. When trying to setup the component through the Intergration ui, thereās US and EU as options. Assumably, the EU selection validates through another url. I guess they just have another one for Canada as well.
Ah well, letās see what happens
Yeah well there are two parts of the world. USA and everywhere else
Yāknow, I knew there was that additional uam2
server and I just kind of assumed it was was an attempt to load balance, ha! So this is good to know. Iāll get that added so you can be on your way, sorry 'bout that! There is no official documentation for the API for Dexcom, so everything is a bit cloudy.
So it turns out it was my fault for using special characters in my username and/or password. A quick swap to a new account without any special characters fixed the problem right up.
If anyone doesnāt want to change their account and has this problem; a workaround is to add a āDependencyā under your main account. Then make that username/password something without special characters. That dependency gets all the same data as the main. But, FYI you will have to login into the dexcom component AND your dexcom app with the new dependency account credentials.
Many thanks to @gagebenne for this awesome component
Any update on the graph card you were working on? Iād love to incorporate it; looks clean
What are the options for trend? Say I want to create a automation that plays over alexa if a blood sugar is under 70 and the trend is down as well.
Never mind found the answer here. Thank you for your work on this.
So I use node-red with dexcom and sugarmate to pull data and make alarms with alexa. Next thing I would like to know if there is a way to make this work with the libre 3 when it is out.
,
Thanks for doing this as itās very interesting. My wife is the Dexcom user in our household and Iām successful with sending the value and trend via push message to iOS.
What Iām interested now is to receive notifications if the Dexcom sensor is unknown as these are messages I sometimes receive if the value or trend are unknown and the sensor is basically offline and/or no data as displayed by the Dexcom app. This could be just as useful as the actual data itself.
My code examples of trying to monitor if unknown exists but do not know if this works. It works via iOS push in the developer tools > services when I call the automation. Iām not sure though if the templates are correct. Have you done anything such as this? I reviewed templates here
Also if someone knows how to combine both of the value_templates into one Iād appreciate a lesson on that too.
automation example:
- alias: "Dexcom Unknown Notification"
trigger:
platform: time_pattern
minutes: /5 # repeat every 5 min.
condition:
- condition: template
value_template: >-
{{ state_attr('sensor.dexcom_wife_glucose_value' 'attr') == unknown, unavailable, none}}
- condition: template
value_template: >-
{{ state_attr('sensor.dexcom_wife_glucose_trend' 'attr') == unknown, unavailable, none}}
action:
- service: notify.mobile_app_iphone
data:
message: |
WIFE BLOOD SUGAR IS UNKNOWN
{{now().strftime("Date: %m-%d-%Y Time: %I:%M:%S %p")}}
Iāve used node-red on home assistant to poll BSL levels ( via Sugarmate) and if below 4.0 during set times:
- Play TTS loop to Google mini speaker to warn of low BSL
- Flash the bedroom light on and off on loop
- Send IOS Notification
- Incorporated a snooze function, triggered by responding to the IOS notification that puts the flow into a snooze for 20 minutes ( to allow time for treating and BSLs to start rising again before alerting again)
Has been an awesome setup for peace of mind when it comes to night time monitoring of my daughters BSL