Author Topic: Controlling multiple XBMC instances?  (Read 10782 times)

0 Members and 2 Guests are viewing this topic.

Mondo

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Controlling multiple XBMC instances?
« on: February 01, 2013, 10:09:52 PM »
I've been testing the software and it works great, however it only controls one XBMC at a time.

And I have a request for a functionality that would come in handy for my multi XBMC household.

I have quite a few XBMCs deployed in my house, all of them on LINUX OS, so deploying voxcommando on them can't be done. But they all share the same media, which is a windows server located in the basement, which is where I could deploy voxcommando on.

Now, could it be possible to modify VoxCommando to control multiple XBMC instances by adding the "IN" keyword to the voice commands?

Suppose I have one XBMC in the bedroom, one in the livingroom and one in the kitchen. The commands would be something like:

"Mute on Kitchen"
"Play Song in livingroom"
"Stop Movie in bedroom"

As each XBMC has its own IP address could this XBMC IP list be configured via the Options window,in the same XBMC tab, but in a dropdown combo kinda like this?

Kitchen --> 192.168.0.1
Bedroom --> 192.168.0.2
Livingroom --> 192.168.0.3

And could one of the locations be marked as the "Default", so if I'd only say "Mute" it will mute the default XBMC I have in the list.

That way I can issue commands to any XBMC in the house and use only one VoxCommando front end in the windows central server with a voxwave microphone.

Thoughs?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #1 on: February 01, 2013, 10:27:47 PM »
Hi Mondo,

Something along these lines should be possible, although I think it would be more practical to say "control living room", and then issue various commands that would be sent to the XBMC in the living room.  Then say "control bedroom",  then give commands for the bedroom, etc.

It sounds like you are still using Eden.  Do you plan to switch to Frodo soon?
« Last Edit: February 02, 2013, 08:15:10 AM by jitterjames »

Mondo

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #2 on: February 02, 2013, 12:41:22 AM »
Yeah, I've got Frodo RC2 on the living room HTPC, Eden on the kitchen an AppleTV, and OpenElec 2.99 RC 2 Frodo on the bedroom... ;) Might move the lat Eden to Frodo RC2 this weekend...

And you're right, giving VoxCommando a context command like "Control Livingroom" would be even better, that way every following command would be applied to that location.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #3 on: February 02, 2013, 07:13:22 AM »
I suggest you move everything to Frodo Final, so they are all talking the same language.

Are you sharing a central database, or just using the same media files, and each XBMC is indexing the data on its own.  It is important because if each is maintaining its own database then the ID numbers will be different for each XBMC which will be a problem.

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #4 on: May 03, 2013, 02:34:49 PM »
+1 for this ability.

Something like 'profiles' would be good.
Have seperate instances of XBMC on multiple devices and have different profiles for each on VC. That way the same phrases could be used on each device without having to learn seperate phrases for each one. Then you could create individual groups for each profile to suit the set up of each XBMC instance ie: htpc, atv2, zbox or whatever.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #5 on: May 03, 2013, 03:32:25 PM »
It works differently for Eden and Frodo, but I guess it is safe to assume everyone is on Frodo at this point.

Here's an example of how to switch control from one XBMC to another

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="XJSON change XBMCs" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="870" name="x b m c office" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.0.125&amp;&amp;8080&amp;&amp;test&amp;&amp;test</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>x b m c office</phrase>
  </command>
  <command id="877" name="x b m c living room" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.0.103&amp;&amp;8080&amp;&amp;test&amp;&amp;test</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>x b m c living room</phrase>
  </command>
</commandGroup>

If you also want them to behave differently somehow you'll either need to enable/disable groups, or keep track of which server you are talking to using a variable and some logic blocks.

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #6 on: May 03, 2013, 06:36:22 PM »
sweet!

is this principle on a central shared database?
would VC need to load the xml of the particular database if each xbmc carried a separate database?

i know its a kind of redundant question cause its best to have a central database, but just curious.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #7 on: May 03, 2013, 07:11:20 PM »
The action
Code: [Select]
XJson.SetConnection only changes (re-targets if you like) where commands will be sent.  It doesn't do anything else.

If you want to maintain two separate databases it gets much more complicated, and of course will use more resources. Having different media libraries on different XBMCs means you'll need to create separate groups of commands that use separate payloadXML files for all your media, and switch them on and off according to which XBMC you are targeting.  It is not something I would want to do personally, too much trouble to maintain, and too much trouble for the user to remember what media is available where.  But if you want to do it, it is possible.  I do something similar when I switch between listening to music (with MediaMonkey) and watching video (with XBMC).

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #8 on: September 17, 2013, 01:11:07 AM »
Thanks for this xml James. This is a very good topic and ran into this scenario in my head this week... Was wondering how I would achieve this as I was going through it in my head I would have most likely liked to have libraries for eg kids movies and then something else for maybe older people in the house. However I do see you point with regards to it being major upkeeo and drama  ;D

But thanks again for this code

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #9 on: September 28, 2013, 08:28:20 PM »
Hi James, hope you can help. After configuring the xml as you posted I can issue the command XBMC offcie and it says  XJson.SetConnection 192.168.1.240 and similar to when I set XMBC Living room exceprt that is says .239 . Is there any special config I should make in the plugin itself? For some reason when i issue the office command and say eg Volume down it still does this on the .239 XBMC side and not the .240

I have set my pluging to IP .239 and kept the port to 80 on both systems. Also just did a test connection from the plugin on both 239 and 240 both returning success and also made sure the xml was configured properly to the IP and ports with username and passwords.


Thanks James

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #10 on: September 29, 2013, 09:18:03 AM »
I will test to make sure this function is working correctly.  Please upload XML for the group with the commands you are using so I can check it.

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #11 on: September 30, 2013, 02:13:25 AM »
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="XJSON change XBMCs" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="870" name="x b m c office" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.1.240&amp;&amp;80&amp;&amp;xbmc&amp;&amp;xbmc</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>x b m c office</phrase>
  </command>
  <command id="877" name="x b m c living room" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SetConnection</cmdType>
      <cmdString>192.168.1.239&amp;&amp;80&amp;&amp;xbmc&amp;&amp;xbmc</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>x b m c living room</phrase>
  </command>
</commandGroup>

Hi James, I hope this is what you are after. Again not sure if I missed anything in how this is suppose to work but any help is much appreciated. I am using the latest version of VC and my plug in is configured to default to .239 IP (living room)

Thank you very much

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #12 on: September 30, 2013, 10:56:59 AM »
I'm not too sure what is happening, but I just made some changes to the plugin that might help.

Try replacing the dll in your plugins\XJson folder with the attached file.
« Last Edit: September 20, 2014, 03:38:10 PM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling multiple XBMC instances?
« Reply #13 on: September 30, 2013, 01:13:42 PM »

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: Controlling multiple XBMC instances?
« Reply #14 on: September 30, 2013, 05:08:19 PM »
Thanks James that was really very quick! Wow.... I will try this when I get home tonight :)