Reply To: [FIX IN BETA] Rotary Encoder Plugin with NEW IQAudio DigiAMP+

21. März 2019 at 20:42 #44844

Hi Heiner,

Here are some further details – like I said, I have a standard install and the only variation to my configuration (compared to an existing working config where the encoder SW does run) is the inclusion of the NEW IQAudio DigiAmp+:

INSTALLATION SEQUENCE OUTPUT:

Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://archive.raspberrypi.org/debian stretch/main armhf Packages [214 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [44.5 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [11.7 MB]
Fetched 12.0 MB in 24s (481 kB/s)
Reading package lists…
Reading package lists…
Building dependency tree…
Reading state information…
/opt /var/www/max2play/public
finished – Reboot needed: Click here to Restart Device

***

rc.local ENTRY:

[email protected]:/etc# cat rc.local

#!/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 enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#Max2Play
sudo -u pi -H -s /opt/max2play/autostart_xbmc.sh > /tmp/autostartkodi.txt 2>&1 &

#Network Check for Mountpoints
COUNTER=0;while [ -z "$(/sbin/ip addr show eth0 | grep -i 'inet ')" -a -z "$(/sbin/ip addr show wlan0 | grep -i 'inet ')" -a "$COUNTER" -lt "5" ]; do echo "Waiting for network";COUNTER=$((COUNTER+1));sleep 3;done;set +e;/bin/mount -a;set -e;

#Max2Play Start Audioplayer
sudo -u pi -H -s /opt/max2play/start_audioplayer.sh > /dev/null 2>&1 &

#Start Accesspoint on Boot if no network connection available
/var/www/max2play/application/plugins/accesspoint/scripts/start_accesspoint_onboot.sh
if [ "$(grep -a 'AUTORESIZE=1' /boot/config.txt)" ]; then
  sed -i 's/AUTORESIZE=1//' /boot/config.txt
  /opt/max2play/expandfs.sh mmcblk0p2 REBOOT
fi
if [ "$(LANG=C && /sbin/ip addr show eth0 | grep 'inet ' | wc -l)" -lt "1" ]; then sudo /opt/max2play/wps_config.sh; fi

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

echo "Unmute iqaudio-ampplus";echo "22" > /sys/class/gpio/export;echo "out" >/sys/class/gpio/gpio22/direction;echo "1" >/sys/class/gpio/gpio22/value;
if [ "$(grep -a 'IQAUDIO_ROTARY_ENCODER_AUTOSTART=1' /opt/max2play/autostart.conf)" ]; then
  /opt/IQ_rot &
fi
exit 0

***

/var/log/messages:

My IP address is 192.168.1.66
Unmute iqaudio-ampplus
[   15.815115] rc.local[746]: sh: echo: I/O error
[FAILED] Failed to start /etc/rc.local Compatibility.
See 'systemctl status rc-local.service' for details.

***

IQ_rot is not running:

[email protected]:/home/pi# pidof IQ_rot
[email protected]:/home/pi# ps axg | grep IQ_rot
 8517 pts/0    S+     0:00 grep IQ_rot

***

ps axg output associated with squeezelite:

 383 ?        S      0:00 /bin/bash /usr/sbin/squeezeboxserver_safe /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/sq
  401 ?        S      2:05 /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /
  464 ?        Sl     2:30 /opt/squeezelite/squeezelite -n Officepi -m b8 27 eb f3 6b 85 -o default:CARD=IQaudIODAC -a 80 4   -o hw:CARD=IQaudIODAC -V Digital
  499 ?        Sl     0:00 /opt/shairport/shairport --name Officepi -o alsa -- -d sysdefault:CARD=IQaudIODAC -t hardware -m hw:CARD=IQaudIODAC -c Digital

***

/var/log/syslog.log:

Mar 21 02:07:08 Officepi systemd[1]: Started User Manager for UID 1000.
Mar 21 02:07:08 Officepi rc.local[746]: sh: echo: I/O error
Mar 21 02:07:08 Officepi systemd[1]: rc-local.service: Control process exited, code=exited status=1
Mar 21 02:07:08 Officepi systemd[1]: Failed to start /etc/rc.local Compatibility.
Mar 21 02:07:08 Officepi systemd[1]: rc-local.service: Unit entered failed state.
Mar 21 02:07:08 Officepi systemd[1]: rc-local.service: Failed with result 'exit-code'.
Mar 21 02:07:08 Officepi systemd[1]: Starting Hold until boot process finishes up...

Please let me know what other information you need.

Many thanks,
Matt