-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
update auth process and other improvements #68
Conversation
…mezone in ns uploader
@sedy89 Nice, I merged the pr and created a new beta release. |
Hi @sedy89 , thanks for your hard work.
The logging timestamp (15:08) ist 14:08 UTC+1 (server location), corresponding to 7:08 UTC-8 (client location). For a glucose entry however, something different is happening:
here, the Please let me know, if you need more / additional information. Thanks again :) |
Hi @Trenar , Once you confirm that it is working, I will create another PR with the fix. edit: maybe it will work for you, but I see now a shifting regarding my timezone.. still need to check. |
Hi @sedy89 In the NS-logs, let's quickly review this entry (same as in my post above):
I think the problem is the "created_at" timestamp. It is not the UTC time stamp (as indicated by the "Z"), but instead it's the local pump / uploader time, which already includes the tz-offset (8hrs). I assume, that the utcOffset variable is then applied again, yielding a double-correction of the time zone. Could that be possible? Thanks, |
Addendum: I checked the |
Regarding the python-script, it still does not launch the Firefox window with the error message "Message: binary is not a Firefox executable". It really needs the path to the executables. However, as this is system-specific, I understand that you don't want to integrate it here. |
@Trenar please check again with the lastet changes. The login script should have linux support (if your path is the same link in the stackoverflow thread). And the ns uploader might use the correct timezone now. At least for my timezone it is working again. Best of luck |
@sedy89 now the reportings are again 9 hours ago, i.e. the correct offset between client/uploader and server. I left a comment on the commit in your branch with my thoughts: I assume NS expects UTC timestamps, but we actually provide local timestamps. Is that possible? EDIT:Now it got very confusing.. SGV and treatments now have a different offset: while SGV has an offset of -8hrs (UTC vs local client time), the treatments have an offset of -9hrs (server vs local client time). Not sure why this happens... |
@sedy89 I think I worked it out.. Hope that it also works on your side :-) I started with your branch and changed the def __getDataStringFromIso(self, time, tz):
dt = datetime.fromisoformat(time.replace(".000-00:00", ""))
dt = dt.replace(tzinfo=tz)
dt = dt.astimezone(tz)
timestamp = dt.timestamp()
date = int(timestamp * 1000)
date_string = dt.isoformat()
return date, date_string What it now does is creating a datetime object from the string (as before). Note, that here the string is in "local time", while the datetime object intrinsically assumes UTC. Therefore, the tzinfo is Also the issue that SGV and treatments have a relative offset is gone now. |
Have you seen the PR I created in your own carelink fork ? :) |
Now I did 😄 I think we basically found the very same thing. Which one do you want me to test now, the PR in my fork, or the branch in yours? |
I already tested your's and it is wokring 👍 edit: btw.: you can enable the Pump plugin in your Nightscout settings to see also the active insulin.. if you haven't. I just did not see it in your screenshot. It will show the active insulin instead of the remaining units of the reservoir |
Perfect, thanks a lot :) |
Carelink:
Nightscout Uploader:
@yo-han those changes should address most of the open Issues. I am currently testing the changes and it is working as expected so far. Another beta release would be very helpful to figure out remaining issues