Daanoz / ha-google-photos

Home Assistant Google Photos integration
MIT License
84 stars 5 forks source link

Picture Entities with Google Photos pictures don't display correctly when the dashboard is casted via Google Cast #22

Closed 0xjams closed 1 year ago

0xjams commented 1 year ago

Home Assistant version: Home Assistant 2023.4.2 Plugin version: v0.5.0

The picture entity works fine when the dashboard is displayed via a browser or the mobile app. However, when it's casted pictures don't appear.

This issue only occurs with Google Photos picture entities, other picture entities work fine. I've tested this with my security cameras.

While trying to debug on the browser (where the image is displayed correctly), I noticed that the URL that is used to load the picture shows an error on the browser's developer tools. The type of the file is not recognized as an image.

After that, there's another request that has a type x-mixed-replace that apparently contains the image data. I'm not sure what else I can do to help debug.

Let me know if you have any questions.

Daanoz commented 1 year ago

Hmm, with "casted" you mean something like Google Chromecast? Would you be able to share more details on how it's set up? So I can try to replicate it.

0xjams commented 1 year ago

Hi!!!

Here's a tutorial to cast a dashboard. You don't need the blueprint. After the first connection is setup, you can go to the "Media" section. There you will find your dashboards, from there you can cast any dashboard to the devices on your network.

0xjams commented 1 year ago

This issue had nothing to do with the plugin. I'm really sorry for wasting your time.

In case anyone else runs into this. The problem was DNS related, sometimes Google devices try to resolve only via 8.8.8.8. With some firewall magic it is possible to override that behavior and get this to work :).

https://www.derekseaman.com/2021/04/how-to-redirect-hardcoded-dns-to-opnsense.html

Daanoz commented 1 year ago

No worries, your setup is something I wanted to try anyway. Good you got it working 👍.