bpa wrote:
> The following mnay be too much for you but you might as well have the
> info.
>
> Player discover LMS servers using broadcast on UDP on port 383 -
> iognore this if you see references to this.
>
> LMS talks to a player(e.g. squeezelite) using a protocol called
> slimproto on a TCP connection on port 3483 of the LMS server. Slimproto
> enables player to be told by LMS player to play music from an URL (can
> be remote but usually LMS) , vol up , vol down etc. Using slimproto
> Player tell LMS when it needs data, buffer empty etc.
>
> To talk to an LMS server a player has to open a TCP connecton from the
> player to the LMS server on port 3483. This means if a player is
> actively connected to an LMS server there is a TCP connection on the
> player to destination port 3483.
>
> The CLI is a totally separate LMS communication. It is supported by LMS
> server usually on port 9090 (can be changed in settings). It is intended
> to be used by "remote" applications (i.e. not running on LMS server
> processor) who want to "talk" to LMS server and get info from the LMS
> server about the LMS system, libraries etc.
>
> I don't know what available on pcp. but if LMS is on a server with IP
> address 192.168.1.250 then this would be (LMS inserts <LF> betweens
> lines of the response which is encoded as %3A). BLue is the user entry,
> red is LMS response - use your own IP address and MAC address of player
> has been altered.
> >
Code:
--------------------
> >
> telnet 192.168.1.250 9090
> Trying 192.168.1.250...
> Connected to 192.168.1.250.
> Escape character is '^]'
> players
> players count%3A2
> players 0 1 connected
> players 0 1 connected count%3A2 playerindex%3A0
playerid%3A7x%3Adx%3A3x%3Aax%3A3x%3A7x uuid%3A ip%3A192.168.1.58%3A32806
name%3ASqueezeLite seq_no%3A0 model%3Asqueezelite modelname%3ASqueezeLite
power%3A1 isplaying%3A0 displaytype%3Anone isplayer%3A1 canpoweroff%3A1
connected%3A1 firmware%3Av1.8-589
> 7x:dx:3x:ax:3x:7x connected ?
> 7x%3Adx%3A3x%3Aax%3A3x%3A7x connected 1
>
>
--------------------
> >
>
> I don't know what is available on pcp but once you understand the CLI
> commands then for an application you might find it easier to use
> "curl" on port 9000 and using POST request JSON encoded commands
> instead of telnet - the CLI command is in the "params"
> example command
> >
Code:
--------------------
> >
> curl -X POST -d
'{"id":0,"params":["00:04:20:ab:cd:ef",["playlist","index","+1"]],"method":"slim.request"}'
http://yourserver:9000/jsonrpc.js
>
--------------------
> >
thank you very much.
Thanks to other people for contributing to this discussion
I completely understand what you said. there are totally 2 ways.
1- checking tcp 3483 port to understand by netstate command in sh file
scripting.
if it is connected GPIO pin number is going to be high and LED will be
on.
2- using CLI command via telnet from linux command. I guess it is
accessible in picoreplayer. I have to test it. I do not know about Curl.
but I guess it is not too complex.
I studied software engineering and have some experiences about networks
and security. I can handle it.
today I run squeezelite emulator on my windows 10 as a client and
logitech media server and I run that command you write with termux on my
android phone.
it is worked and responded : " xx%3Axx%3Axx%3Axx%3Axx%3Axx connected 1"
.
when it is not connected responded :
"xx%3Axx%3Axx%3Axx%3Axx%3Axx connected %3F " or
"xx%3Axx%3Axx%3Axx%3Axx%3Axx connected ?"
"%3F" is mean "?". not responded 0 in result.
however right not I don't know Linux command to cut "1" from result. I
should work on it.
all in all I must write a script in this form :
every 15 20 seconds while true :
do
//check connection
//if connected turn on led
end
it must run from startup until turn off. what method do you think is
more reliable to run every 15 or 30 seconds. I don't know telnet(curl)
method is Affected
in bandwidth or not. I always use at least 10 zero w picoreplayer on my
network. this checking script must be run on every zero w every 15 20
seconds for checking connection.you think is there a problem about
telnet from many zero w to lms server ? in this method , i'm just
worried about bandwidth and this scriot maybe Disrupt while listening to
music and audio syncing lms.
what you think about this ?
------------------------------------------------------------------------
nimaazx's Profile: http://forums.slimdevices.com/member.php?userid=68798
View this thread: http://forums.slimdevices.com/showthread.php?t=110118
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix