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

Max2Play Home Forums General Questions on Hardware and Max2Play Versions [FIX IN BETA] Rotary Encoder Plugin with NEW IQAudio DigiAMP+

Viewing 10 posts - 1 through 10 (of 10 total)
  • 7. März 2019 at 6:50 #44685

    Hi MAX2Play community,

    I’m having problems installing the Rotary Encoder Plugin, ONLY when using Max2Play 2.47 with Pi 3B+ and the NEW IQAudio DiGiAMP+.

    When using my other Pi, which has an identical configuration – except that it connected to an IQAudio piDAC PRO – the Plugin installs perfectly and indicates it is running with process ID x.

    I have followed the relevant instructions:

    Easy control with Rotary Encoder and IR Remote


    http://www.iqaudio.com/downloads/IQaudIO.pdf

    And in particular looked through this existing forum thread:

    [SOLVED] Rotary encoder with IQaudIO Digi Amp

    But my problem is a little different – the software does not install correctly. Please can you help me?

    Thanks in advance,
    Matt

    7. März 2019 at 14:56 #44687

    Hi Bow,

    Which pins did you use? Should be the pin 22 for GPIO25 and e.g. pin 1 for 3V.

    8. März 2019 at 2:40 #44710

    Hi Heiner,

    As per the IQAudio_v30 instruction manual, I am using:

    GPIO23 (Pi Pin 16) – Encoder Pin 1 (right)
    Ground (Pi Pin 14) – Encoder Center Pin, 2 (center)
    GPIO24 (Pi Pin 18) – Encoder Pin 3 (left)

    GPIO22 (Pin 15) – Is being used for Mute, which does work but not latched.

    But the problem is the encoder SW is not running – TOP shows no additional process is spawned / no sign of IQ_rot.

    Thanks,
    Matt

    11. März 2019 at 11:12 #44738

    Hi Matt,

    That sounds like something might have gone wrong during the installation sequence.

    The script should be running regardless of whether an encoder is connected or not.

    Your output during installation should have been the following:

    Update Configfile - new Entry created
    IQAUDIO_ROTARY_ENCODER_AUTOSTART successfully added to autostart
    Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
    Get:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
    Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [214 kB]
    Get:4 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [44.4 kB]
    Get:5 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [11.7 MB]
    Get:6 http://mirrordirector.raspbian.org/raspbian stretch/non-free armhf Packages [95.5 kB]
    Fetched 12.1 MB in 19s (615 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

    Please try a new installation if possible and see if you can recreate this sequence.
    Both installation and reboot take a minute or two.

    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:

    root@Officepi:/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:

    root@Officepi:/home/pi# pidof IQ_rot
    root@Officepi:/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

    26. März 2019 at 15:22 #44866

    Hi Bow,

    Thank you for the detailed report and sorry about the late reply.

    I was just able to recreate the issue. We are not sure what might have caused it since we did not alter the installer in any way.

    We will investigate further and let you know when we have the fix right away.

    27. März 2019 at 16:55 #44909

    Hi Bow,

    We were able to isolate the issue and add a fix to our current beta. To get it working, do the following:
    – Head to Settings/Reboot and make a Beta Update
    – Select „None“ in your IQaudIO menu, click save, reboot
    – Select DigiAmp+ again, reboot

    Now your Rotary Encoder should be working.

    28. März 2019 at 0:54 #44911

    Hi Heiner,

    Success!! Thank you very much indeed!! Rotary encoder volume control is now working with the NEW IQAudio DigiAmp+. Excellent!

    Just FYI, the mute button doesn’t work with GPIO22 (pin 15):

    When using the command line option:

    -o hw:CARD=IQaudIODAC -V Digital -Q -X 22

    The following output is seen:

    Update Configfile - existing Entry changed
    Updated Squeezelite Settings - Restart Squeezelite to apply changes!
    Trying to stop ... successfully stopped
    Trying to launch ... NOT successful Click here to show detailed information
    gpio: Unable to open GPIO direction interface for pin 22: No such file or directory
    wiringPiISR: unable to open /sys/class/gpio/gpio22/value: No such file or directory

    I’ve not had time to debug it yet, and understand if you would prefer this to be raised in a new thread if required?

    2. April 2019 at 10:01 #44946

    Hi Bow,

    Thanks for the quick update!

    We would appreciate if you raised the different issue in a different topic so I can close this specific issue as solved 😉

    16. Dezember 2023 at 13:37 #52990

    Hi, I am having the same issue, did this beta ever make it into the release? I am running 2.56

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Register here