Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 38 12311 ... LastLast
Results 1 to 10 of 373
  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    4

    Announce: ShairTunes Plugin

    Hi,

    I have created a plugin that integrates ShairTunes into LMS.

    https://github.com/DSTMK/shairport_helper
    https://github.com/DSTMK/shairport_plugin

    You will need to build and install the shiarport_helper first and then install the plugin.

    The plugin will announce an AirPlay target for each player. The player will automatically switch to AirPlay as soon as a client connects to the AirPlay target. The helper will take the audio data from the AirPlay client and convert it into a PCM stream that a squeezebox can play. Also, the Plugin will forward the volume control.

    Please consider this as beta and use at your own risk. Comments and contributions are welcome.

    Regards,

    DSTMK

  2. #2
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,024
    Quote Originally Posted by DSTMK View Post
    I have created a plugin that integrates ShairTunes into LMS.
    Sounds great!

    Quote Originally Posted by DSTMK View Post
    You will need to build and install the shiarport_helper first and then install the plugin.
    Is there a reason you don't want to build and distribute binaries for the mostly used platforms with the plugin ?
    Kind of similar to what Triode does in the Spotify plugin and its helper daemon.

    It feels like this would make it a lot easier for people who want to try it and doesn't have the skills to do the compilation. An alternative to bundling it with the plugin could maybe be to build binaries for mostly used platforms and offer them as separate downloads so people at least doesn't have to to the compilation themselves.
    Last edited by erland; 2013-11-17 at 10:32.
    Erland Isaksson (My homepage)
    Lead platform developer of ickStream Music Platform - A world of music at your fingertips

    (Also developer of many plugins/applets)

  3. #3
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,191
    This sounds like something I wanted to do for a long time! Excellent!

    Will have to give this a try asap. But just from looking at the code I fear installation will be a bit involved, as it has some dependencies Joe Doe will have a hard time to satisfy...
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  4. #4
    Junior Member
    Join Date
    Nov 2013
    Posts
    4
    Thank you for your comments. I do not have much expirience with neither Squeezebox Plugin Programming nor Perl and since you two seem to have quite some reputation in those fields, this is very helpful.

    Bundling binaries seems to be a good idea, but I can only build them for Linux x86 and Linux x64. I have never used any other platform as Squeezebox Server. I can see that in Triode's plugin there is an arm binary (probably for all the NAS boxes). Do you have a list of architectures that I should consider? There is probably Windows and maybe even MIPS???

    You will probably need to install the avahi daemon and then some perl modules:

    IO::Socket::INET6
    Crypt::OpenSSL::RSA
    Net::SDP

    Is there a way to package those modules with my plugin? It looks like there is already lots of perl library stuff bundled with the Squeezebox Server in it's CPAN directory...

    Let me know if you have trouble compiling.

    And one more question: Is there a better way to flush a Client's audio buffer than stopping it and then having it reconnect to the source? I'd need to do the flush as fast as possible to get good results when the user is changing songs at the AirPlay client.

    Regards,

    DSTMK

  5. #5
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,024
    Quote Originally Posted by DSTMK View Post
    Thank you for your comments. I do not have much expirience with neither Squeezebox Plugin Programming nor Perl and since you two seem to have quite some reputation in those fields, this is very helpful.

    Bundling binaries seems to be a good idea, but I can only build them for Linux x86 and Linux x64. I have never used any other platform as Squeezebox Server. I can see that in Triode's plugin there is an arm binary (probably for all the NAS boxes). Do you have a list of architectures that I should consider? There is probably Windows and maybe even MIPS???
    I think Triode is buildig the following Linux versions for Spotify plugin:
    - Linux arm5te soft float (for example SheevaPlug)
    - Linux arm6 hard float (for example Raspberry Pi, Wandboard)
    - Linux Intel 32 bit
    - Linux Intel 64 bit

    If OSX and Windows is supported, additional binaries for these operating systems might make sense also.

    However, if the helper daemon is reasonably stable and doesn't have to be rebuilt very often, it might be worth to consider just distributing Intel Linux binaries to start with and let other developers provide the others if you can't easily build them yourself.

    Quote Originally Posted by DSTMK View Post
    You will probably need to install the avahi daemon and then some perl modules:

    IO::Socket::INET6
    Crypt::OpenSSL::RSA
    Net::SDP

    Is there a way to package those modules with my plugin? It looks like there is already lots of perl library stuff bundled with the Squeezebox Server in it's CPAN directory...
    You can put additional modules in the "lib" subdirectory under the plugin, for example as ShairTunes/lib/IO/Socket/INET6.pm
    Erland Isaksson (My homepage)
    Lead platform developer of ickStream Music Platform - A world of music at your fingertips

    (Also developer of many plugins/applets)

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Posts
    8,410
    Quote Originally Posted by erland View Post
    I think Triode is buildig the following Linux versions for Spotify plugin:
    - Linux arm5te soft float (for example SheevaPlug)
    - Linux arm6 hard float (for example Raspberry Pi, Wandboard)
    - Linux Intel 32 bit
    - Linux Intel 64 bit
    I build far to many versions.. but this is a good set for linux. I would then add osx and windows (though I think your code may need some windows specifics for that..)

    IO::Socket::INET6
    Crypt::OpenSSL::RSA
    Net::SDP
    Not sure you really need IPv6?
    Also is it possible to port to pure perl versions of RSA (e.g. Crypt::RSA) - I've not looked at the code enough to see. [Edit - looks like Crypt:RSA has dependencies too - perhaps OpenSSL is the best way, but will mean binaries too.]
    I think Net::SDP is pure perl so just needs you to include in the lib directory?
    Last edited by Triode; 2013-11-18 at 14:17.

  7. #7
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,208
    Does this require a waveinput configuration ?
    With some difficulty I got the plugin to advertise my players, receive a stream request from iTunes on a mac, but then the server crashes.
    This is about how far it went.
    Code:
    [13-11-23 15:57:40.1771] Plugins::ShairTunes::Plugin::playerSubscriptionChange (65) request=client new client=Safranier
    [13-11-23 15:58:14.0798] Plugins::ShairTunes::Plugin::handleSocketConnect (151) New connection from::ffff:172.17.255.40
    [13-11-23 15:58:14.0824] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
    [13-11-23 15:58:14.0878] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: OPTIONS
    [13-11-23 15:58:14.3003] Plugins::ShairTunes::Plugin::conn_handle_request (388) RTSP/1.0 200 OK
    Apple-Response: RxjT2FvxNIsL5cvD3jL+7gxD4QgAypk3cq4q1rZ55ZS6T6RpSWnhO9OKVcXBnvKO2z9FK15rV/vr/+fvvccXUmDupz5LogNTClwXkPbwGpMp6AWfrh4edy2X3wm13JTRG2B4VB5EMdKYN8CVogdHEfAlPJg3Cn9dU7tEQGtVC/tgofI74Y3q+aT4wsti15TwtVLwbszS6R94PrsgvBVe0503nO1mJsz5MUTfSbn1qXEvGw6E5rRNMi5AKb3CGOsGxBHeS1d6HGZSsRbPLfTSf8i6ylS4cKimTrl+3NJI5Tqrd9bmLFaPAad30e3Przp+Kh53AWQm0yE/M+GYEFcEEA
    Audio-Jack-Status: connected; type=analog
    CSeq: 1
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER
    
    [13-11-23 15:58:14.3046] Plugins::ShairTunes::Plugin::handleSocketRead (165) Closed: IO::Socket::INET6=GLOB(0xcd8b660)
    [13-11-23 15:59:30.4596] Plugins::ShairTunes::Plugin::handleSocketConnect (151) New connection from::ffff:172.17.255.40
    [13-11-23 15:59:30.4622] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
    [13-11-23 15:59:30.4701] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: ANNOUNCE
    [13-11-23 15:59:30.4728] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
    [13-11-23 15:59:30.6587] Plugins::ShairTunes::Plugin::conn_handle_request (388) RTSP/1.0 200 OK
    Audio-Jack-Status: connected; type=analog
    CSeq: 1
    
    [13-11-23 15:59:30.6624] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
    [13-11-23 15:59:30.6664] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: SETUP
    [13-11-23 15:59:30.6702] Plugins::ShairTunes::Plugin::conn_handle_request (316) decode command: "hairtunes" tport '6002' iv '14615bc01e5dddf706de2f403537a032' pipe '/tmp/pipe' cport '6001' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '6002' key 'fae94adcf20d35c7595d27cca6f89edd'
    3 SB 3 • Libratone Loop, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Server Power Control by Gordon Harris • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  8. #8
    Senior Member
    Join Date
    Jul 2005
    Location
    Ann Arbor, MI, USA / Pune, India
    Posts
    489
    Has anyone got this plugin to work on a MacOS SqueezeBox Server?

  9. #9
    Senior Member
    Join Date
    Oct 2007
    Posts
    137
    this one sounds really great! Anybody an idea how to compile on windows? Sadly DMSDK wasn't here since nov 2013 - so another good project dying before it was alive ? ;-(

  10. #10
    Senior Member
    Join Date
    Sep 2009
    Posts
    132

    Shairtunes help needed ;)

    Hi There,

    are there any that succesfully has gotten this plugin to work - it is causing me some headache.

    I'm running Ubuntu 13.10 and LMS 7.8 but can't get it to work.

    I have done the following:
    - installed packages: sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
    - Copied the plugin to the plugin folder. It seems to be running under the "LMS settings - plugins"
    - Extracted the helper to my desktopfolder, run "make", "make install"
    - Restarted my LMS with "sudo service logitechmediaserver restart"

    What's missing, or how do I debug this?
    Thanks.
    Martin

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •