Custom Widget: Music Control

I can only get the “Browse” window and not the Spotify player in a Frame. Is it anyone who has tested this lately, if so. Can you post the link you are using or how to do it? :slight_smile:

If you try https://play.spotify.com/ ?

Hi! Is there a way that you can put a stop button in there?

Murpher, I am trying to get spotify web player to show on Habpanel, but no luck.

I am adding a Frame, and try https://play.spotify.com/ and https://open.spotify.com/ with no luck. I am using static URL. Do you change anything else to get the player to show in Habpanel? Thanks

Hi, how do i get my chromecast connected?

Can someone add a powerbutton and a input source selector? This would be very handy for receivers with multiple zones. I’m no programmer . Thanks in advance and appreciate your work .

Any Progress?
I would like to use the spotify player in habpanel as well.

Sorry, whole project has been put on the back burner.

Had to change the original widget a bit by adding extra configuration settings. Makes it easier for people to add the correct texts for their players. In my case, when a song is playing, the Sonos says State == PLAYING, not State == PLAY like it was initially.

In attachment the updated file. Could be a good idea to add this stuff to GitHub. Allows everyone to work on it and consolidate all ideas for music player widgets in one easy to track repository.
MusicControl.widget (1).json (3.9 KB)

Hi,

thanks for the great template, I like your approach a lot but I still have some issues to get it working. Volume and Play/Pause is working great, but the next and prev button I have no clue what to do?!

Would be great if somebody sees directly my problem, I tried several settings but till now negative

Thanks

I was scratching my head for ages over this.

What is your media player? Sonos, Squeezebox, something else? Type NEXT into the penultimate box and PREVIOUS into the final textbox on the config screen. If PREVIOUS doesn’t work, try PREV.

Hope this helps!

1 Like

I use the Logitech LMS or former Squeezeserver, Player I use several squeezelite instances - the perfect hint was to use the complete word and capitals :+1:t3:
Thanks a lot!!!

1 Like

@Murpher This works great! Are you planning on adding any more detail like the current track, artist, album, playing duration and maybe even cover art?

That would make it pretty complete!

1 Like

Having a checkbox for hiding volume slider if not configured would also be nice!

Great job by the way

Hey Tommy,

I’m using this against the Sonos binding. I’m running OH 2.4.

I pulled down the latest Music Control widget from the gallery and got everything working except when I press PLAY the PAUSE icon isn’t displayed - the Play continues to be shown and if I press the PLAY again it doesn’t PAUSE it.

Everything else works perfect . . .

Any ideas?

Best, Jay

The widget is actually using the MAP’d value vs. the actual value. I just added some additional checks for all the mapping of values and it works now.

  	<label class="btn-radius btn-danger" ng-if="itemValue(config.status_item) !='PLAY' && itemValue(config.status_item) !='PLAYING' && itemValue(config.status_item) !='Play' && itemValue(config.status_item) !='Playing'"
           ng-click="sendCmd(config.action_item,'PLAY')"><i class="glyphicon glyphicon-play glyphicon-text"></i></label>
    <label class="btn-radius btn-warning" ng-if="itemValue(config.status_item) =='PLAY' || itemValue(config.status_item) =='PLAYING' || itemValue(config.status_item) =='Play' || itemValue(config.status_item) =='Playing'"
           ng-click="sendCmd(config.action_item,'PAUSE')"><i class="glyphicon glyphicon-pause glyphicon-text"></i></label>

Best, Jay