Hi there,
in the PMP 1.0.3 patchnotes is mentioned:
Added support for host command script that can execute a script. Put a script in the scripts datadir and call
host script script.py from the inputmap.
Anyone knows how to use this feature?
As far as i know, python is not installed on the PMP embedded version. I’m running it on a raspi2 and can’t find it.
Hi
Same issue here. My python script is working when executed from command line, but I get always the same error when trying to execute it with inputmap
2018-12-29 11:32:20 [ DEBUG ] InputComponent.cpp @ 221 - Emit input action: ("host:hyperionon.py")
2018-12-29 11:32:20 [ DEBUG ] InputComponent.cpp @ 115 - Got host command: "hyperionon.py" arguments: ""
2018-12-29 11:32:20 [ WARN ] InputComponent.cpp @ 144 - No such host command: "hyperionon.py"
Whatever the path is in my inputmap file…
Anyone has a clue ?
actually it works well this way : "KEY_NAME": "host:script /path/.to/script/script.sh",
(or python)
1 Like
I have successed in my Rasperry 3B+.
- cec.json file as follow:
{
“name”: “HDMI CEC”,
“idmatcher”: “CEC.*”,
“mapping”:
{
“KEY_LEFT”: “left”,
“KEY_RIGHT”: “right”,
“KEY_UP”: “up”,
“KEY_DOWN”: “down”,
“KEY_MENU”: “unknown”,
“KEY_SELECT”: “enter”,
“KEY_BACK”: “back”,
“KEY_RED”: “increase_volume”,
“KEY_GREEN”: “decrease_volume”,
“KEY_YELLOW”: “host:script /storage/.local/share/plexmediaplayer/scripts/storage/.local/share/plexmediaplayer/scripts/cec-yellow-toggle.sh”,
“KEY_BLUE”: “blue”,
“KEY_PLAY”: “play”,
“KEY_STOP”: “stop”,
“KEY_PAUSE”: “pause”,
“KEY_SEEKFWD”: “seek_forward”,
“KEY_SEEKBCK”: “seek_backward”,
“KEY_SUBTITLES”: “cycle_subtitles”,
“KEY_INFO”: “unknown”,
“KEY_NEXT”: “step_forward”,
“KEY_PREV”: “step_backward”,
“KEY_HOME”: “home”,
“KEY_NUMERIC_([0-9])”: “%1”,
“KEY_GUIDE”: “guide”
}
and 2. script file cec-yellow-toggle.sh is
#!/bin/sh
echo /bin/date " : cec toggle yellow." >> /tmp/yellow.log
#/sbin/shutdown -r now