Announcement

Collapse
No announcement yet.

Multiple Kinects Issue

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

    #16
    Cannot seems to get the remote Kinect working. Getting error message (see below). For a while I was getting an error that was complaining about having two Kinects that were identical. Not sure if error below and identical Kinect are really the same error.



    ERROR System.ObjectDisposedException: Cannot access a disposed object.Object name: 'System.Net.HttpListener'. at System.Net.HttpListener.CheckDisposed() at System.Net.HttpListener.get_Prefixes() at HSPI_KINECT.SnapshotServer.Start(KinectSensor kinectSensor)

    Thank you for your help.

    Comment


      #17
      Originally posted by edstasneyjr View Post
      Cannot seems to get the remote Kinect working. Getting error message (see below). For a while I was getting an error that was complaining about having two Kinects that were identical. Not sure if error below and identical Kinect are really the same error.



      ERROR System.ObjectDisposedException: Cannot access a disposed object.Object name: 'System.Net.HttpListener'. at System.Net.HttpListener.CheckDisposed() at System.Net.HttpListener.get_Prefixes() at HSPI_KINECT.SnapshotServer.Start(KinectSensor kinectSensor)

      Thank you for your help.
      what version of the plugin are you running?

      The error you posted is related to the camera feature. For this feature to work the plugin needs to run with Administrator rights, so to start it remotely you need to start a command prompt as Administrator. If you don't use this feature simply disable it from the camera tab.

      Comment


        #18
        Originally posted by edstasneyjr View Post
        Cannot seems to get the remote Kinect working. Getting error message (see below). For a while I was getting an error that was complaining about having two Kinects that were identical. Not sure if error below and identical Kinect are really the same error.



        ERROR System.ObjectDisposedException: Cannot access a disposed object.Object name: 'System.Net.HttpListener'. at System.Net.HttpListener.CheckDisposed() at System.Net.HttpListener.get_Prefixes() at HSPI_KINECT.SnapshotServer.Start(KinectSensor kinectSensor)

        Thank you for your help.

        As Spud Said that error is related to the Camera and the HS_KINECT.exe not running as Administrator on the remote machine. I have 2 remote kinects running. This is my setup.

        I made a folder on the remote desktop computer named Kinect. Then I make a folder within that folder for each Kinect device I have running on the remote computer. Ex:Kinect1,Kinect2. Each of those folders have the needed files per Spud's install instructions. I then right click on HSPI_Kinect.exe.Then go to Properties,and Compatibility. Then check the Run this program as administrator. Apply and ok. I then create a short cut of the HSPI_Kinect within the same folder and rename it Ex:kinect1. I then right click on the shortcut and put this command within the Target line at the end of HSPI_KINECT and add one space. So like this shown in RED.

        C:\Users\HTPC\Desktop\Kinect\Kinect1\HSPI_KINECT.exe server=YOURIPADDRESS instance=kinect1 autoreconnect=30

        *The above command in the shortcut will bypass the need to open a command line and type each time you want to start the instance. All you have to do is open the shortcut.I also set the shortcut to run minimized so the the command window is at the bottom and not open blocking your view of the desktop.

        If the shortcut is not already checked to run as admin I do that also.
        Each Instance folder should have these files.
        -HomeSeerAPI.dll
        -HSCF.dll
        -HSPI_KINECT.exe (Running as admin)
        -Kinect.Toolbox.dll
        -Scheduler.dll
        -kinect1.ink (shortcut to HSPI_KINECT.exe renamed)

        Once all that is done I test the connections and make sure all works.

        *Important! If you update Homeseer or update the plugin you will have to update all these files in your instance folder.

        Now I go one extra step here because I don't want to have to manually restart the instances each time I restart and log in to my computer.

        In the root Kinect folder I make a .BAT file with these lines.Depending on how many kinects you are running off the same computer.For this example I have 2.

        timeout /t 10 /nobreak
        START "kinect1" "C:\Users\HTPC\Desktop\Kinect\Kinect1\kinect1"
        timeout /t 10 /nobreak
        START "kinect2" "C:\Users\HTPC\Desktop\Kinect\Kinect2\kinect2"


        Next I find the startup folder for windows of the user account that will be logging in and send a shortcut of the .BAT file I just made and set it to open minimized.

        If everything is set correctly when you log in to your computer the .BAT file should execute and timeout for 10 seconds before it starts your first kinect instance.Then it goes to the next line in the .BAT file. It should not get interrupted by a keyboard press and be minimized.

        Hope this helps.

        Comment


          #19
          Thank you for the help!

          So I ran the command with admin rights and now in the log I get:

          Dec-15 8:38:01 PM Warning Attempt by plugin to register a duplicate link of kinectconfig. Plugin: Kinect Instance: LivingRoom



          Also I am running .21

          Comment


            #20
            Originally posted by edstasneyjr View Post
            Thank you for the help!

            So I ran the command with admin rights and now in the log I get:

            Dec-15 8:38:01 PM Warning Attempt by plugin to register a duplicate link of kinectconfig. Plugin: Kinect Instance: LivingRoom

            Also I am running .21
            Make sure all kinect instances have different names.

            Sometimes when you stop an instance the links are not properly unregistered, in this case you can safely ignore this warning.

            Can you actually go to the LivingRoom config page?
            What problem remain if any?

            Comment


              #21
              Right now I can't make it to the livingroom config page. I restarted HS3. I also restarted the script to run the remote session. I think I have duplicate hardware IDs. I am pretty sure you fixed that in revision .09. Here are some more error messages I am getting right now.


              Dec-16 7:20:47 AM Warning Cannot access remote plugin Kinect


              Dec-16 7:29:43 AM Warning Attempt by plugin to register a duplicate link of kinectconfig. Plugin: Kinect Instance: LivingRoom



              DEBUG USB\VID_0409&PID_005A\5&125B1D65&0&4 status=Connected

              Comment


                #22
                Please try to give me more information:
                How many kinect sensors are you trying to use?
                how many are connected to the HS3 machine, and how many are connected to a remote machine?

                please provide full debug logs of what happens when you start each instance

                to restart from scratch try to delete any Kinect*.ini file in the Config folder

                Comment


                  #23
                  I have 2 kinects. 1 is attached directly to HS3 (windows 7) and the other is remote connected to windows home server 2011.

                  I stopped HS3 and then deleted both Kinect*.ini files and then turned back on HS3.

                  If I disable in the HS3 plugin Kinect that is attached to HS3 then I can work on the "LivingRoom" connect but if I try to have them both running I get the error about both kinects running.

                  Also I am running HS3 version 3.0.0.97


                  Dec-16 8:50:05 PM Kinect INFO Kinect initialized Dec-16 8:50:05 PM Kinect ERROR Kinect is already in use in another process. Dec-16 8:50:05 PM Kinect INFO Kinect version 3.0.0.21 Dec-16 8:43:45 PM Kinect DEBUG Building Grammars Dec-16 8:43:40 PM Kinect DEBUG End Init Dec-16 8:43:40 PM Kinect INFO Kinect initialized Dec-16 8:43:40 PM Kinect DEBUG Snapshot server started: http://*:8078/kinectsnapshot/ Dec-16 8:43:39 PM Kinect DEBUG Web Pages Registered Dec-16 8:43:39 PM Kinect DEBUG Visual Recognition Initialized Dec-16 8:43:39 PM Kinect DEBUG Writing image file Kinect/zones_LivingRoom/zones1.jpg Dec-16 8:43:39 PM Kinect DEBUG Deleting image file Kinect/zones_LivingRoom/zones0.jpg Dec-16 8:43:39 PM Kinect DEBUG Drawing Zones File Dec-16 8:43:39 PM Kinect DEBUG Voice Recognition Initialized Dec-16 8:43:39 PM Kinect DEBUG USB\VID_0409&PID_005A\5&30BE9F38&0&4 status=Connected Dec-16 8:43:39 PM Kinect DEBUG Logger Initialized Dec-16 8:43:39 PM Kinect INFO Kinect version 3.0.0.21 Dec-16 8:31:54 PM Kinect DEBUG Snapshot server started: http://*:8078/kinectsnapshot/ Dec-16 8:31:16 PM Kinect DEBUG Building Grammars Dec-16 8:31:16 PM Kinect DEBUG End Init Dec-16 8:31:16 PM Kinect INFO Kinect initialized Dec-16 8:31:16 PM Kinect DEBUG Web Pages Registered Dec-16 8:31:16 PM Kinect DEBUG Visual Recognition Initialized Dec-16 8:31:16 PM Kinect DEBUG Writing image file Kinect/zones_LivingRoom/zones1.jpg Dec-16 8:31:16 PM Kinect DEBUG Deleting image file Kinect/zones_LivingRoom/zones0.jpg Dec-16 8:31:16 PM Kinect DEBUG Drawing Zones File Dec-16 8:31:16 PM Kinect DEBUG Voice Recognition Initialized Dec-16 8:31:16 PM Kinect DEBUG USB\VID_0409&PID_005A\5&125B1D65&0&4 status=Connected Dec-16 8:31:16 PM Kinect INFO Kinect version 3.0.0.21 Dec-16 8:31:16 PM Kinect DEBUG Logger Initialized Dec-16 8:10:48 PM Kinect DEBUG Building Grammars Dec-16 8:10:48 PM Kinect DEBUG End Init Dec-16 8:10:48 PM Kinect INFO Kinect initialized Dec-16 8:10:48 PM Kinect DEBUG Web Pages Registered Dec-16 8:10:48 PM Kinect DEBUG Visual Recognition Initialized Dec-16 8:10:48 PM Kinect DEBUG Writing image file Kinect/zones_LivingRoom/zones1.jpg



                  Sorry I was bouncing the plugin several times testing it to make sure it was not me doing something ignorant.

                  Comment


                    #24
                    I think you may not start the remote instance correctly.
                    To start a remote instance you do not have to do anything from the "PLUG_INS > Manage" page, you just have to enter the following command from the remote machine

                    HSPI_KINECT.exe server=YOURIPADDRESS instance=LivingRoom autoreconnect=30

                    then if everything is ok in the "PLUG_INS > Manage" page, a new instance will show up as "Loaded Remotely". Can you see that?

                    Comment


                      #25
                      "HSPI_KINECT.exe server=192.168.x.x instance=LivingRoom autoreconnect=30


                      Sometimes I change the autoreconnect to something lower/higher than 30.

                      So maybe here is a key to our problem. I don't see the "Loaded Remotely" but I see like it was version x.08 (or older) as it is another instance below.

                      Comment


                        #26
                        what is printed to the console when you run the command on the remote machine? Can it connect to your HS server?

                        Originally posted by edstasneyjr View Post
                        but I see like it was version x.08 (or older) as it is another instance below.
                        I don't understand what you mean here

                        please post screenshots, logs, etc...

                        Comment


                          #27
                          remote console


                          C:\Kinect-Remote>hspi_kinect.exe server=192.168.x.x instance=LivingRoom autoreco
                          nect=30
                          Plugin: Kinect Instance: LivingRoom starting...
                          Connecting to server at 192.168.x.x...
                          Connection attempt #1
                          Connected (HomeSeer API 3). Waiting to be initialized...
                          DEBUG Logger Initialized
                          INFO Kinect version 3.0.0.21
                          DEBUG USB\VID_0409&PID_005A\5&125B1D65&0&4 status=Connected
                          DEBUG Voice Recognition Initialized
                          DEBUG Drawing Zones File
                          DEBUG Deleting image file Kinect/zones_LivingRoom/zones0.jpg
                          DEBUG Writing image file Kinect/zones_LivingRoom/zones1.jpg
                          DEBUG Visual Recognition Initialized
                          DEBUG Web Pages Registered
                          DEBUG Snapshot server started: http://*:8078/kinectsnapshot/
                          INFO Kinect initialized
                          DEBUG End Init
                          DEBUG Building Grammars

                          Comment


                            #28
                            This is the Plugins page.

                            Click image for larger version

Name:	KinectLivingRoom.jpg
Views:	1
Size:	38.2 KB
ID:	1175572

                            Comment


                              #29
                              as I said you don't have to create and start a LivingRoom instance from the manage page. Because of that you actually have 3 instances running: 2 on your HS machine and 1 on your remote machine, and 2 of them have the same name.

                              So, stop both instances from the manage page and stop your remote instance as well. Delete the LivingRoom instance from the manage page. Then restart your remote instance, i.e from command line on your remote machine. You should see something like on the screenshot below (my screenshot shows the Autelis plugin running remotely but it should be the same with the Kinect plugin)
                              Then you can start your local instance. It seems like HS3 does not display remote instances when you have 1 local and 1 remote, but except for that it should work.

                              Click image for larger version

Name:	Autelis.jpg
Views:	1
Size:	81.8 KB
ID:	1175573

                              Comment


                                #30
                                Do you know if the remote instance can be run on windows home server 2011?

                                Comment

                                Working...
                                X