2014-03-29, 19:38
I used the setup below to have the volume up & down keys send volume commands to my Onkyo receiver, and it was working fine in Frodo. No luck with Gotham Beta 2 however.
~/.xbmc/userdata/keymaps/keyboard.xml
~/.xbmc/userdata/volume_down.py
The volume control scripts work correctly when executed locally, and the debug prints get appended to the test.txt file.
When I look at the debug log, I see the keypresses, the correct action, and no errors.
The debug prints are not written to "test.txt", which leads me to belive the scripts aren't being run at all.
~/.xbmc/userdata/keymaps/keyboard.xml
Code:
<keymap>
<global>
<keyboard>
<volume_down>XBMC.RunScript(special://xbmc/userdata/volume_down.py)</volume_down>
<volume_up>XBMC.RunScript(special://xbmc/userdata/volume_up.py)</volume_up>
</keyboard>
</global>
</keymap>
~/.xbmc/userdata/volume_down.py
Code:
#!/usr/bin/python
import eiscp
receiver = eiscp.eISCP('192.168.0.102')
receiver.raw('MVLDOWN')
with open("/home/pitpat/scratch/test.txt", "a") as myfile:
myfile.write("volume down\n")
The volume control scripts work correctly when executed locally, and the debug prints get appended to the test.txt file.
When I look at the debug log, I see the keypresses, the correct action, and no errors.
Code:
12:07:49 T:140340192778112 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
12:07:49 T:140340192778112 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is XBMC.RunScript(special://xbmc/userdata/volume_down.py)
12:07:49 T:140340192778112 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
12:07:49 T:140340192778112 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is XBMC.RunScript(special://xbmc/userdata/volume_down.py)
12:07:49 T:140340192778112 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
12:07:49 T:140340192778112 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is XBMC.RunScript(special://xbmc/userdata/volume_down.py)
12:07:49 T:140340192778112 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
12:07:49 T:140340192778112 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is XBMC.RunScript(special://xbmc/userdata/volume_down.py)
The debug prints are not written to "test.txt", which leads me to belive the scripts aren't being run at all.