i’m trying to setup patchbox so that i can switch between different modules with The Button.
I want to use the Modep module and alternatively switch to a custom module named “vcvrack”. I installed VCVRack on my Pi as described here https://github.com/hexdump0815/vcvrack-dockerbuild-v1 and it works as advertised, though i have yet to check the performance.
I made a custom script named
deactivate_module.sh which i placed in the
/usr/local/pisound/scripts/pisound-btn and bound it to HOLD_3S in the
pisound-btn.conf of each module i want to use (modep, vcvrack). Also
chmod -ed it to make it executable.
I proceeded the same way with two scripts named
change_modep.sh and ‘change_vcvrack.sh’ which i bound to CLICK_1 and CLICK_2 in the default patchbox OS setting of the button.
The content of these scripts is just #!/bin/sh and then
. /usr/local/pisound/scripts/common/common.sh patchbox module deactivate >/usr/local/pisound/scripts/pisound-btn/logdeactivate.txt ... . /usr/local/pisound/scripts/common/common.sh patchbox module activate modep >/usr/local/pisound/scripts/pisound-btn/logmodep.txt ... . /usr/local/pisound/scripts/common/common.sh patchbox module activate vcvrack >/usr/local/pisound/scripts/pisound-btn/logvcvrack.txt
When I’m calling these scripts manually by cd-ing into the folder and then starting them everything works as intended and the logfiles show the correct output. Also when I’m changing modules via the Patchbox UI, everything works just fine. But when pressing the Button to execute the scripts the process kind of breaks in unpredictable ways. The logfiles are created, but they are completely empty.
When deactivating, the status of
patchbox module status shows None, but the
patchbox button status remains unchanged. Also i can still reach the MODEP-UI with other devices via Pi’s Hotspot. When i then deactivate the module (again) via patchbox UI, there are still services getting deactivated, which wouldn’t happen, when executing the scripts manually.
My guess is, it has something to do with the Button’s permissions.
Does anyone have a solution for this issue? Maybe @Giedrius can help? I saw this post https://community.blokas.io/t/the-button-user-and-permission/1249 but couldn’t really get to the ground of it.
Any help would be appreciated
For reference: I’m working on a Pi 4 B, 4GB. I am also using a FanShim on my Pi as described in this post https://community.blokas.io/t/pisound-with-raspberry-pi-4/1238/9 and it works fine for me. (Didn’t install the FanShim Software because i read somewhere that it might conflict with the Pisound Button. So the fan just runs permanently, which produces a little noise, but is not really a problem for me). Also i activated the “pi 4 fix” described here https://community.blokas.io/t/pisound-with-raspberry-pi-4/1238/12 with
pisound-config, because otherwise the pi wouldnt correctly boot with the FanShim and Pisound mounted.