thlucas1 / homeassistantcomponent_spotifyplus

Home Assistant integration for Spotify Player control, services, and soundtouchplus integration support.
MIT License
45 stars 3 forks source link

Mini-Media Player not showing Playlists in Browser_Mod Window #39

Open HAlover99 opened 3 weeks ago

HAlover99 commented 3 weeks ago

System Health details

System Information

version core-2024.8.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.44-haos
arch x86_64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4995 Installed Version | 1.34.0 Stage | running Available Repositories | 1406 Downloaded Repositories | 52 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.0 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 938.2 GB disk_used | 511.3 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), Mosquitto broker (6.4.1), Frigate (Full Access) Beta (0.14.0), Studio Code Server (5.15.0), Music Assistant Server (beta) (2.2.0b9), Fusion (2024.7.1), ESPHome (2024.7.3), Whatsapp (1.4.0), PS5 MQTT (1.4.0), Matter Server (6.4.1)
Dashboards dashboards | 2 -- | -- resources | 31 views | 2 mode | storage
Recorder oldest_recorder_run | 11 agosto 2024 alle ore 13:14 -- | -- current_recorder_run | 18 agosto 2024 alle ore 15:25 estimated_db_size | 347.14 MiB database_engine | sqlite database_version | 3.45.3
Spotify api_endpoint_reachable | ok -- | --
Xiaomi Miot Auto component_version | 0.7.19 -- | -- can_reach_server | ok can_reach_spec | ok logged_accounts | 1 total_devices | 0

Checklist

Describe the issue

When pressed the "Playlist Button" there is no appear my playlist

Reproduction steps

When pressed the "Playlist Button" there is no appear my playlist there is my configuration:

