Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    4

    Your home-made LMS API projects

    Hi,

    While my many years ago promised Opera plugin to control LMS went nowhere, I still have lots of fun with SqueezeBox' LMS API.
    The openness is probably the reason why I want to stick with SB as long as possible.

    Some of my more noticeable home-brew projects have been:

    1) A Opera browser (12 Presto and 19-upwards) plugin that shows artwork and title or artist of the currently playing song in a Speed Dial entry. A click opens LMS on the selected player. I have been using this plugin myself for years, but I have not released it on Opera's add-in store, as it will require tons of finishing touches. Password protected servers and mysqueezebox.com are not supported. Of course I am willing to upload it somewhere if someone's interested. As it has not been released on Opera's Add-on store, it requires enabling Opera's Developer mode, that would be a security risk. Also note that as long as Opera is running, it is polling LMS every X seconds (configurable from 5 to 60 seconds), I do not expect WebSocket support is on the LMS roadmap It can be configured to stop polling after X unsuccessful tries however. Again it was mostly made for my personal enjoyment, but if there's interest I'd be willing to work on it.

    2) I bought a new Logitech keyboard (at least they still make those ) with neat media keys. Still I hardly play music on my desktop PC, I wanted to control LMS with these keys. Unfortunately Logitech's SetPoint utility's UI does not let me re-assign the Media Keys. With a bit of research I found out that you can edit a XML file manually to add functions to almost any key, including the Media Keys.

    I'm a developer, so I created a native Win32 program that simply connects to LMS' TelNet interface (the compiler I used did not have built-in support for JSON, so I chose the TelNet interface) and sends parameter-driven commands to LMS. Now I can rewind, play/pause, forward, mute/unmute and volume up/down with a press of a button. I have been using this for a week now, on a Windows 10 desktop PC, and it seems to work remarkably well. I hope Logitech will not introduce major new versions of SetPoint for a long time

    Are there other people that have been playing with the various SqueezeBox-related APIs and created some noticeable home-brew projects that you wouldn't want to miss?
    Squeezeboxes: Touch (on Yamaha AVR667) + Radio connected to LMS 7.9.0 (Raspberry Pi 2B) . Plugins used: Spotify and LastFM Scrobbler.
    Using Orange Squeeze on HTC 10 phone, iPeng on iPod Touch (6th generation), SqueezePlayer on WeTek Core Android media player.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,779
    I recently discovered BitBar for OSX/macOS (http://getbitbar.com). This allows you to build menu bar items using your preferred scripting or programming language. I've cobbled together a quick Perl script which gives similar options as the tray icon on Windows:

    Name:  Bildschirmfoto 2016-09-19 um 13.57.22.png
Views: 516
Size:  41.5 KB

    If I find time I might add some basic player control to it, together with title display in the menu bar, artwork... ok, I probably won't have time for all of this anytime soon, but if somebody was interested, the script is up on github.

    If you're just interested in using the script as it is, head over to the BitBar website, install the application (https://getbitbar.com/plugins/Music/check-lms.10s.pl)
    Michael

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

  3. #3

    Your home-made LMS API projects

    mherger <mherger.7mf1fb (AT) no-mx (DOT) forums.slimdevices.com> writes:

    > I recently discovered BitBar for OSX/macOS (http://getbitbar.com). This
    > allows you to build menu bar items using your preferred scripting or
    > programming language. I've cobbled together a quick Perl script which
    > gives similar options as the tray icon on Windows:
    >
    > 21136
    >
    > If I find time I might add some basic player control to it, together
    > with title display in the menu bar, artwork... ok, I probably won't have
    > time for all of this anytime soon, but if somebody was interested, the
    > script is up on github.
    >
    > If you're just interested in using the script as it is, head over to the
    > BitBar website, install the application
    > (https://getbitbar.com/plugins/Music/check-lms.10s.pl)
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: Bildschirmfoto 2016-09-19 um 13.57.22.png |
    > |Download: http://forums.slimdevices.com/attach...hmentid=21136|
    > +-------------------------------------------------------------------+


    That looks really nice - but it would be even nicer, if I could use it
    with an LMS server which is running on a different machine. Any chance
    of adding this?

    Rainer

    >
    >
    > Michael
    >
    > http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR
    > ------------------------------------------------------------------------
    > mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
    > View this thread: http://forums.slimdevices.com/showthread.php?t=106168
    >
    >

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,779

    Your home-made LMS API projects

    > That looks really nice - but it would be even nicer, if I could use it
    > with an LMS server which is running on a different machine. Any chance
    > of adding this?


    Ha! It's certainly something I've been thinking about - because I'm not
    running my LMS on the Mac. I only implemented this as a POC and to get
    an understanding of BitBar. It's a tool I might be using for other
    purposes, too.

    The problem with the "remote" server case is that it's a much more
    complicated case. In the LMS on Mac case we have well defined paths, a
    known environment. But with a remote server? How would we find it? How
    would we restart a service on a remote Windows or Linux machine? A
    BitBar plugin for a remote LMS would not be able to cover the feature
    set I've demoed in the existing plugin. But it could of course feature
    stuff like "now playing" information, basic player control etc. But
    still, server discovery would be a problem, as those plugins are being
    run in intervals, they're not kept in memory to eg. listen for LMS
    instance discovery messages.

    What kind of features would you like to see?

    --

    Michael

  5. #5

    Your home-made LMS API projects

    Michael Herger <slim (AT) herger (DOT) net> writes:

    >> That looks really nice - but it would be even nicer, if I could use it
    >> with an LMS server which is running on a different machine. Any chance
    >> of adding this?

    >
    > Ha! It's certainly something I've been thinking about - because I'm
    > not running my LMS on the Mac. I only implemented this as a POC and to
    > get an understanding of BitBar. It's a tool I might be using for other
    > purposes, too.
    >
    > The problem with the "remote" server case is that it's a much more
    > complicated case. In the LMS on Mac case we have well defined paths, a
    > known environment. But with a remote server? How would we find it? How
    > would we restart a service on a remote Windows or Linux machine? A
    > BitBar plugin for a remote LMS would not be able to cover the feature
    > set I've demoed in the existing plugin. But it could of course feature
    > stuff like "now playing" information, basic player control etc. But
    > still, server discovery would be a problem, as those plugins are being
    > run in intervals, they're not kept in memory to eg. listen for LMS
    > instance discovery messages.
    >
    > What kind of features would you like to see?


    I see the problems, but other plugins for BitBar are using settings you
    have to set in the plugin - other option would be a config file, in
    which these are defined. I don't think an automatic recovery would be
    necessary - it could be added later.

    Restarting of LMS: the same. A command could be configured in a config
    file, I use for LMS on a Linux box e.g.:

    ,----
    | ssh root (AT) 192 (DOT) 168.1.100 'service logitechmediaserver restart'
    `----

    and have enabled password-less login - so I can restart LMS without
    having to issue a password from my Mac. I have *no* idea about Windows.

    There should probably be two plugins:

    1) for server control and which can start the player control and
    settings via the LMS web interface. Now Playing for all connected
    players could be a nice feature as well.

    2) player control / remote. As I am controlling my players via iPeng
    (even when I am on the computer - I really like the iPeng interface) I
    am not so much in need of a BitBar plugin for this.

    Rainer

    --
    Rainer M. Krug
    email: Rainer<at>krugs<dot>de
    PGP: 0x0F52F982


  6. #6
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,109
    Not that I really care about Bitbar or the like, but I'd like to point we have a great power management plugin thanks to gharris999.
    It can do this, among a great many other things (characters unescaped for readability):
    Code:
    $  nc  montreux.local 9090
    srvrpowerctrl screstart
    srvrpowerctrl screstart    screstart in 15 seconds.
    
    srvrpowerctrl reboot
    srvrpowerctrl reboot    reboot in 15 seconds.
    "screstart" restarts the LMS service.
    "reboot" restarts the whole machine if you've configured the plugin to fit your machine's specifics.

    I think that's way more portable than remote command execution.
    Last edited by epoch1970; 2016-09-27 at 02:36.
    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.

  7. #7

    Your home-made LMS API projects

    epoch1970 <epoch1970.7mp7mn (AT) no-mx (DOT) forums.slimdevices.com> writes:

    > Not that I really care about Bitbar or the like, but I'd like to point
    > we have a great power management plugin thanks to gharris999.


    You are referring to https://github.com/gharris999/SrvrPowerCtrl this
    one?

    > It can do this, among a great many other things (characters unescaped
    > for readability):
    > Code:
    > --------------------
    > $ nc montreux.local 9090
    > srvrpowerctrl screstart
    > srvrpowerctrl screstart screstart in 15 seconds.
    >
    > srvrpowerctrl reboot
    > srvrpowerctrl reboot reboot in 15 seconds.
    > --------------------
    >
    > "screstart" restarts the LMS service.
    > "reboot" restarts the whole machine if you've configured the plugin to
    > fit your machine's specifics.
    >
    > I think that way's more portable than some remote command execution.


    agreed.

    How can I install this plugin?

    Rainer

    >
    >
    >
    > 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.
    > ------------------------------------------------------------------------
    > epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
    > View this thread: http://forums.slimdevices.com/showthread.php?t=106168
    >
    >

  8. #8
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,109
    ServerPowerControl has a thread in the 1/3-party software subforum.

    Since GoogleCode has gone dark the repository is no longer available. You have to download manually the plugin.
    Then, last time I've tried installing the plugin I've found a bug in a post-install script that could damage the /etc/sudoers file format. I don't know if the bug is still there but I suspect it is.
    For all these reasons, I would recommend reading post #1, then *read posts on pages 213 down* (to 216, as of now...)

    Installing is not complicated, even today. Simply I advise a bit of caution during post-install. With that, I think you'll find SPC runs great.
    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.

  9. #9

    Your home-made LMS API projects

    epoch1970 <epoch1970.7mpstz (AT) no-mx (DOT) forums.slimdevices.com> writes:

    > ServerPowerControl has 'a thread'
    > (http://forums.slimdevices.com/showth...vrPowerControl)
    > in the 1/3-party software subforum.
    >
    > Since GoogleCode has gone dark the repository is no longer available.
    > You have to download manually the plugin.
    > Then, last time I've tried installing the plugin I've found a bug in a
    > post-install script that could damage the /etc/sudoers file format. I
    > don't know if the bug is still there but I suspect it is.
    > For all these reasons, I would recommend reading post #1, then *read
    > posts on pages 213 down* (to 216, as of now...)
    >
    > Installing is not complicated, even today. Simply I advise a bit of
    > caution during post-install. With that, I think you'll find SPC runs
    > great.


    Thanks - I might look into it.

    But can't these forums use threads for what they are supposed to be:
    Discussing one question and not one plugin?

    Rainer

    >
    >
    >
    > 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.
    > ------------------------------------------------------------------------
    > epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
    > View this thread: http://forums.slimdevices.com/showthread.php?t=106168
    >
    >

  10. #10
    Junior Member
    Join Date
    Oct 2016
    Posts
    9
    Hello! Can You make a plugin for browser or android widget that will display the volume level of the player?
    I can control vol level by Tasker, but icant see it... (((
    Last edited by Errik128; 2016-11-02 at 03:48.

Posting Permissions

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