Moode Forum

Full Version: not working - workaroud found
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

i am new to moode and this forum, but as i faced an issue i would like to share this with you.
While i tried to configure external buttons to controll volume on my setup which is:
Moode version: Release 6.5.1 2020-04-27

In the GPIO Config panel i configured Button 1 on Pin 5 to cmd mpc vol +5
While testing this with /var/www/command/
i figured out that an exception was raised as follows:

2020-05-01 14:19:39 sw_1: pin=5, enabled=1, bounce_time=1000, cmd=mpc vol +5
Traceback (most recent call last):
 File "/var/www/command/", line 58, in sw_1_event
 File "/usr/lib/python2.7/", line 172, in call
   return Popen(*popenargs, **kwargs).wait()
 File "/usr/lib/python2.7/", line 394, in __init__
   errread, errwrite)
 File "/usr/lib/python2.7/", line 1047, in _execute_child
   raise child_exception
OSError: [Errno 2] No such file or directory

I could solve this issue by adding the shell=True argument so tat the callbacks look like this:
def sw_1_event(channel):, shell = True)

But according to this option might be not the best because in fact for moode the command string is constructed from external input (GPIO COnfig panel)

Is there someone else facing this issue and what do you think about the solution?
There is a NOTE under the save button on the GPIO Config screen.
NOTE: Use a comma to delimit arguments in the CMD field. Example: mpc,load,My Playlist

Your entry should be mpc,vol,+5 but it could be improved by doing below which would also update the UI volume knob.