LMS-CLI: telnet - "playlist index +1" does not work
thinkalready <thinkalready.a6m8mn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
Hi everyone,
I am new to Squeezebox and am happy to have set up my first LMS with
local Squeezelite on a RPi - with lots of help from your forum.
Intended application:
- run internet radio stations
- user interface (with reduced user interaction)
-- display lms "status_header.html" on MagicMirror
-- control playlist of preferred stations via Apple remote A1156
(play/pause, volume up/down, next/previous station)
Setup:
- RPi 3b+
$ cat /etc/debian_version
10.10
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
- LMS via mysqueezebox.com/download
Version: 8.1.1
Platform: Debian/Ubuntu Linux ARM
File: logitechmediaserver_8.1.1_arm.deb
- Squeezelite on same RPi via
$ sudo apt install squeezelite
squeezelite is already the newest version (1.8-4.1+b1).
- LMS and Squeezelite startup on boot
- lirc to receive A1156 data and python script to send commands to LMS
via telnet; python code for completeness of documentation of the issue
Code:
--------------------
import lirc
import time
import telnetlib
sockid = lirc.init("monitor", config_filename="~/App/SqueezeBoxIRController/monitor.lircrc", blocking=False)
telnetid = telnetlib.Telnet("localhost", 9090)
playpause = True
while True:
codeIR = lirc.nextcode()
if codeIR != []:
if codeIR[0] == "KEY_DOWN":
print "mixer volume -5"
telnetid.write("mixer volume -5 \r");
elif codeIR[0] == "KEY_LEFT":
print "playlist index -1"
telnetid.write("playlist index -1 \r")
elif codeIR[0] == "KEY_RIGHT":
print "playlist index +1"
telnetid.write("playlist index %2B1 \r")
elif codeIR[0] == "KEY_UP":
print "mixer volume +5"
telnetid.write("mixer volume +5 \r");
elif codeIR[0] == "KEY_MENU":
print "stop"
telnetid.write("stop\r")
playpause = False
elif codeIR[0] == "KEY_PLAYPAUSE":
if playpause==True:
print "pause"
telnetid.write("pause\r")
playpause = False
else:
print "play"
telnetid.write("play\r")
playpause = True
else:
print codeIR
time.sleep(0.05)
--------------------
Issue:
- all commands work fine except for "playlist index +1" (resp. "playlist
index %2B1") EVEN VIA COMMAND LINE (so no issue with the python part)
-- e.g. with 2 stations in the playlist, "playlist index -1" will toggle
correctly but "playlist index +1" will not do anything (well, playback
stops for a moment but the same station keeps on playing)
Code:
--------------------
$ telnet localhost 9090
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
playlist index -1
00%3A00%3A00%3A00%3A00%3A00 playlist index -1
playlist index +1
00%3A00%3A00%3A00%3A00%3A00 playlist index %2B1
playlist index %2B1
00%3A00%3A00%3A00%3A00%3A00 playlist index %2B1
--------------------
Is there another lms-cli command to get the next track in the playlist
to play?
Thx in advance.
Keep save, Jens
------------------------------------------------------------------------
thinkalready's Profile: http://forums.slimdevices.com/member.php?userid=72028
View this thread: http://forums.slimdevices.com/showthread.php?t=115006