But, I don’t think HADashboard can access that state value? Because, the image appears broken and in my console it seems to be trying to access the url without any kind of replacement:
Hi, I’ve been working through this thread for a couple days now and coming up short on getting this artwork to show. I’ve got a Google home device that i’d like to show the currently playing artwork for.
I set my log level to debug, but the only messages I ever get are like these:
2018-04-07 14:42:16 INFO (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.generic_camera to 192.168.1.218 (auth: True)
2018-04-07 14:42:22 INFO (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy_stream/camera.generic_camera to 192.168.1.218 (auth: True)
2018-04-07 14:42:47 DEBUG (MainThread) [homeassistant.components.camera] Stream closed by frontend.
I’m a bit stuck, as I feel like I’ve tried all the different methods in this thread and nothing changes. Any help would be appreciated.
first things first.
make sure that the generic camera in HA is working and that its really called camera.generic_camera.
so find that camera in HA and see if it changes the picture.
if not then you have a problem in your HA config.
if it is working correct in HA you can go to step 2.
Thanks for the tips, I’ve edited my original post for the code blocks.
My HA camera is definitely not working correctly, but the camera.generic_camera is correct.
But when I use the url in the browser to view the camera directly, I get an all black page with a square in the middle (still in new member status, can only upload one pic at a time, but there’s not much to see).
And from the HA overview page for the camera when I click on it I get a broken image icon. I assume this means that my definition in configuration.yaml is incorrect, but I can’t figure out how it’s wrong based on the other posts that are working.
at least we know where the problem is.
its in the configuration.yaml
the first thing now to check if the token changes with every picture and if you can view the picture without the token.
if you need the token to view the picture and/or its constantly changing its gonna be hard but not impossible.
first off all you have this:
so after a whole lot of messing around with this, I finally got it working for my setup so I thought I’d share what I did.
I ended up completely bypassing the generic camera aspect and went directly from the dashboard to my media player entity. The only thing I needed to add was in the dashboard config itself, mine looks like this:
media_art:
widget_type: camera
entity_picture: https://xxx.xxx.xxx:8123/api/media_player_proxy/media_player.spotify?token={{ states.media_player.spotify.attributes.token }}&api_password=xxxxxx
Obviously this is for spotify, not entirely sure if it will work for other players
Had the same problem. The problem was that some code posted here was missing the ’ before http://…
It was at the end of the url though so that was the reason it didnt’t work.
Maybe somebody copy pasted the code for the configuration.yaml and forgot to add that little ’ in front of the URL.
@chris1
In your code, between spotfiy and ?api(…) is there a space or something else?
And maybe it is a dumb question, but what is the api-password? The pw for home assistant or spotify?
If it is relevant, i’m using hassio and have the duckdns + letsencrypt-addon installed.
I tried the ha_url from the appdaemon.yaml in combination with the key and also changing https to http.
But every time i see the iframe, but no picture is displayed
does anyone know why it is not working? Thanks in advance!
that is when you can use that url in your browser to go to HA. if you cant reach HA with: http://hassio/homeassistant then your dashboard shouldnt be working at all.