Reply To: [LIRC Infrared Fix Update] Max2Play Hardware Control Plugin – We Need Your Feedback!

Max2Play Home Forums Max2Play Development (Ideas, Wishes) [LIRC Infrared Fix Update] Max2Play Hardware Control Plugin – We Need Your Feedback! Reply To: [LIRC Infrared Fix Update] Max2Play Hardware Control Plugin – We Need Your Feedback!

6. Oktober 2019 at 16:00 #47237

As regards buttons. It would be great if you could enter a table of PIN numbers (whether pull up or down) and associated commands.
I have created my own program (happy to send it to you if you want) which sets up the following associations, but it would be better if your plug in did this:

# Pin definitions
VOL_UP = 21
VOL_DOWN = 22
NEXT = 24
PREVIOUS = 20
PLAY_PAUSE = 16
ONE = 17
TWO = 27
THREE = 9
FOUR = 11
SHUTDOWN = 10

def FvolUp(channel):
command = ‚mixer&p1=volume&p2=%2B‘ + VOL_INCR
execute (command)

def FvolDown(channel):
command = ‚mixer&p1=volume&p2=-‚ + VOL_INCR
execute (command)

def Fnext(channel):
command = ‚playlist&p1=jump&p2=%2B1‘
execute (command)

def Fprevious(channel):
command = ‚playlist&p1=jump&p2=-1‘
execute (command)

def FplayPause(channel):
command = ‚pause‘
execute (command)

def Fone(channel):
command = ‚playlist&p1=play&p2=__playlists/One‘
execute (command)

def Ftwo(channel):
command = ‚playlist&p1=play&p2=__playlists/Two‘
execute (command)

def Fthree(channel):
command = ‚playlist&p1=play&p2=__playlists/Three‘
execute (command)

def Ffour(channel):
command = ‚playlist&p1=play&p2=__playlists/Four‘
execute (command)

def Fshutdown(channel):
call(„sudo shutdown –poweroff now“, shell=True)