Announcement

Collapse
No announcement yet.

Using Multiple Kinects with events/global variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using Multiple Kinects with events/global variables

    Spud,

    Wanted to know how you handle the different instances (multiple kinects) using events.

    I have installed 2 kinects, 1 on HS computer and 1 on remote.

    This creates 2 instance and 2 global variable pools. I am setting up events for "A Phrase Was Recognized" and have to choose which kinect to run event. I am scripting all the actions using global variables so I dont have to have a ton of events (IE.. Turn <Office|Dining|Pool|Spa|Kitchen> Lights <On|Off>. Which means I have to use the correct global variable for that instance. (kinectofficevar0 or kinectvar0)

    So my quesition is what is the best way to handle multipl kinects without having to create an event for each kinect to run the same event?

    I am new to HS and still tring to get my feet wet, but this is a great plugin, works 10X better than HS Speak for voice recognition, I look forward to all the cool things I can do now. Also I use your DirecTV plugin - keep up the great work and let me know anytime you need a tester for products as I can code/create scripts and push the plugins to help find issues

    Thanks,
    Steven G

    #2
    Thanks for the kind words!

    If you want multiple kinects to recognize the same phrase you can't avoid duplicating the triggers, but you can do it inside the same event. So for the trigger part of the event you would have something like:
    Code:
    IF Kinect Trigger
        Trigger Type = A phrase was recognized
        Phrase =  Turn <Office|Dining|Pool|Spa|Kitchen> Lights <On|Off>
    
    OR IF Kinect Trigger - Office
        Trigger Type = A phrase was recognized
        Phrase =  Turn <Office|Dining|Pool|Spa|Kitchen> Lights <On|Off>
    For the action part of the event, inside your script you have to test both global var instances as well:

    Code:
    If KinectVar0 = "Pool" Or KinectOfficeVar0 = "Pool" Then
    If you want I could add a setting that would make all instances write to the same global vars (KinectVar0, KinectVar1, ect) instead of using some instance specific variables.?

    Comment


      #3
      Spud,

      If you want I could add a setting that would make all instances write to the same global vars (KinectVar0, KinectVar1, ect) instead of using some instance specific variables.?
      This would be a great option and would eliminate the need for all the extra code. I doubt commands will be giving at the exact same time to confuse the system, but I will try and see if it breaks anything. (prob just cause an error in the command and wont close the serial port or turn on/off the wrong light lol)

      I forgot about the If/Or in the triggers, thats a great ideal combined with same global vars my code is complete

      I am adding 2 more remote kinects so this will help alot with scripts.

      Thanks again for your help.
      Steven G

      Comment


        #4
        in version 3.0.0.8 available here,
        I have added a setting to let you choose if you want to use global vars names specific to instance.

        Click image for larger version

Name:	globalvars.jpg
Views:	1
Size:	57.8 KB
ID:	1171950


        Comment


          #5
          Spud,

          I am 2 for 2 today on issues

          Dont see it in new version

          Attached Files

          Comment


            #6
            this setting doesn't show for the main instance (the one without a name) as it doesn't make any sense in this case.

            but it should show for your Office instance.
            to go to the config page for this instance use the menu PLUG-INS > Kinect > Config - Office, do NOT use the direct link on the manage page, there is a HS3 bug that makes this link always go to the config page for the first instance.

            Comment


              #7
              Spud,

              I restarted HS and now it shows up for Office (does not show up for main, but its not suppose to right?)

              thanks for quick help

              Now if we can get multiple instance working I think we are set.

              By the way I have been testing the heck out of this plugin and I will post some things I found later, but so far this is an awesome product.

              Hey whats the new Grammars section for?

              Thanks,
              Steven G
              Last edited by steveng; April 2, 2014, 03:28 PM. Reason: added

              Comment


                #8
                Originally posted by steveng View Post
                Hey whats the new Grammars section for?
                It lets you define sub grammars that are loaded temporarily.
                For example you could define a grammar to control your media player. Then you could create an event to load this grammar when you say "Computer, enter media player mode", then you could define some specific events associated with this grammar to navigate the GUI of your media player with commands like: "Left", "Right", "select", without having to say "Computer, left", "computer, right", "computer, select" etc...

                I will post a detailed user guide for this feature later.

                Comment


                  #9
                  Spud,

                  Is there a user guide yet for the sub grammar I am working diligently to get the kinect stuff setup and would like to create sub grammar to work with XBMC and your plug in

                  Cheers Ken
                  HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

                  Comment


                    #10
                    Kenrad - he created a new thread for sub grammar guide
                    http://board.homeseer.com/showthread.php?t=167275

                    Comment

                    Working...
                    X