Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2015-02-18 Thread ashwin.isaac
this is excellent.!! I have picoreplayer on my Rasp Model A and will try this over the weekend. so, for picoreplayer, what packages would I need - python, GPIO. anything else? ashwin.isaac's Profile:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-25 Thread RobbeD
TheD6Bel wrote: Hello RobbeD your script work perfectly! i change ip 127.0.0.1 to my nas ip (lms run on my synology) and and change GPIO.output(18, True) to GPIO.output(18, False) and GPIO.output(18, False) to GPIO.output(18, True) for work with my relay. Thanks ;) That's very good

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-25 Thread TheD6Bel
Hello, after few days of test i keep your first script. Your last script are some bugs, ei: -if i put my music on pause and switch power off, the script don't work. -if i listen my music and power off, the relay switch off but if i power on relay don't move, i need play music, power off and

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-25 Thread RobbeD
That's weird, I don't have those problems here.. Are you using the web user interface or another controller? You can run the script and check the output.. Maybe it has something to do with LMS settings? RobbeD's

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-23 Thread TheD6Bel
hello, i tried for you on a new install of picoreplayer 1.18b, and i can't run script! on picoreplayer you need libraries and is not inclued, you don't have python, nano, gpio,... for you the best way, you install squeezeplug, boot time is not same but it's work ;) sorry for not can help you

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-23 Thread palmerx
Again BIG thanks TheD6Bel! I do no longer work with piCorePlayer, I have installed Squeezeplayer on wheezy debian. If I want to edit rc.local, I have got the Error writing /etc/rc.local: Permission denied I logged in as user pi is that wrong? #!/bin/sh -e # # rc.local # # This script is

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-23 Thread palmerx
Ok I did sudo nano /etc/rc.local then I could save! :-) Now it looks like this, ist that ok? #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will exit 0 on success or any other # value on error. # # In order to

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-23 Thread TheD6Bel
Hello, when i did /yourpath is your path directory. My script is in /home/script/ and i add on rc.local: python /home/script/relay.py ;) TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-22 Thread palmerx
A very BIG thank you *TheD6Bel* for your absolute perfect explenation. Now why it took so long that i didmy replay was because piCorePlayer was not good for me (I think) i coulnot even install or open nano. So I installed Whezzy debian iso and setup the squeezeslave like described in this

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-22 Thread TheD6Bel
hello, your script like this Code: import sys, string, select from socket import * import RPi.GPIO as GPIO # Define maximum xPL message size buff = 1500 # Define xPL base port port = 3865 # Sub routine for sending a heartbeat def SendHeartbeat()

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-20 Thread RobbeD
Hi! That's strange, I thought the script would run without problems.. I am thinking if I did install something extra on the raspberry.. It's also weird that the script doesn't understand the import command.. I run the script like this: python relay.py Can you try that?

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-20 Thread TheD6Bel
Sorry my mistake! for run script i make ./rxpl.py i'am on work now, i tried tonight TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View this thread:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-20 Thread TheD6Bel
Hello RobbeD your script work perfectly! i change ip 127.0.0.1 to my nas ip (lms run on my synology) and and change GPIO.output(18, True) to GPIO.output(18, False) and GPIO.output(18, False) to GPIO.output(18, True) for work with my relay. Thanks ;)

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-20 Thread palmerx
I'm very sorry for beeing an absolut beginner, can anybody explain me in short words how I get this script on my running piCorePlayer and what pins its going to switch? Do I have to use Putty? Thank you very much for your time, all out there!!

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-20 Thread TheD6Bel
palmerx wrote: I'm very sorry for beeing an absolut beginner, can anybody explain me in short words how I get this script on my running piCorePlayer and what pins its going to switch? Do I have to use Putty? Thank you very much for your time, all out there!! Hello, yes you need putty.

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-19 Thread TheD6Bel
Hello RobbeD, don't work for me : Code: root@squeezeplug:/home/pi/script# ./rxpl.py ./rxpl.py: line 1: import: command not found from: can't read /var/mail/socket ./rxpl.py: line 3: import: command not found ./rxpl.py: line 6: buff: command not found

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-18 Thread palmerx
This looks amazing, would that work on the PiCorePlayer also to turn on my Amp?? https://sites.google.com/site/picoreplayer/home palmerx's Profile: http://forums.slimdevices.com/member.php?userid=63498 View this thread:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-18 Thread TheD6Bel
palmerx wrote: This looks amazing, would that work on the PiCorePlayer also to turn on my Amp?? https://sites.google.com/site/picoreplayer/home Hello, normally yes. You need only setup script with ip of server and mac from picoreplayer. I had to change the script for run every 2 sec

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-18 Thread RobbeD
Hey guys, I recently changed the script so it now works with the XPL plugin.. This makes the script more smooth and lightweight! It also now reacts instant! :-) To make the script run you'll need to install the xPL plugin in LMS. After that you just change the name of the player in the script

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2014-11-18 Thread TheD6Bel
RobbeD wrote: Hey guys, I recently changed the script so it now works with the XPL plugin.. This makes the script more smooth and lightweight! It also now reacts instant! :-) To make the script run you'll need to install the xPL plugin in LMS. After that you just change the name of

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-08 Thread RobbeD
TheD6Bel, that's great news! :-) I have added another piece of code that checks every two seconds if the server is online. If the server is online, then the status of the player is checked, otherwise not. The file is in attachment. 14795 For your problem that the relay is on when LMS is turned

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-08 Thread TheD6Bel
hello, your file is the same script :) but thanks for you work ;) TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View this thread: http://forums.slimdevices.com/showthread.php?t=71077

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-03 Thread RobbeD
Hi, indeed, the python script is indentation-sensitive. For me, the script works the way I copied it here on the forum.. But i'm aware that maybe the lay-out is not that good.. I'll add my script here in attachment.. 14774 I now did the indentation with WING-IDE and it looks correct.. Hope it

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-03 Thread Julf
RobbeD wrote: is there a way to make the script use less resources? Only had a quick look, but it is a busy loop that gets executed once per second. I would look at something like the xPL plugin or something else that can actively send you a message when the player gets activated.

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-03 Thread TheD6Bel
it works !!! thanks I just have a problem is when LMS is off the relay is on ans when LMS is turn on relay switch off. i need change your script but it WORKS ! BIG THANKS TheD6Bel's Profile:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-02 Thread TheD6Bel
i resolve my first problem :) i change #!/usr/bin/env python to #!/usr/bin/env python3 but i have a error in line 82 : root@squeezeplug:/home# ./gpio.sh File ./gpio.sh, line 82 playerdetected = playerId ^ TheD6Bel's

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-02 Thread TheD6Bel
I fixed the second error if (playerId == playermac): playerdetected = playerId not if (playerId == playermac): playerdetected = playerId but I have another error root@squeezeplug:/home# ./gpio.sh File ./gpio.sh, line 84 if playerdetected : ^

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-02 Thread Julf
TheD6Bel wrote: but I have another error root@squeezeplug:/home# ./gpio.sh File ./gpio.sh, line 84 if playerdetected : ^ SyntaxError: invalid syntax I I'm not good in script, so I do not know fix it This isn't really a script error, it is a python syntax error, and the error is in

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-01 Thread TheD6Bel
i tried but don't work :( i put the script in /hom/gpio.sh with chmod 777 i put before yout script #!/usr/bin/env python # -*- coding: utf-8 -*- i put ip of RPi : 192.168.1.9 and mac adress of squeezeslave (in web interface, setting, player, ) : b8:27:eb:e4:2a:af I edit /etc/rc.local and

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-01 Thread TheD6Bel
if i execute gpio.sh i have error: root@squeezeplug:/home# ./gpio.sh Traceback (most recent call last): File ./gpio.sh, line 52, in module responce = json.loads(data) File /usr/lib/python2.7/json/__init__.py, line 326, in loads return _default_decoder.decode(s) File

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-05-01 Thread RobbeD
Hi, I'll tell you what I did to make it work: I saved the script as relay.py and ran it just with python relay.py (as root). Later I made a service script in etc\init.d to run it at boot.. Maybe you should try to add :9000 behind the ip adress of your server? Maybe that can be the problem. My

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-04-30 Thread RobbeD
Hello, Sorry for bumping this thread, but for people who are still searching for an easy script to trigger a relay i've created a python script that runs at boot. The script checks the powerstate of the player every second (script runs on a raspberry pi where squeezelite is installed), and if

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-04-30 Thread TheD6Bel
Thanks, i test now ;) TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View this thread: http://forums.slimdevices.com/showthread.php?t=71077 ___

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2013-04-30 Thread RobbeD
Ok! :-) Let me know if it works or not.. RobbeD's Profile: http://forums.slimdevices.com/member.php?userid=56967 View this thread: http://forums.slimdevices.com/showthread.php?t=71077

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-29 Thread TheD6Bel
epoch1970 wrote: did you see this one : http://forums.slimdevices.com/showthread.php?88269-Sample-code-JSON-API-in-your-languagep=636134viewfull=1#post636134 i see, but isn't for manage GPIO, is for have inforamtions over serveurs/player but thanks :)

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-20 Thread TheD6Bel
epoch1970 wrote: Wha?? Have you tried gpio raspberry pi python on google ? On google! I searched on the forum, on RPi forum i open un post and i have a python script for manage GPIO but is only with MPD not LMS. I try change this script for LMS

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-20 Thread epoch1970
did you see this one : http://forums.slimdevices.com/showthread.php?88269-Sample-code-JSON-API-in-your-languagep=636134viewfull=1#post636134 epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-19 Thread epoch1970
TheD6Bel wrote: my problem is to create a python script with the status of every player :( Well you have to ask the server for the available players, then query in a loop each player for its status. Players can come and go, so the first step is never a waste of time; also when a player is

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-19 Thread TheD6Bel
hello, I did a search but I have not found a script to manage GPIO over RPi TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View this thread: http://forums.slimdevices.com/showthread.php?t=71077

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-19 Thread epoch1970
Wha?? Have you tried gpio raspberry pi python on google ? epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=71077

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-18 Thread TheD6Bel
Hello i instal a python for LMS and is very easy to have status of server PYLMS https://github.com/jingleman/PyLMS TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077 View this thread:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread TheD6Bel
Hello, I also looking for a solution to control an amp with GPIO ports RPi. For the moment there is a script that works with MPD, must modify it to work under squeezebox. This script based on the status of mpd.

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread epoch1970
TheD6Bel wrote: it is possible to know the status of squeezebox go to IPSQUEEZEBOX:9000/status.txt You're better off using the CLI available on port 9090. Available commands are listed in LMS: click help at the bottom of the LMS main page (http://IPSQUEEZEBOX:9000), then Technical

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread TheD6Bel
I do not even answer root@squeezeplug:~# echo serverstatus |netcat -w1 127.0.0.1 9090 root@squeezeplug:~# echo players list|netcat -w1 127.0.0.1 9090 :( TheD6Bel's Profile:

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread epoch1970
TheD6Bel wrote: I do not even answer root@squeezeplug:~# echo serverstatus |netcat -w1 127.0.0.1 9090 root@squeezeplug:~# echo players list|netcat -w1 127.0.0.1 9090 :( -verify netcat is installed. Use telnet 127.0.0.1 9090 if you don't have netcat (type 'exit' to quit from telnet if

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread TheD6Bel
hello, for me netcat is instaled: root@squeezeplug:~# netcat usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length] [-P proxy_username] [-p source_port] [-q seconds] [-s source] [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [destination]

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread epoch1970
mhh. I think there are 2 versions of netcat in existence and they behave slightly differently when it comes to end of lines. Perhaps something like this would work better for you: echo -e serverstatus\nexit\n | netcat localhost 9090 . I am not sure. But anyway, it looks like the server is

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-11-11 Thread TheD6Bel
root@squeezeplug:~# echo -e serverstatus\nexit\n | netcat localhost 9090 serverstatus lastscan%3A1352124017 version%3A7.7.2 uuid%3A40adacd5-c19a-4c10-bea4-fe1b4481dbce info%20total%20albums%3A4 info%20total%20artists%3A3 info%20total%20genres%3A3 info%20total%20songs%3A67 player%20count%3A1

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-10-22 Thread RobbeD
Hi, Could someone help me to modify the Power Switch plugin to control the gpio pins on the raspberry pi? I think this could be easier than using an USB-relay.. How do I start with this? I have no experience with squeezebox plugins.. Thanks in advance!

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-10-22 Thread gharris999
RobbeD wrote: Hi, Could someone help me to modify the Power Switch plugin to control the gpio pins on the raspberry pi? I think this could be easier than using an USB-relay.. How do I start with this? I have no experience with squeezebox plugins.. Thanks in advance!SBS/LMS Plugins are

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-08-29 Thread RobbeD
Hi! I know your post is almost three years old, but you never know.. I also would like to use a relay for this purpose! My idea is to let a script run in the background that checks the powerstate of the player (squeezeplay) on the server via CLI. If the powerstate of the player is on, the relax

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-08-29 Thread pippin
Have a look at the Denon plugins or IR blaster. They do this and all you'd need to do is replace the code they use to switch devices on and off with the code you need. The Denon ones use http or at least TCp I believe so maybe they are easier to convert.

Re: [slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2012-08-29 Thread gharris999
You could look at the Power Switch plugin and modify it to talk to your usb relay. http://www.gwendesign.com/slimserver/dev_hard_and_software.htm#powerswitchii gharris999's Profile:

[slim] Squeezebox Server with Squeezeslave to turn on speakers when playing

2009-11-07 Thread Lister
Hi there, After setting up Squeezebox Server on a 24/7 server running Ubuntu, connecting a SQ3 and a SQ boom to it, I use SqueezeboxSlave as a daemon on the server itself. All works perfectly, so I'm up to the next step: turning on the powered speakers connected to the server automatically when