Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-09 Thread TheD6Bel

Hello,

i make 3 script

volplus10.sh
 
 #!/bin/bash
 echo b8:27:eb:53:6f:47 mixer volume +10 | nc -i 1 127.0.0.1 9090 
 

volmoins10.sh
 
 #!/bin/bash
 echo b8:27:eb:53:6f:47 mixer volume -10 | nc -i 1 127.0.0.1 9090 
 

and mute.sh
 
 #!/bin/bash
 echo b8:27:eb:53:6f:47 mixer volume -100 | nc -i 1 127.0.0.1 9090
 

after, script to read my 3 button:

boutons.sh
 #!/usr/bin/env python
 from time import sleep
 import os
 import RPi.GPIO as GPIO
 GPIO.setmode(GPIO.BCM)
 GPIO.setup(17, GPIO.IN)
 GPIO.setup(22, GPIO.IN)
 GPIO.setup(23, GPIO.IN)
 
 while True:
 if ( GPIO.input(17) == False ):
 os.system('bash /home/pi/script/volplus10.sh')
 inputval = GPIO.input(17)
 sleep(0.1);
 if ( GPIO.input(22) == False ):
 os.system('bash /home/pi/script/volmoins10.sh')
 inputval = GPIO.input(22)
 sleep(0.1);
 if ( GPIO.input(23) == False ):
 os.system('bash /home/pi/script/mute.sh')
 inputval = GPIO.input(23)
 sleep(0.1);
 sleep(0.1);

now i need start automaticly this script on boot AND TRY :D
i don't have now button and no have idea for resistors, I continue my
research



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread TheD6Bel

thanks for reply ;)

but when a star putty telnet on my squezeeplug ip, putty stop and close,
i go make a new install of squezeeplug and try again for telnet
connection

i try the keyboard on picoreplayer and is same problem don't work :(



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread Michael Herger

but when a star putty telnet on my squezeeplug ip, putty stop and close,
i go make a new install of squezeeplug and try again for telnet
connection


you'd have to telnet into port 9090 of your LMS, not the machine running 
squeezeplug (unless it's the same, of course).



i try the keyboard on picoreplayer and is same problem don't work :(


piCorePlayier is running the same squeezelite software player. The 
keyboard will only work with an application running a user interface in 
the foreground, waiting for keyboard input. squeezelite is running in 
the background as a daemon.


--

Michael
___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread TheD6Bel

for picoreplayer, je pensais, I thought, as it is a special distribution
that was not running in the background

squezeeplug don't have telnet fonction, i install and try command to
night or tomorow ;)



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread DJanGo

Hi,

not a big deal but a bit suboptimal...

With the wiringPi lib some phytonscripting and a NC command to the
playercli its not that Big Deal.

i didnt have your keyboard so i cant write a script 4 u - just find out
which Ports its using and wrap some code around...

http://wiringpi.com/reference/priority-interrupts-and-threads/


cheers



Gruss

Jan

DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread TheD6Bel

now is working

telnet 127.0.0.1 9090
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
b8:27:eb:53:6f:47 mixer volume +10

now i need make 3 script for 3 buttons +5 -5 -100(for mute) and find how
run script when i touch button ;)



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread Michael Herger

now i need make 3 script for 3 buttons +5 -5 -100(for mute) and find how
run script when i touch button ;)


You'll need netcat (http://netcat.sourceforge.net), which will allow you 
to run a simple one-liner:


echo 00:04:20: volume +5 | nc -i 1 yourserver 9090

--

Michael
___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-07 Thread TheD6Bel

Big thanks for your helps it's work perfectly, a little bit slow but
works ;)

echo b8:27:eb:53:6f:47 mixer volume +5 | nc -i 1 127.0.0.1 9090



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


[slim] Control vol with script on RPI squeezeslave, need help

2014-03-06 Thread TheD6Bel

hello,

I want to control the volume with buttons, I bought this 'keyboard'
(http://www.audiophonics.fr/audiophonics-clavier-controle-xbmc-raspyfi-htpc-p-8435.html)
to test but it does not work on squeezeplug only on xbmc (and work very
well on xbmc)

So I thought connected to the GPIO buttons and launch scripts. On the
'WIKI' (http://wiki.slimdevices.com/index.php/SqueezeSlave), there are
commands to control the volume but I can not do it when i send command i
have errors.

Does someone can help me to create scripts to control the volume + / -
and power if possible (not for the command on the wiki)

Big thanks for your helps ;)



TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096

___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss


Re: [slim] Control vol with script on RPI squeezeslave, need help

2014-03-06 Thread Michael Herger

I want to control the volume with buttons, I bought this 'keyboard'
(http://www.audiophonics.fr/audiophonics-clavier-controle-xbmc-raspyfi-htpc-p-8435.html)
to test but it does not work on squeezeplug only on xbmc (and work very
well on xbmc)


If I understand this correctly, that device acts like a keyboard 
connected to the computer, right? In this case the keys are only 
evaluated by the application running in the foreground. Squeezeslave is 
running in the background, thus the keys won't work directly.



So I thought connected to the GPIO buttons and launch scripts. On the
'WIKI' (http://wiki.slimdevices.com/index.php/SqueezeSlave), there are
commands to control the volume but I can not do it when i send command i
have errors.


I have no idea about how to interface with GPIO. But if you can trigger 
scripts using it, then you simplest solution might be sending some CLI 
commands to the controlling LMS. See

http://yourserver:9000/html/docs/cli-api.html#mixer%20volume

Your script would basically have to send a command like this over telnet 
to port 9090 of your LMS (netcat can do that iirc):


04:20:00:12:23:45 mixer volume +10

Power is similar. Just check the CLI documentation.

--

Michael
___
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss