Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Logitech Squeezebox Radio


piotr.janiak

Question

Recommended Posts

  • 0

I want to play sound from my Squeezebox in the bathroom. Would be great if the HC2 would be able to turn my amp on and tell the Squeezebox to start playing in that zone.

Link to comment
Share on other sites

  • 0
Guest GG

Have you checked what is really sent when you use telnet?

I mean, there might be some control characters transmitted after the actual data you want to send that is not sent when you use HC2.

Link to comment
Share on other sites

  • 0

Thanks I had a check and the commands look the same. The cli command only needs a LF at the end.

It looks like the HC2 is closing the connection. I must be doing something wrong in the code or it is a bug.

Link to comment
Share on other sites

  • 0
Guest GG

Please login or register to see this code.

OK, then I think I know what is the problem.

The string you are actually sending does not end with a LF, it ends with the string "%0A".

if you change to:

Please login or register to see this code.

you are actually sending a LF at the end.

Link to comment
Share on other sites

  • 0

The string you are actually sending does not end with a LF, it ends with the string "%0A".

if you change to:

Please login or register to see this code.

you are actually sending a LF at the end.

Thanks that fixed it. I was sending an encoded string, ":" replaced by %3A, LF by %0A etc. when that was not working I tried with various other versions but I should have realised

Please login or register to see this image.

/emoticons/default_icon_redface.gif" alt=":oops:" />

Link to comment
Share on other sites

  • 0
Guest GG
Thanks that fixed it.

Glad I could help

Please login or register to see this image.

/emoticons/default_icon_biggrin.gif" alt=":-D" />

Link to comment
Share on other sites

  • 0

Starter for any cli commands from a virtual device. I will have a look at getting the status back now.

One strange behaviour is that the first read does not get the data but second does. Can anyone explain?

Please login or register to see this code.

Please login or register to see this link.

thanks for the support

Link to comment
Share on other sites

  • 0

So if I understand this correctly, you are now able to have your SB play music?

Is it also possible to instruct it what music to play, based on the time of day?

Link to comment
Share on other sites

  • 0

Well as the net library is not supported in scenes yet I think you would have to put the play command in a button and call the button from a scene but I see no reason why not.

I am messing around sorting out a sqeezeplugin to turn my amps on/off by calling HC2 api when players start playing and stop so have not messed with that yet but the cli command is this from the help file.

(The commands are all in the help file under technical.)

playlist play

The "playlist play" command puts the specified song URL, playlist or directory contents into the current playlist and plays starting at the first item. Any songs previously in the playlist are discarded. An optional title value may be passed to set a title. This can be useful for remote URLs. The "fadeInSecs" parameter may be passed to specify fade-in period.

Examples:

Request: "04:20:00:12:23:45 playlist play /music/abba/01_Voulez_Vous.mp3"

Response: "04:20:00:12:23:45 playlist play /music/abba/01_Voulez_Vous.mp3"

so put a string like this in the cmnd local and it should work "playlist play /music/abba/01_Voulez_Vous.mp3 " or the directory or the name of a saved playlist.

With squeeze we have so many options as there is cli, http and universal media interface but cli is simple so I have stuck with this to start with.

Love to hear how you get on.

Link to comment
Share on other sites

  • 0

Hi,

I don't think there is a way to get a callback in a virtual device or scene from Logitech cli interface to get status change in HC2.

Rather than polling, I hacked together this SB plugin to turn on and off amplifiers attached to HC2 on/off switches. It works with touches, receivers and transporter but is not thoroughly tested.

Unzip and copy to your plugin directory. Restart.

Go to settings HC2AmpControl and enter the details of HC2. Restart LMS after setting.

The password is stored in clear text!!! but then HC2 api uses basic auth so....

For the players enter the MAC address against the HC2 device ID for the related amp.

All it does is call the HC2 api for corresponding device when a player turns on/off.

I don't intend to polish this as you can see from the settings screen and code...hope that as HC2 matures will be able to do something neater.

Rob

Update 14/02/2013

Hi,

I notice a few have taken a copy of the add in . I am going to mod so that it turns the amp on when play starts and off after a delay after play stops.

Please login or register to see this link.

Do people want the old version still or can I just keep one version?

Please login or register to see this attachment.

