Comments (6)
Ah, yes, good find, added pillow with the latest release 0.4.0 and tested since only on HA 2023.2.
I just published beta version 0.4.2, would you be able to give that a try to see if it solves your problem?
from ha-google-photos.
First, the good news: I can successfully create the integration with 0.4.2.
The bad news: I get an error when I try to select albums (ACCESS_TOKEN_SCOPE_INSUFFICIENT
). It looks like I would need to add a sensitive scope to the OAuth app in order to view Google Photos albums (.../auth/photoslibrary.readonly
at the very least).
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
homeassistant | resp = await request_handler(request)
homeassistant | File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
homeassistant | resp = await handler(request)
homeassistant | File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
homeassistant | result = await result
homeassistant | File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
homeassistant | return await super().post(request, flow_id)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
homeassistant | result = await method(view, request, data, *args, **kwargs)
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
homeassistant | result = await self._flow_mgr.async_configure(flow_id, data)
homeassistant | File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 282, in async_configure
homeassistant | result = await self._async_handle_step(
homeassistant | File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 374, in _async_handle_step
homeassistant | result: FlowResult = await getattr(flow, method)(user_input)
homeassistant | File "/config/custom_components/google_photos/config_flow.py", line 176, in async_step_albumselect
homeassistant | data_schema = await self._get_albumselect_schema()
homeassistant | File "/config/custom_components/google_photos/config_flow.py", line 145, in _get_albumselect_schema
homeassistant | albums = await self.hass.async_add_executor_job(get_albums)
homeassistant | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
homeassistant | result = self.fn(*self.args, **self.kwargs)
homeassistant | File "/config/custom_components/google_photos/config_flow.py", line 133, in get_albums
homeassistant | .execute()
homeassistant | File "/usr/local/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
homeassistant | return wrapped(*args, **kwargs)
homeassistant | File "/usr/local/lib/python3.10/site-packages/googleapiclient/http.py", line 938, in execute
homeassistant | raise HttpError(resp, content, uri=self.uri)
homeassistant | googleapiclient.errors.HttpError: <HttpError 403 when requesting https://photoslibrary.googleapis.com/v1/albums?pageSize=50&alt=json returned "Request had insufficient authentication scopes.". Details: "[{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'ACCESS_TOKEN_SCOPE_INSUFFICIENT', 'domain': 'googleapis.com', 'metadata': {'service': 'photoslibrary.googleapis.com', 'method': 'google.photos.library.v1.PhotosLibrary.ListAlbums'}}]">
from ha-google-photos.
Scratch that... I deleted and re-created the Google Photos integration in HA, redid the consent screen, and though I still get that error sometimes I can get the list of albums to choose from. It seems to be working.
from ha-google-photos.
However... no devices or entites are created when I select an album, and If it's supposed to create the "Favorites" device by default, that's not happening either. I'm not seeing anything in the logs error-wise.
EDIT: I had to restart HA to get the devices to show up after creating the integration.
from ha-google-photos.
Hmm, ok, so it's working now? Can't really explain why it's so troublesome for you, it seems like there might have been some cached credentials or something in the way.
from ha-google-photos.
Yes, it's working now. Took a couple of restarts but it's working fine. At the very least, the relaxed requirement change worked 100%. Thanks for the quick response!
from ha-google-photos.
Related Issues (20)
- Change credentials (client ID & Client Secret) #Question HOT 2
- Picture Entities with Google Photos pictures don't display correctly when the dashboard is casted via Google Cast HOT 4
- Support offline usage, fetch and store entire album on disk HOT 4
- Add location info HOT 3
- Support Shared Albums HOT 3
- fails on selecting album HOT 3
- Improve fallback resolution in Original mode HOT 2
- No image in app HOT 7
- Error on creating the integration HOT 8
- Migrate to new Image Entity HOT 2
- Get access to all the Albums as one entity HOT 4
- Not loading in HA 2023.8. 0b3 HOT 3
- error while creating account HOT 2
- Include Location Information in Metadata if available HOT 1
- Support of the new "image" entity? HOT 1
- google photos unavailable HOT 3
- Access blocked: the request of this app is not valid HOT 3
- Add support for rotating google photo as background when cast to google nest hub HOT 3
- Failed to query google api: Internal error encountered HOT 1
- Resolution does not scale with pixel density, resulting in blurry pictures on high-density screens HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-google-photos.