`type: entities title: Mini Media Player - SpotifyPlus entities:

Debug logs

no

Diagnostics dump

No response

thlucas1 commented 3 weeks ago

When pasting multiple lines of a yaml definition (of any source code), surround the code with 3 slanted ticks to preserve linefeeds and spacing. With that said ...

Also, are you using the SpotifyPlus integration? or just the Spotify integration? I do not see SpotifyPlus settings in your System health display.

Your mini-media player shortcut button service definition looks correct, assuming the ha.xyz.com is your correct HA domain. The link should be exactly the same as the link displayed in the browser url area when you browse to your Playlists using the Home Assistant Media Browser (should have it in the left-side menu).

Here's mine for comparison.

- name: Playlists
  type: service
  id: browser_mod.navigate
  data:
    entity_id: media_player.spotifyplus_todd_l
    device_id: THIS
    path: >-
      http://homeassistantvm:8123/media-browser/media_player.spotifyplus_todd_l/spotify_user_playlists%2Cspotify_user_playlists

Here's yours:

- name: Playlists
  type: service
  id: browser_mod.navigate
  data:
    entity_id: media_player.spotify_stploop_2
    device_id: THIS
    path: >-
      https://ha.xyz.com/media-browser/media_player.spotify_stploop_2/spotify_user_playlists%2Cspotify_user_playlists

Have you configured Browser_Mod correctly for the THIS browser reference? Take a look at How To Setup Browser Mod 2.0 if you are new to browser_mod. You have to register the browser for it to work correctly.

HAlover99 commented 3 weeks ago

Ciao thlucas,

Thanks for feedback, yes i have both spotify, it's needed remove normal spotify?

immagine.

By the way i'm checking your guide about browser mode 2.0 but there is no option about device_id i don't understand what is the configuration should be made...

I'm tried replace device_id with browser_id and set THIS... and now i have this error:

immagine

thlucas1 commented 3 weeks ago

To be clear, the issue is not a SpotifyPlus settings issue - it is a browser_mod2 settings issue.

The THIS reference refers to a registered browser in the browser_mod2 settings.

From the How To Setup Browser Mod 2.0 document, the Browser Control topic has instructions on how to register your browser:

To register a browser, open your Home Assistant instance in the browser you wish to integrate. Click the Browser Mod item from the sidebar menu.

You will notice a toggle at the top, labeled Register. Before toggling this on, you can set a custom Browser ID for this particular browser, in our case, work-chrome. You can also toggle the Enable camera setting, if your device has a camera browser mod can utilize (eg. tablet).

After the browser has been registered, we need to clear the cache for browser mod to enable the available sensors and entities. You can do this quickly by pressing CTRL + F5 on Chrome Windows. For clearing cache on other devices and operating systems, see this guide.

Once the page has refreshed, you will notice your browser is listed under Registered Browsers. If you are using Home Assistant Cast to display a Lovelace view on a Chromecast device it will get a BrowserID of “CAST“. Since you can’t access the Browser Mod config panel from the device, clicking the Register Cast Browser button will register the CAST browser. Most Browser Mod services will work under Home Assistant Cast.

Hope it helps.

HAlover99 commented 3 weeks ago

I follow your instructions i register browser

immagine

and enable CAST

immagine

but the issue it's the same... by the way if try to open the url directly i have the same error.. the "player not supportin browsing media" i'm checking that if try to open a media_player.spotify_stploop_1 ( spotifyplus entity ) there is no a "browser media" while on spotify "normal" entity there is a "browser media"

Stopify integration: immagine

Spotifyplus integration:

immagine

so.. but the correct definition on YAML code under mini player it's BROWSER_ID or DEVICE_ID???? only to clarify :)

Thanks

thlucas1 commented 3 weeks ago

You have 2 different issues here it sounds like:

First, the HA Media Browser problem. You should be able to copy and paste the following url into a new browser window (or tab) and see the HA Media Browser. You may need to modify the homeassistant.local:8123 to use your HA server prefix: http://homeassistant.local:8123/media-browser/media_player.spotify_stploop_1

It should show something similar to this: image

Do you see the SpotifyPlus Media Library title, along with the various icons (playlists, artists, albums, etc)?

If you click on the media player name in the lower right of the HA Media Browser, what media players do you see? Mine look like this: image

HAlover99 commented 3 weeks ago

Ciao

I use a NGINX like reverse profile with certificate by the way if bypass nginx (external server) and try to put both URI in below the output.

URI: http://172.16.232.155:8123/media-browser/media_player.spotify_stploop immagine

if try to put the link about the spotify_plus i have the same error: URI: http://172.16.232.155:8123/media-browser/media_player.spotify_stploop_2 immagine

thlucas1 commented 3 weeks ago

Not for sure what to advise at this point, as this sounds like a problem with HA Media Browser and your setup.

Sorry I could not be of more help.

thlucas1 commented 3 weeks ago

What url do you see in your browser when you select the “Media” menu item in the HA toolbar? Does it display the media browser? If so, then you need to specify the same url in your mini media player shortcut button.

qualle commented 1 week ago

Hello, I also ran into a similiar problem and this is my fix to the failing browser_mod.navigate in the Browse Media Library example:

entities:
  - type: custom:mini-media-player
    entity: media_player.spotifyplus_pascal
    artwork: full-cover
    artwork_border: true
    power_color: true
    show_source: true
    group: true
    source: full
    info: long
    hide:
      power: true
      repeat: false
      runtime: false
      shuffle: false
      source: false
      volume: false
    shortcuts:
      columns: 3
      buttons:
        - name: Playlists
          type: service
          id: browser_mod.navigate
          data:
            entity: media_player.spotifyplus_pascal
            path: >-
              http://home.local:8123/media-browser/media_player.spotifyplus_pascal/spotify_user_playlists%2Cspotify_user_playlists
        - name: Artists
          type: service
          id: browser_mod.navigate
          data:
            entity: media_player.spotifyplus_pascal
            path: >-
              http://home.local:8123/media-browser/media_player.spotifyplus_pascal/spotify_user_followed_artists%2Cspotify_user_followed_artists
        - name: Albums
          type: service
          id: browser_mod.navigate
          data:
            entity: media_player.spotifyplus_pascal
            path: >-
              http://home.local:8123/media-browser/media_player.spotifyplus_pascal/spotify_user_saved_albums%2Cspotify_user_saved_albums
        - name: Tracks
          type: service
          id: browser_mod.navigate
          data:
            entity: media_player.spotifyplus_pascal
            path: >-
              http://home.local:8123/media-browser/media_player.spotifyplus_pascal/spotify_user_saved_tracks%2Cspotify_user_saved_tracks
        - name: Browse All Media
          type: service
          id: browser_mod.navigate
          data:
            entity: media_player.spotifyplus_pascal
            path: >-
              http://home.local:8123/media-browser/media_player.spotifyplus_pascal

The important part is, that I changed all entity_id to entity and removed the browser_id. But this changes all windows on any device that have HA open.

For reference the browser_mod documentation.