Please login or register to see this link.

Link to comment
Share on other sites

  • 0
So if I understand this correctly, you are now able to have your SB play music?

Is it also possible to instruct it what music to play, based on the time of day?

Hi,

Regarding your question about turning on and playing music at set times. If you use the SB add-in I have posted you can set the music to play in a SB alarm for the player and this add-in will turn on/off your amp via HC2.

I will have a test of other cli commands but until HC2 supports callbacks to get the state of a player when it changes, using HC2 as a primary interface for SBs is not going to be a good experience.

It is OK for pausing/muting.

You could set up sync zones at different times of day or at a press of a button.

Send text or speech to the players etc

I will post the equivalent set of commands to those posted for Sonos but that is as far as I will go until HC2 has equivalent to add-ins.

Hope that helps.

Link to comment
Share on other sites

  • 0

Tested a few cli commands

Please login or register to see this code.

[ Added: 2013-03-12, 20:53 ]

As the HC2 add in framework is not here yet a more robust version

Please login or register to see this link.

Link to comment
Share on other sites

  • 0

Hi,

I try to install your squeezebox plugin but squeezecenter unable to load plugin, do you know why?

thx

[ Added: 2013-06-16, 13:01 ]

Its work now, very very good

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

thank you

Link to comment
Share on other sites

  • 0

Hi,

There is a small bug I must have a look at

Please login or register to see this image.

/emoticons/default_icon_rolleyes.gif" alt=":roll:" /> when the delay off is not cancelled by all play events....

It should load though. What was the issue?

[ Added: 2013-07-18, 16:52 ]

Corrected a few issues and checked the status of the amp switch each time so player and amp can not get out of sync.

Please login or register to see this link.

Still not fixed the settings so they update without a restart...one day when I have time

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

Please login or register to see this link.

Link to comment
Share on other sites

  • 0
Guest GrZeCh

Hello,

do you know maybe why this error is showind during module enabling:

Please login or register to see this code.

?

I'm using LMS version: Logitech Media Server Version: 7.7.2 - r33893 @ Wed Mar 14 05:46:46 PDT 2012

[ Dodano: 2013-08-08, 13:17 ]

As a side note recently I've started to look for a squeezebox emulation and without any issues I've managed to run in backgroung squeezeslave process on my XBMC Raspbmc running on Raspberry Pi which started me thinking about creating a network of squeezeslave instances at my home which would be runned on Raspberry. In some cases where other multimedia functions will be used then it makes sense but if I want to play only music I've found out that buying cheapest Android tablet with WiFi and install on it Squeezebox emulator is waaaay cheaper. For example we can have working sound solution for about 50USD

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />. Since Android tablets have mini jack 3.5 output then they can be even hidded on the back of existing player which have AUX input. All of squeezebox emulators (Squeezeslave runned on Raspberry, SB Player runned on android and Softsqueeze on PC Desktop) are visible in Logitech Media Server and can be managed using Logitech Android app without any problems.

Link to comment
Share on other sites

  • 0

I think you do not have perl IO socket installed.

The plugin communicates with HC2 using sockets to the API.

If you search perl install io socket on google you can find out how to add for your OS

Link to comment
Share on other sites

  • 0
Guest GrZeCh

I've installed perl modules but module is still not being enabled. Weird thing is that I don't see any errors in server.log related to enabling this module.

Link to comment
Share on other sites

  • 0

Have you enabled debug on advanced/logging tab. This may help us understand what is going on.

[ Added: 2013-08-08, 19:51 ]

[ Dodano: 2013-08-08, 13:17 ]

I've found out that buying cheapest Android tablet with WiFi and install on it Squeezebox emulator is waaaay cheaper. For example we can have working sound solution for about 50USD

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />.

Thanks for the idea. Have tested on my PI and like it but the android is another inexpensive way to have music everywhere.

Do they sync well?

Link to comment
Share on other sites

  • 0

Hi!

I try to install the plugin but the LMS Will not load the plugin, i have tried everything, install LMS on Mac, Linux, debian, Ubuntu, install pearl socket and so on .....

Still get the same error in the log as other here in this thread.

Any tips?

Please login or register to see this image.

/emoticons/default_laugh.png" alt=":lol:" />

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...