Hi all,
I was wondering if there was anyone with the skills to build a Deezer component?
Deezer are similar to Spotify, providing music streaming.
I am no programmer but have tried a few ways of getting Deezer streaming into my HA setup, including media_extractor for a playlist URL (didn’t work), and using an iframe to host the Deezer Widget Player. This worked, but had a lot of limitations most notably not being able to leave the current lovelace view!
Deezer seem to have quite a comprehensive API. It’s all foreign to me and I wouldn’t have the foggiest where to begin, but I was hoping someone out there may have the time to create something for us Deezer users? Ideal use case would be to initiate media (playlist, artist, album) on a media_player instance.
I was looking Deezer -streaming component and there seems to be none. One could implement one maybe copying Frenck’s Spotify-component and mapping it to match deezer-python pypi wrapper?
I would like to have Deezer support as well. Even though API does exist, seems Deezer is not getting a lot of support, not just for hassio. Only way I could make this work is using Logitech Media Server and Deezer add-on for LMS. It’s not a great experience as I can only start and stop the player from hassio, but I couldn’t find any other options. Even the experience in LMS for Deezer is quite bad, but at least allows me to stream HiFi content from Deezer to my speakers over USB DAC.
It would be fun to make a Deezer integration, but I wouldn’t mess with an unsupported API. You would think they’d do whatever they can to match Spotify, but maybe it’s in their licensing agreements?
Joined here to comment…that’s a shame. I know there is a Deezer integration in Google Assistant. Any way to tie Home Assistant to Google Assistant commands?
I’m only a hobbyist python developer, so take this with a grain of salt.
As I see it, the problem is this: On the one hand, you get an “information API” that’s quite nice to work with. You can pull all the info you desire from that, playlists, artists, their albums and tracks, you get a nice search endpoint. However, regarding playback, all it delivers is id numbers.
And now, on the other hand … what can you do with those ids? You can pass them to the “JavaScript SDK” which is, as far as I understand it, just a web player which offers playback on the device that opens it.
Now I’ve built a python project that offers a web interface to this API, where I can search, click through artists and albums et cetera. I have this running on my raspberry and accessible on the local network.
Say I click “play this album”, then the project will receive the song ids and pass those to the web player that’s waiting inside a selenium webdriver. It’ll start the playback on the raspberry.
I can control this playback within the web interface, showing regular screenshots out of the selenium webdriver and using buttons that make selenium click play/pause, back and forward.
I publish the pi’s audio output as a “webradio” stream on the local network using darkice and icecast2, which, finally, I can pick up in home assistant to play in whichever way you play web radios.
I put that web interface I built into a frame in home assistant and I have an extremely clunky deezer home assistant integration.
I’m not publishing this at this point because there’s a number of additional caveats (example: you have to log in by logging in on a web browser, then extracting your cookies from there and saving them into a text file for the program), and, to be honest, it sucks.
I think there’s a number of reasons to prefer deezer, but their non-existant API / integrations will probably make me switch to some other service some day.
I know that Logitech Squeezebox has a Deezer plugin that seems to work with the same limitations as the Music on Demand row (i.e. anybody can use it for music organization, but to play full tracks you need to be a premium user otherwise you just get a 30 second extract). Not sure what it’s doing under the hood, but based on Deezer’s description of plugin vs API, I think it must use the API. Everything happens in the same player interface as other music sources, suggesting they’re not just implementing one of the HTML widgets.
Looking at the API docs, isn’t the track link all you need for starting playback (subject to those limits by user type)? I assume you’ve perused these code samples, although I don’t know enough about how to use them: