Repository navigation
Extended Visualisation of a Media Player on a Divoom Pixoo 64 Display #161
Replies: 2 comments
|
I got this to work with a Spotify media player changing the URL of the downloader integration to the following: I had to remove the handling of the 'jpg' or 'png' if/else conditional logic and just set the URL as above. Couldn't find a state/variable with the home assistant local URL, so hardcoded it. This automation ends up downloading the image from entity_picture through http locally and then stores it in the /config/www folder for the Pixoo setting to then pick up (as outlined in the original example above). I tried using the Pixoo configuration above directly with the URL I provided but it didn't work. So I went with the edited URL in the downloader and cover_option = 2 in the config. |
|
@craigbye |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This yaml configuration for the Divoom Pixoo 64 Integration provides an extended visualisation of a Home Assistant media player on a Divoom Pixoo 64 Display.
Visualised from the media player are:
With the standard cover image option (cover option = 1), no external parts (no helper entities, no automation) are required.
The yaml configuration is tested with Music Assistant radio and local playlists.
Calculating Elapsed and Remaining Time
Unfortunately, the media player does not provide an attribute for the elapsed and remaining time of the playing song and the attribute media_position is not continuously updated by the player. Only when the player is started, paused, stopped or seeked. The elapsed and remaining time must be calculated out of the attributes media_duration, media_position, media_position_updated_at and the current system time. Also, the player state must be taken into account for calculating elapsed and remaining time.
The player’s attribute duration is provided for single songs and playlists, but not for internet radio. The remaining time (text and progress bar) can only be properly shown, when the attribute is provided.
If the player’s attribute duration is not provided, the remaining time shows the current system time with the prefix “!”and the progress bar shows its full length.
Cover Image
There are two options available for loading the song/ album cover image:
With the standard cover image option, cover option = 1, the cover image of the playing song is downloaded from the internet by the Pixoo image component. The media player provides the attribute entity_picture. If the attribute is provided and the image format can be displayed by the Pixoo 64 Display the provides URL is used.
If the attribute entity_picture ist not provided or the image format cannot be displayed by the Pixoo 64 Display, the URL from the global none_image_url variable is used.
With cover image option, cover option = 2, the cover image of the playing song is loaded from a file on the local disk. For that a separate automation to download and buffer the cover image to local file is used.
The automation YAML for downloading cover image is documented at the end of this documentation.
Note: Divoom Pixoo 64 is currently unable to process .svg images.
Scrolling Text
Scrolling Text requires a short duration / period of the displayed page of Pixoo 64. To let the text scroll every second and also to see every second of the elapsed and remaining time, duration should be set to 1 second.
But be aware, the shorter the duration the more often the cover image is downloaded from internet if cover_option = 1 is active.
Playing_Playlist_Animation_IMG_7717_modified_3.mov
Configuration YAML
Automation YAML Download Cover Image for Media Player Visualisation
All reactions