JohannVR / JohannVRs-Home-Assistant-Addons

Addon for Home Assistant that adds Airplay 2
13 stars 3 forks source link

How to fetch Album Art cover through mqtt? #7

Open ThunderBirrddd opened 4 days ago

ThunderBirrddd commented 4 days ago

Hey, First of all thank you so much for this awesome add-on works flawlessly totally in love with this so recently tried mqtt aswell but was wondering how do I get the album cover? i have album cover set to yes under config but after that what to do with it how do I fetch it to my dashboard?

Help will be really appreciated, Thankyou.

JohannVR commented 4 days ago

Hey, glad to hear you like it! You can get the cover art into HA by adding this to your config:

mqtt:
  - image:
      name: "Airplay2 Cover Art"
      image_topic: "airplay2/cover"
      content_type: image/jpeg
ThunderBirrddd commented 2 days ago

oh okay thank you so much this works, also one last thing can I command through mqtt to play pause skip or change volume?

JohannVR commented 2 days ago

Remote control is enabled in the config file, but from what I can tell, there seems to be an issue with shairport-sync and the newer iOS versions, so that remote control doesn't work right now :/ here's my source

you can still try though, normally it should work through the mqtt.publish service under this topic: airplay2/remote available commands are: "command", "beginff", "beginrew", "mutetoggle", "nextitem", "previtem", "pause", "playpause", "play", "stop", "playresume", "shuffle_songs", "volumedown", "volumeup"

ThunderBirrddd commented 2 days ago

OH i see hard luck doesnt work for me either....... 1 last thing, are you using any custom media player to pull up all the entities properly on your dash, I tried mqtt-mediaplayer add-on and wasn't able to get album art working. It does work as intended if I add the particular entity on dash but not within the mediaplayer.

anyways thank you for the help. Really appreciate it man.

JohannVR commented 2 days ago

No, sorry, I don't, I just use the mqtt integration to check if anything is playing and use that information to turn on my speakers.

Always happy to help!

ThunderBirrddd commented 1 day ago

hey, is it possible to get the album art in base64 encoded form?

JohannVR commented 1 day ago

I don't think so, binary is the shairport sync default :/