PDA

View Full Version : receiving actual state of PicorePlayer if playing or stopped



papa_arrugada
2017-12-05, 09:02
Hello,
I have a problem recognizing the playing or stopped state in order to set a GPIO.

I studied this http://brianlawes.com/multi-zone-audio-system/

And here is a script used for receiving player status.
At the beginning of this script there a following lines:



#!/bin/sh
. /home/tc/www/cgi-bin/pcp-functions
pcp_variables

##############################################
# Set the following according to your setup
##############################################
MAC_ADDR=ab:cd:ef:12:34:63 # Raspberry Pi MAC address Bad
LMS_IP=192.168.0.229 # LMS IP address
INTERVAL=0.5 # Set Poll interval
GPIO=12 # Set GPIO for relay
COMMAND="status 0 0" # LMS player status command
DELAYOFF=20 # Delay in no. of intervals
COUNT=0
DEBUG=0
TURNED_ON=0
##############################################



After
. /home/tc/www/cgi-bin/pcp-functions
pcp_variables

I become an


sh: 3: unknown operand
sh: 3: unknown operand


which is coming from:

pcp_config_file
. $CONFIGCFG
pcp_debug_log "$0 - Running pcp-functions..."
pcp_variables

---->

Always executing a function (I think) I become errors.
I think, I have forgotten something in setup or so.

Can anybody help me please?

DJanGo
2017-12-05, 12:30
Hello,
I have a problem recognizing the playing or stopped state in order to set a GPIO.


Hi i have no idea about pcp...

but the space between . and /home/tc/www/cgi-bin/pcp-functions looks very ....:confused:
where is "pcp_variables" located? I would try to use the whole path to that script.

But squeezelite supports -G and -S iam using these two parameters for my Rasbian not pcp running squeezeplayers and they do work.

papa_arrugada
2017-12-05, 15:36
thank you for answering.

eliminating blank is not working.

I have a script calles "muteBack.sh" which
activates the script pcp-functions
and then the function "pcp_variables()" is called

muteBack.sh


tc@piCorePlayer:~$ ./muteBack.sh
./muteBack.sh: line 2: ./home/tc/www/cgi-bin/pcp-functions: not found
./muteBack.sh: line 3: pcp_variables: not found


or with blank:



#!/bin/sh
. /home/tc/www/cgi-bin/pcp-functions
pcp_variables

##############################################
# Set the following according to your setup
##############################################
MAC_ADDR=ab:cd:ef:12:34:63 # Raspberry Pi MAC address Bad
LMS_IP=192.168.0.229 # LMS IP address
INTERVAL=0.5 # Set Poll interval
GPIO=12 # Set GPIO for relay
COMMAND="status 0 0" # LMS player status command
DELAYOFF=20 # Delay in no. of intervals
COUNT=0
DEBUG=0
TURNED_ON=0
##############################################

if [ $DEBUG = 1 ]; then
echo
echo "MAC_ADDR : "$MAC_ADDR
echo "LMS_IP : "$LMS_IP
echo "INTERVAL : "$INTERVAL
echo "GPIO : "$GPIO
echo "COMMAND : "$COMMAND
echo "DELAYOFF : "$DELAYOFF
echo
fi

get_mode() {
RESULT=`( echo "$MAC_ADDR $COMMAND"; echo exit ) | nc $LMS_IP 9090`
echo $RESULT | grep "mode%3Aplay" > /dev/null 2>&1
if [ $? == 0 ]; then
echo "Playing. Count: $COUNT"
COUNT=0
if [ $TURNED_ON == 0 ]; then
turn_on
fi
else
if [ $COUNT -ge $DELAYOFF ]; then
if [ $TURNED_ON == 1 ]; then
turn_off
fi
COUNT=0
else
COUNT=$(($COUNT + 1))
echo "Stopped. Count: $COUNT"
fi
fi
}

turn_on() {
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
sleep .5
sudo echo "1" > /sys/class/gpio/gpio$GPIO/value
TURNED_ON=1
}

turn_off() {
sudo echo "1" > /sys/class/gpio/gpio$GPIO/value
sleep .5
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
TURNED_ON=0
}
##############################################
# Initial GPIO setup
##############################################

