API for media control

I have been playing around with my AmpliPi and trying to integrate it with Home Assistant. Special thanks to @bshootz for their REST example.

One thing that I think is missing is some form of media playback control through the API. Although the main function of the AmpliPi is that of receiver, it is also the “source” for media; e.g. streaming radio, AirPlay, Spotify etc. There should be basic functionality to play, pause, stop, next/previous track.

Is this something that will be added?

The API does have that on streams, I just didn’t implement it in my example.

http://api.amplipi.com/#post-/api/streams/-sid-/-cmd-

It should be easy enough to add into Home Assistant.

Thanks… I clearly missed that. I’ll report back if I get these controls working with HA.

Have to take that back. At the bottom of the section in the API Documentation that you linked to, there is a note:

Currently only available with Pandora streams

Developers, can you extend this to Spotify streams, internet radio streams and AirPlay?

Play/pause/next/prev already works with Spotify as well. Internet radio and airplay will need another pass to implement that functionality.

Edit - Added issues:

1 Like