Hello,
I'm trying to use this great tool on an installation of Plex Home Theater (forked from Kodi).
I've tried multiple versions of this tool, but I can't seem to get the daemon to fire any actions (other than startup).
I'm using the pre-compiled binary for 1.1.4_linux_amd64. I'm running a very minimal Arch installation.
Here is the output when i start it and then manually activate and then deactivate the screensaver from Plex Home Theater. I have debugging turned on:
Code:
INFO[0000] Connected to Kodi
DEBU[0000] Sending Kodi Request (response desired) request={0xc20802a7f0 JSONRPC.Version <nil> 2.0}
DEBU[0000] Received response from Kodi response.Result=map[version:map[major:6 minor:0 patch:3]]
INFO[0000] Connected to Hyperion
DEBU[0000] Sending to Hyperion request=map[command:clear priority:800]
DEBU[0000] Received from Hyperion response=&{true <nil>}
DEBU[0000] Executing shell command command=&{/home/siam/hyperion-x11-start [/home/siam/hyperion-x11-start START] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
DEBU[0002] Received notification from Kodi notification.Method=GUI.OnScreensaverActivated notification.Params=map[sender:xbmc data:<nil>]
DEBU[0012] Received notification from Kodi notification.Method=GUI.OnScreensaverDeactivated notification.Params=map[data:false sender:xbmc]
Here is my config file:
Code:
{
"kodi": {
"address": "127.0.0.1",
"port": 9090
},
"hyperion": {
"address": "127.0.0.1",
"port": 19444
},
"debug": true,
"callbacks": {
"Startup": [
{
"backend": "hyperion",
"command": "clear",
"priority": 800
},
{
"backend": "shell",
"background": true,
"command": "/home/siam/hyperion-x11-start.sh",
"arguments" : ["ON"]
}
],
"GUI.OnScreensaverActivated": [
{
"backend": "hyperion",
"command": "clear",
"priority": 800
},
{
"backend": "shell",
"background": true,
"command": "/home/siam/hyperion-x11-start.sh",
"arguments" : ["OFF"]
}
],
"GUI.OnScreensaverDeactivated": [
{
"backend": "hyperion",
"command": "clear",
"priority": 800
},
{
"backend": "shell",
"background": true,
"command": "/home/siam/hyperion-x11-start.sh",
"arguments" : ["ON"]
}
]
}
}
I am expecting it to execute the callback commands.
Is there anything I'm doing wrong?
Happy to say I've found the issue. Had to add "background": true to the shell backends. Updated the script for posterity.
I love this tool so thank you very much pdffs. Please keep developing!