Replies: 5 comments 9 replies
-
That looks right to me (@mkmer do you agree?). I've noticed an increase incidence of users reporting the same "endpoint" down issue. So I suspect it's a Blink problem- just a question of intermittent server problems or a new login endpoint being rolled out. I also noticed my Blink app updated recently which makes me worried they're mucking with the endpoints again 😨 |
Beta Was this translation helpful? Give feedback.
-
OK, which version do you recommend I use, would that be 0.21.0? |
Beta Was this translation helpful? Give feedback.
-
OK, confirmed, reverted back to 0.21.0 and my old code worked. Is this using the v5 endpoint? |
Beta Was this translation helpful? Give feedback.
-
@fronzbot - can you let me know if you want me to test anything implemented to help with the issue here? Happy to help. |
Beta Was this translation helpful? Give feedback.
-
I suppose you could run full debug and see if the trace gives anything interesting... My debug looks like this: INFO:blinkpy.auth:Token expired, attempting automatic refresh.
INFO:blinkpy.auth:Attempting login with https://rest-prod.immedia-semi.com/api/v5/account/login
DEBUG:blinkpy.helpers.util:Setting base url to https://rest-u034.immedia-semi.com.
DEBUG:blinkpy.blinkpy:Initialized last_refresh to 1700430596 == 2023-11-19 16:49:56
DEBUG:blinkpy.api:Making GET request to https://rest-u034.immedia-semi.com/networks
DEBUG:blinkpy.api:Making GET request to https://rest-u034.immedia-semi.com/api/v1/camera/usage
DEBUG:blinkpy.sync_module:Initializing the sync moduler Looks like your stuck on step 2 with a timeout, Maybe aiohttp is missing some component? Maybe try if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
loop = asyncio.get_event_loop()
loop.run_until_complete(main()) Also, aiohttp is more strick on https - if you have some sort of unsigned or invalid ssl cert in there, aiohttp will complain where requests doesn't. There is a way to tell aiohttp not to validate the certs, if that turns out to be the problem. I think it tells you explicitly when the certs are invalid - at my office they have a MITM firewall that I had to accept unknown certs. |
Beta Was this translation helpful? Give feedback.
-
@fronzbot, I've been working to upgrade to the latest version of blinkpy, converting to the asyncio, await, etc... I think I have the code setup correctly per the documentation and am always getting:
Connection error. Endpoint https://rest-prod.immedia-semi.com/api/v5/account/login possibly down or throttled.
Login endpoint failed. Try again later.
Cannot setup Blink platform.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10b7d2990>
Here's my code:
import asyncio
from aiohttp import ClientSession
from blinkpy.blinkpy import Blink
async def start():
blink = Blink(session=ClientSession())
await blink.start()
return blink
blink = asyncio.run(start())
Beta Was this translation helpful? Give feedback.
All reactions