Announcement

Collapse
No announcement yet.

New Feature - Take Picutre

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

  • New Feature - Take Picutre

    Receive the following error when I try to run the event.


    Jul-02 2:41:52 PM Kinect DEBUG at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at HSPI_KINECT.ImageExtensions.SaveJpeg(Image img, String filePath, Int64 quality) at HSPI_KINECT.KinectApp.TakePicture(String filePath)


    Jul-02 2:41:52 PM Kinect ERROR A generic error occurred in GDI+.

  • #2
    Make sure to put the entire path including file name: C:\Kinect\picture.jpg
    Bryan
    Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
    Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

    Comment


    • #3
      yep, That's it

      Comment


      • #4
        I'm also having a problem with this feature. I set the full file path including name, and made a test event to test. However when I run it I get the following error in the log:
        HTML Code:
        Jul-03 9:45:24 AM	  	 Kinect	 ERROR Object reference not set to an instance of an object.
        Any thoughts?

        Comment


        • #5
          What is your path? Maybe it needs quotes.

          Comment


          • #6
            Originally posted by Mad leal View Post
            What is your path? Maybe it needs quotes.
            I have it set to C:\Security\intrusion.jpg
            I can try quotes if you think that'd help?

            EDIT: Tried quotes, same error.

            Comment


            • #7
              Maybe it doesn't have permission to write to that directory?

              Comment


              • #8
                I have Homeseer running as an administrative user on the box, and checking the directory permissions shows read/write access for admins, so it should in theory be able to write to it. I'm almost wondering if my kinect is having an issue with its camera?

                Comment


                • #9
                  set the log level to debug and paste the entire log please

                  Comment


                  • #10
                    Here's the log from the start to finish of the event:
                    Code:
                    Jul-03 10:04:07 AM	  	 Kinect	 DEBUG at HSPI_KINECT.KinectApp.TakePicture(String filePath)
                    Jul-03 10:04:07 AM	  	 Kinect	 ERROR Object reference not set to an instance of an object.
                    Jul-03 10:04:07 AM	  	 Event	 Event Trigger "Test test1"
                    Jul-03 10:04:07 AM	  	 Event	 Event Test test1 triggered by the event page 'Run' button.

                    Comment


                    • #11
                      Rebooted my server and watched the log at startup, looks like I missed a warning about it being unable to find a device. When I checked device manager using the hardware ID it listed, sure enough, that is the ID for the kinect camera. I'm thinking the Kinect might need to have a power cycle; I'm at work at the moment working on it remotely, so I'll have to wait until I get home later to powercycle it. Will update once I try that.
                      Thanks for your help all!

                      Comment


                      • #12
                        I tried power cycling the Kinect, and rebooting the server, but now it looks like nothing is working on the kinect, including voice commands. Going to try reverting to the version I was previously on and seeing if voice commands come back.

                        Edit: Going back to version 3.0.0.9, voice commands and camera/motion detection appear to be working again. When I go to version 3.0.0.14, the log always shows the following error, and none of the Kinect features work:

                        Jul-04 11:22:01 AM Kinect WARNING Can't find Kinect: USB\VID_045E&PID_02AE\0000000000000000

                        When I go into manage plugins, delete the kinect plugin, then install version 3.0.0.9 from the updater and start the plugin, it immediately works (no need for reboot or power cycling the kinect)

                        EDIT: So I dug deeper into that error. In the debug log it was showing my kinect under a different ID, as though it saw it, but gave it a different ID. I tried to change this on the plugin config but it didn't list any other device to select. So, I deleted my Kinect.ini and restarted the plugin, then reconfigured everything from scratch. Now everything is working correctly.
                        Last edited by nikku; July 4th, 2014, 10:16 AM.

                        Comment


                        • #13
                          in kinect.ini delete the kinect_sensor_id line, then restart the plugin

                          it should fix your problem

                          Comment


                          • #14
                            How to save pictures without overwritting the previous one

                            Hi,

                            I am able to take a picture with the Kinect, however every new picture overwrites the previous one.

                            Is there a way to save the new pictures with a new file name?

                            Thanks
                            Chris

                            Comment


                            • #15
                              Originally posted by clafa View Post
                              Hi,

                              I am able to take a picture with the Kinect, however every new picture overwrites the previous one.

                              Is there a way to save the new pictures with a new file name?

                              Thanks
                              Chris
                              right now the picture is always written to the same path, but you could have a script to rename the previous picture before taking a new one.

                              or alternatively I could add the possibility to use a specific character in the filename so that it is automatically incremented each time

                              something like path = C:\picture%i.jpg
                              and then the picture would be written to:
                              C:\picture1.jpg
                              C:\picture2.jpg
                              C:\picture3.jpg
                              etc...

                              Comment

                              Working...
                              X