Raspi+MIPS wrote:
> Looks interesting, have to check that out when I'm more awake tomorrow,
> thanks!
>
> PS: is this also supposedly working remotely with
>
> >
Code:
--------------------
> >
> echo player id ? * | nc -w 1 192.168.1.100 9090
>
--------------------
> >
>
> ? Cause I don't get an answer from the server. I don't have netcat on
> my synology to test it on the server as well. No firewall up.
My bad, I don't know from where this star came. The actual command is
Code:
--------------------
echo player id ? | nc -w 1 192.168.1.100 9090
--------------------
I'll correct my post above.
You can also telnet, as in
Code:
--------------------
(echo "player id ?"; sleep 1; echo "exit") | telnet server_ip 9090
--------------------
and curl also has a telnet emulation that would work, too.
But if you're ready and able to use a scripting language beyond the
shell, you can write something nicer/smarter based on JSON. I usually
link to 'a perl script'
(http://forums.slimdevices.com/showthread.php?93986-Alarm-fails-only-on-Mondays&p=700283&viewfull=1#post700283)
I wrote some time ago that checks various clients statuses on players
located on mysqueezebox.com. It works with a local server as well,
perhaps you'll need to hack your way around. (Read a few posts above the
linked one about the various perl libs required, JSON::RPC::Client may
be missing from your platform.)
I also know of 'PyLms' (http://pypi.python.org/pypi/pylms), a python
script that could well do the trick, although I never used it.
For the CLI reference manual, look under the Help link on the LMS server
page, then Technical Information, and finally The Squeezebox Server
Command Line Interface.
(http://192.168.1.100:9000/html/docs/cli-api.html should get you there.)
All examples were written before JSON came along, but the JSON version
uses the same syntax, so the refman applies.
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=97046
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix