Author Topic: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012  (Read 28642 times)

0 Members and 1 Guest are viewing this topic.

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #30 on: January 10, 2013, 06:45:32 PM »
Make a filter can be little complicate.
See:
Code: [Select]
{"jsonrpc": "2.0", "method": "videoLibrary.Gettvshows", "params": { "sort": {"order": "descending", "method": "lastplayed"},
   "filter": {and:["or":[{"field": "inprogress", "operator": "true", "value": ""},{"field": "genre", "operator": "startwith", "value": "a"}],{"field": "title", "operator": "startwith", "value": "a"}}],
   "proerties"["title"]  }, "id": 1}
First the xbmc will see if the tvshow has a inprogress field or the genre start with "a", if one of this its true the xbmc will see if the title start with the char "a" .

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #31 on: January 10, 2013, 08:23:27 PM »
Hey claymic, hey jitterjames,

very nice code of both from you. Really Thanks.
I understand much more how voxcommand rocks (works), and what is possible with XBMC JSON <--> VoxCommando.
I also play a little bit around with this stuff.

Last night I create a few timer with Voxcommando, so I can "set" my eggtimer on Sunday via Voicecommando like "Set timer 5 minutes an 30 seconds" or "Set timer to 4 minutes" Its really cool to do this that way.

If your are interrested on these scripts, let me know it.

voxcommando-infected

chris

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #32 on: January 10, 2013, 08:35:47 PM »
Yes Chris, VoxCommado its  great and the support its the best. I am now trainning my htpc, i lost my hd few weeks ago, its time to get the vox working again ;D

fishware

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 1
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #33 on: January 10, 2013, 09:33:52 PM »
Here it comes:


After I get the time to count, I call a vbscript that returns the time to count in seconds, so I can use [attachment=1][attachment=1]the VC.SetEventTimer (is there any way to calculate simple arithmatics with VC itself?).

Is the timer up, i fired a eventghost event, because currently I'm using windows 7 and it don't have a german TTS. To play a little with the new Windows 8 Metro GUI I run it in a VM with a 22" Touchscreen (really cool Metro app for XBMC look here: http://apps.microsoft.com/windows/en-us/app/fb9b17a9-0613-4fa6-b7a0-ee233c1a0e71 )

Windows 8 includes a german TTS named Hedda. So I can route TTS output via EventGhost with payload to my Windows 8 german TTS.

Feel free to fire your own events, may be you try to shut the whole internet, after your egg is cooked  well.

chris


claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #34 on: January 11, 2013, 08:37:45 AM »
Ok, started to make my new commands. is there any default configuration for the XBMC JSON ?
Anyway i will make the changes and post here.
Lets start with the simple commands first  ;D
XBMC Go To Windows
[attachment=1]
Clayton

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #35 on: January 11, 2013, 10:35:54 AM »
Since i am not feeling my fingers anymore(copy,paste,copy,paste, ::club), i will stop for a while, but let me share another group first.
This group have almost all actions that you need to control the xbmc, its just a copy and paste control for a Input.ExecuteAction . Many of this commands we can put in a playload later, i just make separately for a quick test to see what this commands does. I think there is more then 100 commands inside this group.
If you guys found any error let me know to fix it. Maybe i will insert more payloads later. Some of the commands like audio delay plus i put a loop, but dont test yet because i cant play the video in this pc, i will test later if you guys dont do this first ;D.
Clayton
« Last Edit: January 11, 2013, 10:53:07 AM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #36 on: January 11, 2013, 10:38:52 AM »
Ok, started to make my new commands. is there any default configuration for the XBMC JSON ?
Anyway i will make the changes and post here.
Lets start with the simple commands first  ;D
XBMC Go To Windows
[attachment=1]
Clayton

Hi Clayton, big thanks to start with this commands, that is exactly what I need to find a start with JSON   :clap
I'll translated the commands in german too.
If you have more, post it  ;)

Kalle
« Last Edit: January 11, 2013, 10:46:31 AM by Kalle »
***********  get excited and make things  **********

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #37 on: January 11, 2013, 10:40:31 AM »
kalle, i am thinking of making all the commands.
I am waiting my fingers wake up :biglaugh.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #38 on: January 11, 2013, 10:43:16 AM »
kalle, i am thinking of making all the commands.
I am waiting my fingers wake up :biglaugh.
Haha, no hurry - you are the best  :hugs

Is there anything to do in XBMC to work with this commands?
***********  get excited and make things  **********

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #39 on: January 11, 2013, 10:55:26 AM »
Kylle you just need to use the Frodo RC1 or later.
Forgot to put the payloads, my bad


Clayton
« Last Edit: January 11, 2013, 11:00:47 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #40 on: January 11, 2013, 10:57:02 AM »
Since i am not feeling my fingers anymore(copy,paste,copy,paste, ::club), i will stop for a while, but let me share another group first.
This group have almost all actions that you need to control the xbmc, its just a copy and paste control for a Input.ExecuteAction . Many of this commands we can put in a playload later, i just make separately for a quick test to see what this commands does. I think there is more then 100 commands inside this group.
If you guys found any error let me know to fix it. Maybe i will insert more payloads later. Some of the commands like audio delay plus i put a loop, but dont test yet because i cant play the video in this pc, i will test later if you guys dont do this first ;D.
Clayton
Thanks Clayton

This is very helpful.  I would like to point out though, that for most of the simple actions, I think it is better to use the old Btn.KB commands.  However, there may be some situations where using the JSon method is preferable so this is still a very valuable resource.  The Btn.KB method is faster and lighter, and we have the advantage of commands that vary with context, because we are simulating a keypress.

the advantage of the Json commands is that VC will wait for confirmation of the command (sometimes you want this and sometimes you don't) and in some cases we may want to execute a specific action and not rely on context.

So for example, if we are using the scroll (up down left right) or Cancel, or select, then using the Btn.Kb method is better.

But if we are doing a complex macro where we need to wait to make sure that XBMC is ready before we go to the next action, then it is better to use the JSon actions.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #41 on: January 11, 2013, 10:58:56 AM »
Haha, no hurry - you are the best  :hugs

Is there anything to do in XBMC to work with this commands?
You should only need to enable the network service and set the port, however, some commands will only work with the later version of Frodo.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #42 on: January 11, 2013, 11:00:12 AM »
You should only need to enable the network service and set the port, however, some commands will only work with the later version of Frodo.
Ok, thanks  :D
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #43 on: January 11, 2013, 11:03:07 AM »
Kylle you just need to use the Frodo RC1 or later.
Forgot to put the payloads, my bad


Clayton

This seems like the same file twice.  Is there supposed to be a difference between:  "xbmcLevelJson.xml"  and "xbmcZoomLevelJson.xml" ?

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: XBMC JSON: for pre-Frodo nightlies after Oct. 9th 2012
« Reply #44 on: January 11, 2013, 11:29:10 AM »
the advantage of the Json commands is that VC will wait for confirmation of the command (sometimes you want this and sometimes you don't) and in some cases we may want to execute a specific action and not rely on context.

So for example, if we are using the scroll (up down left right) or Cancel, or select, then using the Btn.Kb method is better.

But if we are doing a complex macro where we need to wait to make sure that XBMC is ready before we go to the next action, then it is better to use the JSon actions.
You read my mind James. You are all right. I made some tests in vox early to see if the actions will works like a callback function.
Thanks for the tips. Later i will start some more complex actions and maybe create a little plugin to manage our tvshows. Let´s see.
Clayton