-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dexcom is returning Trend a string, not an integer in EU region #52
Comments
I've put together a patch to support string and integer Trend values from Dexcom here: |
@cpitchford The Dexcom change also breaks the date regex pattern. The new format is: For reference, he's a raw response from the [{
"WT": "Date(1638314763000)",
"ST": "Date(1638314763000)",
"DT": "Date(1638314763000+1100)",
"Value": 94,
"Trend": "FortyFiveUp"
}] |
I think this is actually ok. The regex used should look for anything inside the parens. > d = {
"WT": "Date(1638314763000)",
"ST": "Date(1638314763000)",
"DT": "Date(1638314763000+1100)",
"Value": 94,
"Trend": "FortyFiveUp"
}
> parseInt(d.WT.match(regex)[1]);
1638314763000 |
Problem is persisting and now whole EU is affected. |
This issue is now appearing in the US region as of ~5pm today (12/8) |
US - change effected my setup as well. |
I noticed at 2021-11-30 17:45:00+UTC that the direction arrow in nightscout was incorrect (shows a <=> character)
Tracking back in my syslog I found evidence that the direction information being stored in Nightscout no longer had accurate trend information: Here's a dump of the "glucose" value after dex_to_nightscout():
This was the last working collection from Dexcom:
Then the very next collection was broken, and the type of trend has changed to a string.
direction is now "NONE" and trend is now a string "Flat"
Working backwards it seems the payload received from Dexcom during the fetch operation has switched the Trend property from a number to a string, (in this example the value is now "Flat" instead of 4
This causes the dex_to_entry() function to return an incorrect object, trend is now a string, an direction is always "NONE"
This affects me in the eu region (I'm a UK user)
The text was updated successfully, but these errors were encountered: