Open sum1els opened 6 months ago
when I run that same, using the requests module on my desktop, the API call works
Hey!
Yes, I started getting this very recently, like the past week or so, which has caused some issues with the project. It had been running smoothly for the past 6 months before. Not sure if they recently added some additional security layer. 🤔 Unfortunately I haven't had the time to figure out what is going on yet.
Interesting that it seems to work in different environments. Looking to find the time to sit down and have a proper look at this, but let me know if you find anything else out in the meantime.
Sorry I couldn't be of more help.
Joel
I have no idea why it's happening, not sure if the requests library in the newer micropython is messing the headers up or something, but using yours as an inspiration, I used circuitpy (adafruit requests library), with the waveshare 2" IPS screen (ST7789 library), which shows the colors very nicely at any angle.
Looks really nice!
Interesting, I'll give it a go. As you said, it sounds like there may be something in the urequests
library that trigger cloudflare. Maybe it will catch up with circuitpy
as well but let's see.
sum1els
Oh great work @sum1els, would it be possible to have the code because I use the same hardware and Freestyle libre 2. I tried the ghitub code but unable to connect with Libreview API.
Thank you so much
@spordiab sure, I have uploaded it here: https://github.com/sum1els/circuitpy-glucose-display
thanks to @joelhi for the inspiration, not sure what is wrong with the urequest library, but circuitpy worked for me, however, not sure if it runs out of memory, since sometimes after a few days. maybe weeks the display just goes blank and I need to restart it. Could be my bad programming ;)
@spordiab sure, I have uploaded it here: https://github.com/sum1els/circuitpy-glucose-display
thanks to @joelhi for the inspiration, not sure what is wrong with the urequest library, but circuitpy worked for me, however, not sure if it runs out of memory, since sometimes after a few days. maybe weeks the display just goes blank and I need to restart it. Could be my bad programming ;)
Thank you for your response and your work.
I'll try to install it and get back to you.
Hi, thanks for creating this !
I am getting a 403 response for the API call, with what looks like a cloudflare page about being blocked. If I do a curl with the same details from a linux host I get a proper response:
Running this from the pico: Logging in... Connecting to https://api.libreview.io/llu/auth/login Response code: 403 Response:
b'<!DOCTYPE html>\n\n\n\n \n
\nSorry, you have been blocked
\nYou are unable to access libreview.io
\nWhy have I been blocked?
\n\nThis website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
\nWhat can I do to resolve this?
\n\nYou can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
\n\n Cloudflare Ray ID: 8835eb638ed8e1d7\n •\n \n Your IP:\n \n X.X.X.X\n •\n \n Performance & security by Cloudflare\n \n
\n \nTraceback (most recent call last): File "", line 3, in
File "adapters/libreview_adapter.py", line 33, in login
ValueError: syntax error in JSON
Ever seen that before ?
Thanks