#sudo chown tc /sys/class/gpio/export
#sudo echo "24" > /sys/class/gpio/export
#sudo chown -R tc /sys/class/gpio/gpio24/
#sudo echo "1" > /sys/class/gpio/gpio24/value
#sudo echo "out" > /sys/class/gpio/gpio24/direction
#sudo echo "0" > /sys/class/gpio/gpio24/value

sudo chown tc /sys/class/gpio/export
sudo echo $GPIO > /sys/class/gpio/export
sudo chown -R tc /sys/class/gpio/gpio$GPIO/
# muting is active low
#sudo echo "1" > /sys/class/gpio/gpio$GPIO/active_low
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
sudo echo "out" > /sys/class/gpio/gpio$GPIO/direction
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value


##############################################
# Loop forever. This uses less than 1% CPU, so it should be OK.
##############################################
while true
do
get_mode
sleep $INTERVAL
done



pcp_variables() is located in /home/tc/www/cgi-bin/pcp-functions



#!/bin/sh
....
pcp_variables() {
pcp_debug_log "$0 - Setting pcp_variables..."
#================================================= ===================================
.....

papa_arrugada
2017-12-05, 15:44
and if I source n terminal I get the same error:



tc@piCorePlayer:~$ . /home/tc/www/cgi-bin/pcp-functions
sh: 3: unknown operand
tc@piCorePlayer:~$ ./home/tc/www/cgi-bin/pcp-functions
-sh: ./home/tc/www/cgi-bin/pcp-functions: not found
tc@piCorePlayer:~$ . www/cgi-bin/pcp-functions
sh: 3: unknown operand
tc@piCorePlayer:~$
/QUOTE]

this error comes from the call "pcp_variables" and "pcp_variables()" is located in the script "pcp-functions"

at the beginning of "pcp-functions"
there is

[QUOTE]
#!/bin/sh

epoch1970
2017-12-05, 16:24
Your script works under pcp 3.20.2, on a Pi 3
I am logged in as user tc.
I copy-pasted the code to a file and changed "#!/bin/sh" to "#!/bin/sh -x"
Then I did "chmod +x foo.sh" to make it executable, I get this kind of stuff
$ ./foo.sh
+ . /home/tc/www/cgi-bin/pcp-functions
+ DEBUGLOG=/var/log/pcp_debug.log
+ pcp_config_file
+ CONFIGCFG=/usr/local/sbin/config.cfg
+ . /usr/local/sbin/config.cfg
+ WIFI=off
+ SSID=wireless
+ PASSWORD=password
+ ENCRYPTION=WPA
+ DEBUG=0
+ MODE=40
+ TEST=0
+ NAME=Berlin-Boombox
+ OUTPUT=equal
+ ALSA_PARAMS=160:::1:
+ BUFFER_SIZE=
...
+ MAC_ADDR=ab:cd:ef:12:34:63
+ LMS_IP=192.168.0.229
+ INTERVAL=0.5
+ GPIO=12
+ COMMAND=status 0 0
+ DELAYOFF=20
+ COUNT=0
+ DEBUG=0
+ TURNED_ON=0
If you run command "env" you can see all the variables pcp-variables has created for your script to use.
The funny ". /home/tc/www/cgi-bin/pcp-functions" is more legibly written as "source /home/tc/www/cgi-bin/pcp-functions", that "merges" a script into another one. This is how your script can call "pcp-variables" right after that.

BTW, do you need to poll player status via a script? In the GUI under Squeezelite Settings, bottom of page, there is provision to define a script or GPIO pins that SL will activate when player status transitions to power on or to power off.

papa_arrugada
2017-12-06, 02:16
many thanks for your help.
Yes, now I can run a script with "./foo.sh" from local directory or with "/home/tc/www/cgi-bin/pcp-functions" in that location.
In the area of debug outputs I get a further "unknown command":



