2015-09-26, 16:45
Hey all,
I'm currently using openelec, and I'm doing some fancy stuff so I can trigger `irsend` from my wii mote. So my keymap looks like this:
This is all fine and working well. Now, I would like to trigger these same keys via the JSON RPC api.
I've tried a bunch of combinations and I can't figure it out.
Suppose I wanted to send volumeplus, i've tried
but volumeplus is not valid param
Also, what if I wanted to send the code behind key id="37"?
I've read the forums and as I understand it, key codes can't be triggered via JSON RPC, but keymaps are the recommended approach. So how does that work? Would I have an xml entry like
Then I send the home param to Input.ExecuteAction?
Thanks for any and all help on this
I'm currently using openelec, and I'm doing some fancy stuff so I can trigger `irsend` from my wii mote. So my keymap looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<keymap>
<global>
<remote>
<volumeplus>
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/VolumeUp)
</volumeplus>
<volumeminus>
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/VolumeDown)
</volumeminus>
<home>
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/Power)
</home>
</remote>
<keyboard>
<key id="166">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, up)
</key>
<key id="167">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, down)
</key>
<key id="169">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, left)
</key>
<key id="168">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, right)
</key>
<key id="211">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, select)
</key>
<key id="216">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, back)
</key>
<key id="37">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/Power)
</key>
<home>
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/Power)
</home>
<key id="210">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/InputDTV)
</key>
<key id="211">
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/InputKodi)
</key>
</keyboard>
</global>
</keymap>
This is all fine and working well. Now, I would like to trigger these same keys via the JSON RPC api.
I've tried a bunch of combinations and I can't figure it out.
Suppose I wanted to send volumeplus, i've tried
Code:
http://192.168.1.85/jsonrpc?request={"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"volumeplus"},"id":1}
Also, what if I wanted to send the code behind key id="37"?
I've read the forums and as I understand it, key codes can't be triggered via JSON RPC, but keymaps are the recommended approach. So how does that work? Would I have an xml entry like
Code:
<keymap>
<global>
<JSON_RPC??>
<home>
XBMC.RunScript(/storage/configfiles/lirc/sendIr.py, Panasonic/Power)
</home>
</JSON_RPC> ...
Then I send the home param to Input.ExecuteAction?
Thanks for any and all help on this