i have a problem

i detect the ip from the LMS-server and the mac from the player.
afterwards i commit the ip and mac to the routine that connect to the
LMS-server.
when i put the ip direct in the subroutine everything is good, otherwise
when i put the variable in the subroutine
i get an error messageafter 1 minute.

> ###### IP-Adresse LMS ermitteln #######
> 
> hostip="127.0.0.1"
> print "Using squeezelite to obtain ip address of server..."   
> while hostip == "127.0.0.1":
>                       try:
>                               hostip = subprocess.check_output("timeout -t 1 
> -s kill
> /mnt/mmcblk0p2/tce/squeezelite-armv6hf -m $(cat
> /sys/class/net/eth0/address) -d slimproto=info  2>&1 | grep -oP
> '(?<=(from: )).*?(?=:3483)'", shell=True)
>                       except:
>                               sleep(1)
> 
> print ""
> print "Server: " + hostip
> print ""
> print "PlayerMac: " + mac
> print ""
> GPIO.setmode(GPIO.BOARD)
> GPIO.setup(3, GPIO.OUT)
> GPIO.output(3, False)
> 
> 
> #######################################
> 


> class UINavigation(threading.Thread):
>       
>       def __init__(self):    
>               GPIO.setmode(GPIO.BOARD)
>               GPIO.setup(11, GPIO.IN)
>               GPIO.setup(15, GPIO.IN)
>               A_PIN  = 7
>               B_PIN  = 9
>               self.encoder = 
> gaugette.rotary_encoder.RotaryEncoder.Worker(A_PIN,
> B_PIN)
>               self.encoder.start()
>               self.current_artist=0
>               self.current_artist_album_count=0
>               self.current_radio=0
>               self.current_album=0
>               self.left=False
>               self.right=False
>               self.push=False
>               self.back=False
>               self.level="root"
>               self.cursor=0
>               *self.sbs = SqueezeBoxServer(host="10.208.52.121", port=9000,
> player_id=mac) *
>               self.lcd= HD44780()
>               self.sbs.setVolume(20)
>               self.paused = False
>               threading.Thread.__init__(self)

otherwise

> class UINavigation(threading.Thread):
>       
>       def __init__(self):    
>               GPIO.setmode(GPIO.BOARD)
>               GPIO.setup(11, GPIO.IN)
>               GPIO.setup(15, GPIO.IN)
>               A_PIN  = 7
>               B_PIN  = 9
>               self.encoder = 
> gaugette.rotary_encoder.RotaryEncoder.Worker(A_PIN,
> B_PIN)
>               self.encoder.start()
>               self.current_artist=0
>               self.current_artist_album_count=0
>               self.current_radio=0
>               self.current_album=0
>               self.left=False
>               self.right=False
>               self.push=False
>               self.back=False
>               self.level="root"
>               self.cursor=0
>               *self.sbs = SqueezeBoxServer(host=hostip, port=9000, 
> player_id=mac) *
>               self.lcd= HD44780()
>               self.sbs.setVolume(20)
>               self.paused = False
>               threading.Thread.__init__(self)

any idea


------------------------------------------------------------------------
rippi46's Profile: http://forums.slimdevices.com/member.php?userid=63080
View this thread: http://forums.slimdevices.com/showthread.php?t=101269

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

Reply via email to