+ MODE_NORMAL=20
+ MODE_ADVANCED=30
+ MODE_BETA=40
+ MODE_DEVELOPER=100
+ INSITU_DOWNLOAD=http://picoreplayer.sourceforge.net/insitu
+ PCP_REPO=http://picoreplayer.sourceforge.net/tcz_repo
+ PICORE_REPO_1=http://repo.tinycorelinux.net/
+ PICORE_REPO_2=http://distro.ibiblio.org/tinycore/
+ [ -eq 3 ]
sh: 3: unknown operand
+ [ -f /etc/sysconfig/tcedir/squeezelite ]
+ SQLT_BIN=/usr/local/bin/squeezelite
+ echo -e \r\033[K

+ echo -e \033[1;31m
+ RED=
+ echo -e \033[1;32m
+ GREEN=
+ echo -e \033[1;33m
+ YELLOW=


How can I solve this?
Is it necessary to change all used scripts from "#!/bin/sh" to "#!/bin/sh -x"?

And to your proposal power on/off:
Yes I know, thank you, this works.
But I have 4 instances of player running (with 4 different mac addresses) and I want to read the actual state of special player to set a special GPIO pin for muting an external amplifier independently. I have 8 mono amps with mute inputs.

epoch1970
2017-12-06, 04:20
"-x" is only there to make the script verbose. You should remove it when it works ok.
I'm seeing "+ [ 0 -eq 3 ]", some variable is not set in your case, the script is a little careless and it goes into syntax error because it compares <nothing> with 3.
My install is clean. I'll see what goes on in the script, or the log around the moment that test is performed.

EDIT: After a short chase, I do have a line reading TEST="0" in file /usr/local/sbin/config.cfg.
It looks like you're missing that line in your config.cfg file. Due to previous mods I suppose?

papa_arrugada
2017-12-06, 04:41
in /usr/local/sbin/config.cfg I have
TEST=""

I have changed to TEST="0" and the error is gone.
Here my output:



+ /home/tc/www/cgi-bin/pcp-functions
+ DEBUGLOG=/var/log/pcp_debug.log
+ pcp_config_file
+ CONFIGCFG=/usr/local/sbin/config.cfg
+ . /usr/local/sbin/config.cfg
+ WIFI=off
+ SSID=wireless
+ PASSWORD=password
+ ENCRYPTION=WPA
+ DEBUG=0
+ MODE=40
+ TEST=0
+ NAME=Wohnzimmer
+ OUTPUT=equal
+ ALSA_PARAMS=80:::0:
+ BUFFER_SIZE=
+ _CODEC=
+ XCODEC=
+ PRIORITY=
+ MAX_RATE=
+ UPSAMPLE=
+ MAC_ADDRESS=ab:cd:ef:12:34:60
+ SERVER_IP=
+ LOGLEVEL=
+ LOGFILE=
+ DSDOUT=
+ VISUALISER=yes
+ CLOSEOUT=
+ UNMUTE=
+ ALSAVOLUME=
+ OTHER=
+ AUDIO=Analog
+ HOST=piCorePlayer
+ TIMEZONE=CET-1CEST,M3.5.0,M10.5.0/3
+ OVERCLOCK=NONE
+ ADVOVERCLOCK=None
+ CMD=Default
+ FIQ=0xF
+ ALSAlevelout=Default
+ ALSAeq=yes
+ REBOOT=Disabled
+ RB_H=0
+ RB_WD=*
+ RB_DMONTH=*
+ RESTART=Disabled
+ RS_H=0
+ RS_WD=*
+ RS_DMONTH=*
+ CRON_COMMAND=
+ AUTOSTARTLMS=
+ A_S_LMS=Disabled
+ AUTOSTARTFAV=
+ A_S_FAV=Disabled
+ USER_COMMAND_1=%2Fusr%2Flocal%2Fbin%2Fsqueezelite+-n+%27K%C3%BCche%27+-o+surround+-a+80%3A%3A%3A0%3A+-m+ab%3Acd%3Aef%3A12%3A34%3A61+-z
+ USER_COMMAND_2=%2Fusr%2Flocal%2Fbin%2Fsqueezelite+-n+%27Esszimmer%27+-o+center+-a+80%3A%3A%3A0%3A+-m+ab%3Acd%3Aef%3A12%3A34%3A62+-z
+ USER_COMMAND_3=%2Fusr%2Flocal%2Fbin%2Fsqueezelite+-n+%27Bad%27+-o+back+-a+80%3A%3A%3A0%3A+-m+ab%3Acd%3Aef%3A12%3A34%3A63+-z
+ JIVELITE=yes
+ SCREENROTATE=180
+ JL_SCREEN_WIDTH=0
+ JL_SCREEN_HEIGHT=0
+ SHAIRPORT=no
+ LMSERVER=no
+ LMSDATA=default
+ MOUNTPOINT=
+ MOUNTUUID=no
+ NETMOUNT1POINT=
+ NETMOUNT1=no
+ NETMOUNT1IP=
+ NETMOUNT1SHARE=
+ NETMOUNT1FSTYPE=
+ NETMOUNT1USER=
+ NETMOUNT1PASS=
+ NETMOUNT1OPTIONS=
+ SQLT_VERSION=basic
+ SQUEEZELITE=yes
+ POWER_GPIO=
+ POWER_OUTPUT=H
+ POWER_SCRIPT=
+ IR_LIRC=no
+ IR_GPIO_IN=25
+ IR_GPIO_OUT=
+ IR_DEVICE=lirc0
+ IR_CONFIG=
+ LMSWEBPORT=
+ FSM=Default
+ LMSCONTROLS=yes
+ PLAYERTABS=yes
+ HDMIPOWER=on
+ RPI3INTWIFI=on
+ SAMBA=disabled
+ WOL=no
+ WOL_NIC=
+ WOL_LMSMACADDRESS=
+ SPARAMS1=
+ SPARAMS2=
+ SPARAMS3=
+ SPARAMS4=
+ SPARAMS5=
+ INTERNET_CHECK_IP=
+ ROTDASH=no
+ pcp_debug_log /home/tc/www/cgi-bin/pcp-functions - Running pcp-functions...
+ [ 0 -ne 0 ]
+ pcp_variables
+ pcp_debug_log /home/tc/www/cgi-bin/pcp-functions - Setting pcp_variables...
+ [ 0 -ne 0 ]
+ cut -d /+ -f3readlink
/etc/sysconfig/tcedir
+ TCEDEV=/dev/mmcblk0p2
+ readlink /etc/sysconfig/tcedir
+ cut -d / -f3
+ TCEMNT=/mnt/mmcblk0p2
+ BOOTDEV=/dev/mmcblk0p1
+ BOOTMNT=/mnt/mmcblk0p1
+ CONFIGTXT=/mnt/mmcblk0p1/config.txt
+ CMDLINETXT=/mnt/mmcblk0p1/cmdline.txt
+ BOOTLOCAL=/opt/bootlocal.sh
+ BOOTSYNC=/opt/bootsync.sh
+ SHUTDOWN=/opt/shutdown.sh
+ PB100=/home/tc/.local/bin/.pbtemp
+ HTTPDCONF=/home/tc/httpd.conf
+ HTTPD=/usr/local/sbin/busybox-httpd
+ ASOUNDCONF=/etc/asound.conf
+ WIFIDB=/home/tc/wifi.db
+ ONBOOTLST=/etc/sysconfig/tcedir/onboot.lst
+ VOLUME=/mnt/mmcblk0p1
+ DEVICE=/dev/mmcblk0p1
+ UPD_PCP=/tmp/upd_picoreplayer
+ PCPHOME=/home/tc/www/cgi-bin
+ LOGDIR=/var/log
+ PACKAGEDIR=/etc/sysconfig/tcedir/optional
+ SAMBACONF=/usr/local/etc/samba/smb.conf
+ USBMOUNTCONF=/usr/local/etc/pcp/usbmounts.conf
+ NETMOUNTCONF=/usr/local/etc/pcp/netmounts.conf
+ MODE_INITIAL=0
+ MODE_BASIC=10
+ MODE_NORMAL=20
+ MODE_ADVANCED=30
+ MODE_BETA=40
+ MODE_DEVELOPER=100
+ INSITU_DOWNLOAD=http://picoreplayer.sourceforge.net/insitu
+ PCP_REPO=http://picoreplayer.sourceforge.net/tcz_repo
+ PICORE_REPO_1=http://repo.tinycorelinux.net/
+ PICORE_REPO_2=http://distro.ibiblio.org/tinycore/
+ [ 0 -eq 3 ]
+ [ -f /etc/sysconfig/tcedir/squeezelite ]
+ SQLT_BIN=/usr/local/bin/squeezelite
+ echo -e \r\033[K

+ echo -e \033[1;31m
+ RED=
+ echo -e \033[1;32m
+ GREEN=
+ echo -e \033[1;33m
+ YELLOW=
+ echo -e \033[1;34m
+ BLUE=
+ echo -e \033[1;35m
+ MAGENTA=
+ echo -e \033[1;36m
+ CYAN=
+ echo -e \033[1;37m
+ WHITE=
+ echo -e \033[0;39m
+ NORMAL=
+ BLACKTRIANGLE=▲
+ BLACKTRIANGLEDOWN=▼
+ BLACKTRIANGLELEFT=◄
+ BLACKTRIANGLERIGHT=►
+ DEGREE_SIGN=&deg;
+ EXTERNALLINK=↗
+ FILLEDSAMLLSQUARE=◼
+ HEAVY_CHECK_MARK=✔
+ HEAVY_BALLOT_X=✘


now I only have the problem of getting the actual mode/state of a special player.
Any further ideas?

my script "muteBack.sh" looks like



tc@piCorePlayer:~$ cat muteBack.sh
#!/bin/sh -x
/home/tc/www/cgi-bin/pcp-functions
#pcp_variables

##############################################
# Set the following according to your setup
##############################################
MAC_ADDR=ab:cd:ef:12:34:63 # Raspberry Pi MAC address Bad
LMS_IP=192.168.0.229 # LMS IP address
INTERVAL=0.5 # Set Poll interval
GPIO=12 # Set GPIO for relay
COMMAND="status 0 0" # LMS player status command
DELAYOFF=20 # Delay in no. of intervals
COUNT=0
DEBUG=0
TURNED_ON=0
##############################################

if [ $DEBUG = 1 ]; then
echo
echo "MAC_ADDR : "$MAC_ADDR
echo "LMS_IP : "$LMS_IP
echo "INTERVAL : "$INTERVAL
echo "GPIO : "$GPIO
echo "COMMAND : "$COMMAND
echo "DELAYOFF : "$DELAYOFF
echo
fi

get_mode() {
RESULT=`( echo "$MAC_ADDR $COMMAND"; echo exit ) | nc $LMS_IP 9002`
echo $RESULT | grep "mode%3Aplay" > /dev/null 2>&1
if [ $? == 0 ]; then
echo "Playing. Count: $COUNT"
COUNT=0
if [ $TURNED_ON == 0 ]; then
turn_on
fi
else
if [ $COUNT -ge $DELAYOFF ]; then
if [ $TURNED_ON == 1 ]; then
turn_off
fi
COUNT=0
else
COUNT=$(($COUNT + 1))
echo "Stopped. Count: $COUNT"
fi
fi
}

turn_on() {
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
sleep .5
sudo echo "1" > /sys/class/gpio/gpio$GPIO/value
TURNED_ON=1
}

turn_off() {
sudo echo "1" > /sys/class/gpio/gpio$GPIO/value
sleep .5
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
TURNED_ON=0
}
##############################################
# Initial GPIO setup
##############################################

#sudo chown tc /sys/class/gpio/export
#sudo echo "24" > /sys/class/gpio/export
#sudo chown -R tc /sys/class/gpio/gpio24/
#sudo echo "1" > /sys/class/gpio/gpio24/value
#sudo echo "out" > /sys/class/gpio/gpio24/direction
#sudo echo "0" > /sys/class/gpio/gpio24/value

sudo chown tc /sys/class/gpio/export
sudo echo $GPIO > /sys/class/gpio/export
sudo chown -R tc /sys/class/gpio/gpio$GPIO/
# muting is active low
#sudo echo "1" > /sys/class/gpio/gpio$GPIO/active_low
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value
sudo echo "out" > /sys/class/gpio/gpio$GPIO/direction
sudo echo "0" > /sys/class/gpio/gpio$GPIO/value


##############################################
# Loop forever. This uses less than 1% CPU, so it should be OK.
##############################################
while true
do
get_mode
sleep $INTERVAL
done

tc@piCorePlayer:~$

epoch1970
2017-12-06, 08:31
This "RESULT=`( echo "$MAC_ADDR $COMMAND"; echo exit ) | nc $LMS_IP 9002`" could be your problem.
"nc" doesn't work the same on every platform.
Is the CLI listening on port 9002 ? (why?)

In the console on the pi try
echo "<PLAYER_MAC> status 0 0" | nc <LMS_IP> <LMS_CLI_PORT>
and see if you get anything back.

Good luck.

paul-
2017-12-06, 09:37
EDIT: After a short chase, I do have a line reading TEST="0" in file /usr/local/sbin/config.cfg.
It looks like you're missing that line in your config.cfg file. Due to previous mods I suppose?

No, we are aware of the issue, just ignore it if it comes back, that wont cause any other problems, other than a nuisance message.

I glanced at the script, I don't know why you need to load anything from pcp-functions. Also, you do know that squeezelite can manage the GPIO toggle for you.

papa_arrugada
2017-12-06, 10:26
I got the script from here:

http://brianlawes.com/multi-zone-audio-system/

GPIO can toogle with power on/off. I checked this and this works.

But I want to know the state if player is playing or not.
If in stopped mode, I would muting the amps (avoiding noise).
Yes, I think I have to use port 9090. 9002 is used for web interface.

if I put the command in terminal I get no information:



tc@piCorePlayer:~$
tc@piCorePlayer:~$ echo ab:cd:ef:12:34:63 status 0 0 | nc 192.168.0.229 9090
tc@piCorePlayer:~$

papa_arrugada
2017-12-06, 10:29
I also checked:



tc@piCorePlayer:~$
tc@piCorePlayer:~$ echo "ab:cd:ef:12:34:63" status 0 0 | nc 192.168.0.229 9090
tc@piCorePlayer:~$


or the other mac adresses. I have 4 player instances.
"top" gives me:



CPU: 9.3% usr 1.5% sys 0.0% nic 89.0% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 0.62 0.50 0.46 3/179 9517
PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND
1295 1 root S 15120 1.5 2 2.5 /usr/local/bin/squeezelite -n Wohnzimmer -o equal -a 80 0 -m ab cd ef 12 34 60 -v
1331 1 root S 15084 1.5 0 2.4 /usr/local/bin/squeezelite -n Esszimmer -o center -a 80 0 -m ab cd ef 12 34 62 -z
1345 1 root S 16108 1.6 0 2.4 /usr/local/bin/squeezelite -n Bad -o back -a 80 0 -m ab cd ef 12 34 63 -z
1323 1 root S 15084 1.5 2 2.3 /usr/local/bin/squeezelite -n Küche -o surround -a 80 0 -m ab cd ef 12 34 61 -z
3093 1377 root S 32768 3.2 1 0.2 /opt/jivelite/bin/jivelite
739 1 root S 3056 0.3 2 0.1 {bootlocal.sh} /bin/sh /opt/bootlocal.sh
9457 5293 tc R 3184 0.3 1 0.0 top
605 2 root SW 0 0.0 1 0.0 [ft5406]
5261 1285 root S 4736 0.4 1 0.0 sshd: tc@pts/0
1285 1 root S 4736 0.4 0 0.0 /usr/local/sbin/sshd
5293 5261 tc S 3184 0.3 0 0.0 -sh
693 1 root S 3184 0.3 3 0.0 crond

papa_arrugada
2017-12-06, 10:41
now it works!!!!!!!!!!

sorry!!!!!

I had the wrong port and ip address.

Now I can read the state of a special player.

The next step I can do is to toggle GPIO depending on that.

I have to say many many thanks for all the help.

I will post my script, when everything with is running.

DJanGo
2017-12-06, 11:30
-n Küche


hmmmmmeisterlich.....

umlaute in rechnerbezeichnungen wirklich?
Bitte tu dir einen gefallen und schau mal, was ich mit -S usw. im allerersten post gemeint haben koennte...

Den Tip haben dir danach noch andere gegeben, du mußt das rad nicht neu erfinden.

papa_arrugada
2017-12-06, 12:28
ich habs an geschaut mit dem -S

Ich meine auch es verstanden zu haben.
Klar bei Off gibts keine Wiedergabe, aber bei Pause ist doch noch eingeschaltet und da wollte ich auch ein Muting.

Was mir fehlt ist also ein Muting bei Pause, obwohl noch eingeschaltet ist.

Oder verstehe ich da was falsch.

Greg Erskine
2017-12-06, 13:55
Hi guys,

Here's the original thread concerning the development of the relay script, it may help with understanding its workings.

http://pinkfishmedia.net/forum/threads/be-real-neat-if.165465/

regards
Greg

papa_arrugada
2017-12-08, 05:51
thank you, Greg.
This is your original script.

I think, I don't need pcp-functions. Therefore can comment it out.
The only thing I need is polling the state of a special player.

And as next step perhaps recognizing some pressed buttons for "main function" like a special internet radio station or so....