[No Longer Maintained] Squeezebox Integration (Logitech Media Server)

Not sure if this is relevant to the problem I've been having, but looks like I had a buggered LACP setup on my switch... I suppose that happened after a firmware update, donno, doesn't matter....

Just a guess, but having 4 "bonded" NICs out of sorts could cause all sorts of BS. I've fixed that so now the Synology's bonded LAN ports are properly configured on both ends.

Regarding earlier idea of active hours, here's another slant on this -

Does it maybe make sense to set the refresh interval as a per device (via device page over-ride of the default). Reason is ALL my devices are sync'd and I use the 'master' device only to play/pause... but I do have some RM's to turn on/off outside devices based on time of day. So a refresh for any device other than the 'master' is unnecessary, but I'd like to be able to push an "off" or "on" command to the others via RM... don't care how they are set, so a poll isn't necessary. maybe too unique a situation, that's ok, just throwing something out there that may squelch a lot of traffic.

@xap, I added some code to your integration to do the following:

  1. Each device has a Preference where you can select a default voice/language for the speaker (TTS)
  2. Added a setVoice command so you can override the default in Rule Machine to change voices on the fly.

Note: Preference default voice overrides HE's global voice default. setVoice will override the preference default for the device. If you send a NULL to setVoice then it will go back to the preference default of the device.

Ok, checked it in but not fully tested. It works for most voices I tried but have not tested putting in non-English characters. When I arrive home I will try that out and fix if needed.

Let me know what you think. Only modifications are in squeezebox-player.groovy
Use cases?:

  1. Multi-lingual responses/announcements for multi-lingual homes
  2. Have fun having different devices talking to each other in different voices

*Not all voices have been tested (on-going). Non-English character inputs have not been tested (will test soon).
*To Do: Make the voice selection easier by having user be able to select Gender and Language then narrow down to the few selections. (Not sure how to do that in Preferences yet)

Enjoy!

ecallegari

Well, after some testing. Some of the voices from Amazon do not go through and end up using the global voice. Not sure if Hubitat blocks some or not. Also not sure if Hubitat can accept Mandarin characters either. Still trying out to see if these can be done. (For example, Zhuyi and Chantal are not working). But most all other voices seem to work.

Trial and error.

I'm becoming a fan with the LMS integration so hopefully others still using it. Anybody have an issue using the "Play Favorite" function? Fav1-6 work fine but when you use the one (Play Favorite) to enter a number it has an error.

From the log:

dev:5472019-06-03 11:54:34.154 pm errorgroovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.valueOf() is applicable for argument types: (java.math.BigDecimal) values: [7] Possible solutions: valueOf(int), valueOf(java.lang.String), valueOf(java.lang.String, int) on line 441 (playFavorite)

dev:5472019-06-03 11:54:33.936 pm debugplayFavorite(7)

Thanks for the bug report. I've fixed it. You can either pull the latest from the repo or if you want to apply the fix to your forked code you just need to change the data type in the playFavorite command definition from NUMBER to INTEGER.

2 Likes

Not sure if this is a bug or not however when playing one of the favorites (i.e. radio station in LMS), the track description is the actual station name when you press the Fav button. However if you pause then it actually gives you the track description. If you play then it keeps the track description.

Small bug in my mind since I want to use Fav button on the dashboard and show the track description in another tile. However I would have to do a routine on the button to play favorite #, then pause, then play to get the right track description to show on the dashboard.

Haven't dived into the code but thought I'd throw that out there.

Could you look at the player page on the LMS server's web interface whilst doing this test? Does it show the track info straight away or just the station name?

1 Like

Sorry for my previous lack of debug, just checking first if known.

Here's the behavior I see. If I click on Favorite # (in Hubitat), the LMS player will show the title while Hubitat shows the station name, For example:

Then after clicking stop/pause, the Hubitat updates to the matching title description:

on a side note: while playing around different button sequences trying to see when they are not in sync I found one more thing. "Sometimes" if I press Favorite # in Hubitat 2 or 3 times in a row (without pressing stop/pause), it will make the LMS player page show the station name as well and not the track description. For example I was able to get this:

Very hard to predict when that happens but it does happen randomly.

Hi,

Thank you for your work/contribution with this code to make Squeezebox work with Hubitat.

I just installed and it is working well for me.

Thanks again.

1 Like

Hi,

I have this integration working with the music player on the dashboard..what are others doing for an interface? If there an easy way to use the dashboard or Alexa to search for songs to play?

Ideally I'd like to have an easy interface to select a song and set an alarm at a specific time.

Thanks

Currently I just use the music player for volume and created some buttons to switch radio stations using the Favorite LMS function in RM. Still looking for better ways to display and function on a tablet with dashboard.

BTW, anybody out there using Fire HD tablets with LMS? I use FullyK for HE dashboards around the house on these and try to run the Squeeze Player Lite on each one. Unfortunately every once in awhile (maybe Amazon doing something) the squeeze player drops off. Quite annoying going around to each tablet to reconnect the squeeze players by running the app. I think I tried auto-start and that helped but still. Anybody out there also having squeeze players drop/disconnect on Fire HD tablets?

Just set this up for the first time and was almost flawless... Awesome work!

The only issue I had was that going thru the setup wizard the first time I couldn't select any players because the list kept collapsing on itself. I just continued through the rest of the way without selecting anything and then went back in to the app and was then able to use it as normal.

Thank-you, Thank-you, Thank-you. Best Add-on App Ever!!!


6 more tiles to choose (variety of Pandora and Internet Radio)

2 Likes

Could you please give instructions of how you setup RM to play favourites from the dashboard?

Thanks

Set up Virtual Button for dashboard for each favorite
Set up rule to turn on or off LMS speaker/player of your choice with the custom action to play favx (x being the favorite number of your LMS server which is 0 to 9)
On LMS server set up your favorites order top being 1
Add virtual button to dashboard with background image if you want.

Many thanks, I have it working now.

xap, I am trying to get the amp to turn on and off with the squeezebox, but it seems to take a minute before the amp is turned on or off. Do I have a setting wrong somewhere?

Heya. Can you describe your exact setup and what routines you're using?

xap,
first thank you for offering to help :slight_smile:
I am struggling to control the amp (Hi Fi) with the Squeezebox touch. software has recently been updated from your github sub.

I can turn on the squeezebox and the amp at the same time using a different switch, but when I use the remote control, to turn on the SB, I cannot get the amp to respond very quickly. I have tried to write a rule, and a simple lighting rule.

And I have also tried :


i have the same rule for turning off, tried the on/off toggle marked with a red X too.

There is a lag of about a minute before the logs show the amp turning on.

I have reduced the Players Status Refresh Interval to 2 but with no success. can you guide me please?

I suggest first step is to determine if the delay is in detecting the player is on, or if it is in the routine, or lastly, if it is in switching on the amp.

If you have the refresh interval set to 2 and then watch the player device via the Hubitat web interface, how long is the delay for the status on the page to update after you switch on the player from the squeezebox itself (or its remote)?

1 Like