Author Topic: Can VC tell if XBMC is playing media?  (Read 5936 times)

0 Members and 2 Guests are viewing this topic.

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Can VC tell if XBMC is playing media?
« on: April 13, 2014, 02:43:01 PM »
I'm a new VC user. I've got the VoxCommando tools XBMC plugin installed.

Is there a way to get an event in VC when XBMC starts or stops playback? I'd like to use this to disable some commands while, say, a TV show is playing, to avoid false positives.

If not, I guess this might be a feature request for the XBMC plugin...

EDIT: I have selected "subscribe to notifications from xbmc" in the XJSON plugin. Restarted both VC and XBMC. But I don't see notifications.
« Last Edit: April 13, 2014, 02:56:13 PM by ih8gates »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #1 on: April 13, 2014, 03:37:21 PM »
Please tell us what version of VoxCommando you are using, what configuration for VC you selected and what version of XBMC you are using.

It should be generating events by default.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #2 on: April 13, 2014, 03:37:54 PM »
Hi ih8gates and welcome to VoxCommando forum. You can select the the following command group code and drag and drop it in your VC command tree. I hope this is what you searching for. Let us know if it works  ;)
You can see the first command in this group is connect, do this first.
« Last Edit: April 13, 2014, 05:24:52 PM by jitterjames »
***********  get excited and make things  **********

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #3 on: April 13, 2014, 03:45:08 PM »
1.1.9.1 and the Frodo configuration. With Frodo 12.3

Is there a way to confirm that I chose the Frodo configuration? It's possible that I did something stupid, but I am getting a successful XJSON connect and VC is controlling XBMC correctly.


Kalle - I already have the JSON Events group in my VC tree. But I'm never seeing the XBMC events (like OnPlay) in my VC history panel.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #4 on: April 13, 2014, 03:48:00 PM »
use the xjson.connect action first - I think this will solve it.
« Last Edit: April 13, 2014, 03:51:15 PM by jitterjames »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #5 on: April 13, 2014, 03:50:39 PM »
In the default configuration for Frodo, there is a command (which calls the connect action) which is triggered by the "focused.XBMC" event.  It won't work if XBMC is running on a different computer.  In that case you would need to call connect some other way.
« Last Edit: April 13, 2014, 03:54:06 PM by jitterjames »

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #6 on: April 13, 2014, 03:52:59 PM »
XJSON.Connect is firing every time I focus XBMC. If I hover over the history entry, it says "info: Connected"

I suspect that if it wasn't connecting properly, I wouldn't be getting control of XBMC by VC.

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #7 on: April 13, 2014, 03:54:42 PM »
I also checked to see that XBMC is allowed access through the firewall.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #8 on: April 13, 2014, 03:55:15 PM »
I suspect that if it wasn't connecting properly, I wouldn't be getting control of XBMC by VC.
Actually that is not really the case.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #9 on: April 13, 2014, 04:04:29 PM »
Based on what you have told us, I can't think of any reason why it would not be working.

Are you using the English Frodo configuration for VoxCommando?  (no there is no way to check which you chose, after the fact, except by looking at what commands are in your tree)

Is XBMC running on the same machine as VoxCommando?

What port are you using and does the port in VC match the port set in XBMC web server settings?

I think I will need to see a VoxCommando log and possibly an XBMC log too.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #10 on: April 13, 2014, 04:07:00 PM »
On the main VC window, on the options drop-down menu, make sure that "show all events" is checked.  Normally it is checked by default.

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #11 on: April 13, 2014, 04:13:33 PM »
If I manually run the XJson Connect, I get the TTS speaking "connected", but I don't see any events.

I *do* have "show all events" enabled.

I'm using English Frodo. I'm using port 8111, which is set in XBMC, too. When I load the XJson plugin and test the connection, I get "success" and see the "pong" JSong block from XBMC.

ih8gates

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Can VC tell if XBMC is playing media?
« Reply #12 on: April 13, 2014, 04:26:31 PM »
I turned on debug in XBMC and in VC. Started and stopped a TV show a couple of times. I've got the logs, but when I try to upload, I get an error that the upload directory is full. My XMBC log is 154k, Vox's is only 2k.

Should I post them into a message?

Other info that may help: I'm using an Android app called YATSE that controls XBMC. Could it be that YATSE is getting the Json notifications? Does XBMC allow multiple "listeners"?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can VC tell if XBMC is playing media?
« Reply #14 on: April 13, 2014, 04:43:34 PM »
I think the problem is here:

Code: [Select]
<advancedsettings>
                                              <jsonrpc>
                                                <tcpport>9091</tcpport>
                                              </jsonrpc>

Is there a particular reason you are changing the default port?  VC uses the default of 9090 and I have not implemented any way for the user to select a different port because it has never come up before.