Hello all-
I’ve put together a binding for https://www.music-assistant.io (MA), a popular music library management system with wide support for a number of music player protocols (like airplay, chrome cast and sendspin). This binding provides support for basic functionality (not all of the Music Assistant constructs make sense when exposed to openHAB) and also provides a mechanism for easily performing advanced interactions with the MA server.
MA server discovery is automatic, and once you’ve added an access token for your MA server, Players of all kinds are automatically discovered. The MA Player thing provides access to basic transport control, now playing media info (as well as last played and next up), as well as the ability to start playing a playlist, the names of which are automatically discovered.
I don’t really use the out-of-the-box openhab UIs, so I don’t have any widgets to offer, but the channels are reasonably well thought out, so it shouldn’t be difficult to set something up (which I’d be happy to include in the binding repository for future users!)
Additionally, as I mentioned, there’s a channel that provides a direct API interface with the MA server so someone could use a little javascript and easily add more advanced functionality to widgets and such. I’d also be happy to consider adding additional features where there’s a reasonable way to make it fit into openHAB’s data model.
You can pick up a copy of the binding and drop it in your openhab addons directory. If there’s interest, I can try to get it set up in the marketplace once things mature a bit.
https://bill.welliver.org/dist/openhab/org.openhab.binding.musicassistant-5.2.0.jar
The source code for the current version is at the following repository. Note, though, that this is a mirror of the original repository and I’ve made a typo, so get in touch with me directly if you’ve got bugs or code to share, at least util I figure out a better mechanism for doing that.
I’ve been using this binding for a few weeks and so far, it’s been reliable for me. I’d be glad to hear feedback from folks. I’ve included a capture of a bit of a custom dashboard I set up that uses this binding to control a MA player streaming to a smart speaker in order for folks to see what’s possible.
I look forward to hearing your comments and suggestions!
Best-
Bill
