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 tutorial:

http://www.gerrelt.nl/RaspberryPi/wordpress/tutorial-installing-squeezelite-player-on-raspbian/


And what wonder even a total beginner like me was able to get it
working. 


So I wast stright trying to get the AMP Code working, unluckily with no
sucsess:


pi@Esszimmer ~ $ python relay.py
File "relay.py", line 39
import sys, string, select from socket import * import RPi.GPIO as
GPIO
^
SyntaxError: invalid syntax
pi@Esszimmer ~ $ 


Can you tell me wehre I did go wrong ist this step is not working?


My TXT FIle looks like this: LMS Server ist at 192.168.1.39 Playername
is "Esszimmer"


pi@Esszimmer ~ $ nano relay.py
GNU nano 2.2.6               File: relay.py

UDPSock.bind(addr)
except :
port += 1 print "xPL Monitor for Python, bound to port " +
str(port)
SendHeartbeat() while 1==1 :
readable, writeable, errored = select.select([UDPSock],[],[],60)
if len(readable) == 1 :
data,addr = UDPSock.recvfrom(buff)
print data
radioname = "Esszimmer"
if radioname in data :
if "POWER=1" in data :
print radioname + " is on"
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18, GPIO.OUT)
GPIO.output(18, True)
elif "POWER=0" in data :
print radioname + " is off"
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18, GPIO.OUT)
GPIO.output(18, False)
else :
print "other message for " + radioname


------------------------------------------------------------------------
palmerx's Profile: http://forums.slimdevices.com/member.php?userid=63498
View this thread: http://forums.slimdevices.com/showthread.php?t=71077

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to