2013-01-25, 03:33
Hey all,
Im trying to run a jsonrpc command from my remote via remote.xml but I cant get it to work. Here is a snippet from my remote.xml
The command below works from the commandline:
If I change <livetv> to XBMC.ActivateWindow(Weather) it works as should. Whats strange is that when I have the jsonrpc command in <livetv> it acts in the xbmc default behaviour and shows the tv channels overview. Here is the section of my debug log file.
Is it possible to execute jsonrpc commands from remote.xml? I couldnt seem to find much info about it online. Anyone have any ideas?
Thanks in advance.
Im trying to run a jsonrpc command from my remote via remote.xml but I cant get it to work. Here is a snippet from my remote.xml
Code:
<keymap>
<global>
<remote>
<livetv>XBMC.executeJSONRPC('{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"channelid":1}}}')</livetv>
<play>Play</play>
<pause>Pause</pause>
The command below works from the commandline:
Code:
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"channelid":1}}}' http://localhost:8098/jsonrpc
If I change <livetv> to XBMC.ActivateWindow(Weather) it works as should. Whats strange is that when I have the jsonrpc command in <livetv> it acts in the xbmc default behaviour and shows the tv channels overview. Here is the section of my debug log file.
Code:
12:28:51 T:3016713984 DEBUG: LIRC: Update - NEW at 18402:182 0 KEY_TUNER devinput (KEY_TUNER)
12:28:51 T:3016713984 DEBUG: OnKey: 24 (18) pressed, action is XBMC.ActivateWindowAndFocus(MyPVR, 32,0, 11,0)
12:28:51 T:3016713984 DEBUG: Activating window ID: 10601
12:28:52 T:3016713984 DEBUG: ------ Window Deinit (MyPVR.xml) ------
12:28:52 T:3016713984 DEBUG: ------ Window Init (MyPVR.xml) ------
12:28:52 T:3016713984 INFO: Loading skin file: MyPVR.xml, load type: LOAD_EVERY_TIME
12:28:52 T:3016713984 DEBUG: Using already stored xml root node for /usr/share/xbmc/addons/skin.confluence/720p/MyPVR.xml
12:28:52 T:3016713984 DEBUG: CGUIMediaWindow::GetDirectory (pvr://channels/tv/All TV channels/)
12:28:52 T:3016713984 DEBUG: ParentPath = []
12:28:52 T:3016713984 DEBUG: CPVRDirectory::GetDirectory(pvr://channels/tv/All TV channels)
12:28:52 T:3016713984 DEBUG: CGUIWindowPVRCommon - OnMessageFocus - focus set to window 'tv'
12:28:52 T:3016713984 DEBUG: CGUIWindowPVRChannels - UpdateData - update window 'tv'. set view to 11
Is it possible to execute jsonrpc commands from remote.xml? I couldnt seem to find much info about it online. Anyone have any ideas?
Thanks in advance.