Home of the Squeezebox™ & Transporter® network music players.
Page 18 of 23 FirstFirst ... 81617181920 ... LastLast
Results 171 to 180 of 221
  1. #171
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,817
    It needs a https accessible site that can host code. I can reactivate mine and PM you the details so that you can try it out.
    Philippe didnít have much joy with it.

    Am travelling at the moment but should have some time on Monday.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  2. #172
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79
    Thanks - no hurry with it. I have such a site myself so can self host to try. But if the great master Philippe had no joy then I doubt Iíll fare any better

  3. #173
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79

    [Announce] 'MediaServer' *certified* Alexa skill for LMS

    @everybody: I've updated the Lambda behind the skill from Node js v8 to v10 and notice quite the performance improvement myself (40% is promised). All tests passed OK but please let me know if you encounter any errors as a result of the switch. It should be fully transparent to you otherwise.
    Last edited by philchillbill; 2019-10-21 at 22:28.

  4. #174
    Senior Member
    Join Date
    Feb 2008
    Posts
    4,638
    Oh dear. I switched to 'brief' answers ... where did THAT double burp sound come from???

    How about a nice chime?
    LMS server: Pi Zero

    Amp: Denon PMA-50

    Players/Speakers: Touch, Logitech Radios, Sonos Play 1s & Beam, Libratone Zipp, GGMM E2 & E3, Yamaha WXAD-010, Loewe Airspeaker, Google Home Mini, Pioneer WX-SMA1, Roberts S1, O2 Joggler, Cisco Joggler

    Brexit = ∞ stupidity


    ------------------------------------------------------------------------------------

  5. #175
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79
    Quote Originally Posted by castalla View Post
    Oh dear. I switched to 'brief' answers ... where did THAT double burp sound come from???

    How about a nice chime?
    Aha, so you discovered the little 'Easter Egg'

  6. #176
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79
    I need the user's local IP address and port to enable playing music on an Echo device as speaker rather than a Squeezebox. When the user account-links, I only get their external address (e.g. ngrok). When using the Material skin and in debug-JSON mode, I can see the JSON command that extracts the server info such as local IP-address and port as follows:

    { method => 'slim.request', params => ["", ["material-skin", "info"]]}

    which returns the following for me:

    {
    "method" : "slim.request",
    "params" : [
    "0",
    [
    "material-skin",
    "info"
    ]
    ],
    "result" : {
    "info" : "{"server":[ {"label":"Version", "text":"7.9.2 - 0026.1567524015 @ Wed Sep 4 12:28:40 CEST 2019"},{"label":"Hostname", "text":"DiskStation"},{"label":"Server IP Address", "text":"192.168.178.3"},{"label":"Operating system", "text":"Synology DSM 6.2.2 - EN - utf8"},{"label":"Platform Architecture", "text":"x86_64-linux"},{"label":"Perl Version", "text":"5.24.0 - x86_64-linux"},{"label":"Audio::Scan", "text":"0.95"},{"label":"IO::Socket::SSL", "text":"2.037"}, {"label":"Database Version", "text":"DBD::SQLite 1.34_01 (sqlite 3.7.7.1)"}]}"
    }
    }
    Any idea what the equivalent would be for the Default skin? I cannot rely on a user having Material installed. I searched all the CLI docs but don't find any mention of it.

  7. #177
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,310
    Quote Originally Posted by philchillbill View Post
    I need the user's local IP address and port to enable playing music on an Echo device as speaker rather than a Squeezebox. When the user account-links, I only get their external address (e.g. ngrok).
    As Craig mentioned there's no easy, one shot solution to this built in to LMS. That's why he implemented his own. I could probably add that little information to the serverstatus query. But then you'd still have to tell your users to install the latest and greatest (still to be built) version of LMS.

    Until then I see two options/workarounds: the server's IP address is part of the server information which is eg. printed in

    http://localhost:9000/settings/server/status.html

    You could grab this page and try to parse it. Ugly business.

    A little less ugly: the same information is provided in the system information menu, available through the "systeminfo" query. The following would give you the top level menu:

    Code:
    [
                "systeminfo",
                "items",
                0, 999,
                "menu:1"
    ]
    The first item in the result loop would be the server information sub-menu.

    Code:
    {
        "result": {
            "item_loop": [
                {
                    "addAction": "go",
                    "actions": {
                        "go": {
                            "params": {
                                "item_id": "5f431c9f.0",
                                "menu": "systeminfo"
                            },
                            "cmd": [
                                "systeminfo",
                                "items"
                            ]
                        }
                    },
                    "text": "Logitech Media Server"
                },
    ...
    Take that item_id to get the list of items:

    Code:
    [
                "systeminfo",
                "items",
                0, 999,
                "menu:1",
                "item_id:5f431c9f.0"
            ]
    That in turn would get you a list of information pieces about your server. "Unfortunately" those items are localized. The one you're looking for is usually starting with the literal uppercase "IP". Only Polish and Russian would be slightly different.

    Code:
    {
    ...
        "result": {
            "item_loop": [
                {
                    "text": "Logitech Media Server Version: 7.9.2 - git-cf0829403 @ 2019-10-26 11:54:03 +0200",
                    "type": "text",
                    "style": "itemNoAction",
                    "action": "none"
                },
                {
                    "action": "none",
                    "style": "itemNoAction",
                    "type": "text",
                    "text": "IP: 192.168.0.74"
                },
    ....
    But filtering the item loop on "text" using the regex "IP.*:\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" should get you the address .
    Michael

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

  8. #178
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,310

    [Announce] 'MediaServer' *certified*Alexa skill for LMS

    > As Craig mentioned there's no easy, one shot solution to this built in
    > to LMS. That's why he implemented his own. I could probably add that
    > little information to the serverstatus query. But then you'd still have
    > to tell your users to install the latest and greatest (still to be
    > built) version of LMS.


    Adding the IP to serverstatus took me much less time than my first
    response...

    https://github.com/Logitech/slimserv...93f88c9dadde82

    Should be available soon.

    --

    Michael

  9. #179
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79
    Thanks Michael, much appreciated. I had already considered grabbing the status page and parsing it but thatís indeed yuk. Glad thereís a better way.

  10. #180
    Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    79
    Quote Originally Posted by mherger View Post
    Adding the IP to serverstatus took me much less time than my first
    response...

    https://github.com/Logitech/slimserv...93f88c9dadde82

    Should be available soon.

    --

    Michael
    Wonderful ! Will that include the port number for the local server or just the bare IP address? Port is needed to do what I want to do.

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
  •