Announcement

Collapse
No announcement yet.

NetCAM plugin: how to authenticate to a camera to capture snapshot using POST

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

  • NetCAM plugin: how to authenticate to a camera to capture snapshot using POST

    i have a few dahua cameras with newer fw and they don't support the username/pswd as part of the url via a GET

    the username/pswd needs to be "POST"ed

    any ideas of how to do this?
    Mark

    HS3 Pro 3.0.0.435
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
    Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

  • #2
    Originally posted by mnsandler View Post
    i have a few dahua cameras with newer fw and they don't support the username/pswd as part of the url via a GET

    the username/pswd needs to be "POST"ed

    any ideas of how to do this?
    this is the only way i have seen it done.

    PHP Code:
    http://username:password@192.168.1.167/ 
    did you ever work it out?
    HS3 Pro on Windows 8 64bit
    53 Z-wave nodes(46 devices, 7 remotes), 15 DS10a's, 10 ms16a's, 9 Oregon Sensors, W800, RFXCOMtrx433, Way2Call, 3 HSTouch Clients, 2xRussound CAS44, Global Cache GC100-12,10 Rollertrol blinds(+ zwave) ,3 Squeezebox Radios and 1 Squeezebox Boom,DMX Arduino via ethernet,Rain8Net,3x Echo Dot's


    Check out my electronics blog here:
    https://www.facebook.com/RaptorsIrrationalInventions

    Comment


    • #3
      Originally posted by Raptor View Post
      this is the only way i have seen it done.

      PHP Code:
      http://username:password@192.168.1.167/ 
      did you ever work it out?
      Your method works when using Chrome, but not IE. It also does not work with HS3...i get an error. My guess is HS3 uses the IE class to do this.

      Posting back to plugin web page NetCam_View: Object reference not set to an instance of an object.-> at System.Runtime.Remoting.Messaging.LogicalCallContext.Propaga teIncomingHeadersToCallContext(IMessage msg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.PostBackProc(String page, String data, String user, Int32 userRights) at Scheduler.proxyPage.postBackProc(StateObject& state, String Data)
      Mark

      HS3 Pro 3.0.0.435
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
      Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

      Comment


      • #4
        so i found the following registry tweak that allows the above url to work some of the time!

        FEATURE_HTTP_USERNAME_PASSWORD_DISABLE (google to see how to implement)

        there are two locations: 1 for 32 bit IE, and a second for the 64 bit IE

        Note: i haven't gotten this to work on Server 2012 which is where HS3 is installed.
        Last edited by mnsandler; April 18th, 2016, 05:07 PM. Reason: add Note
        Mark

        HS3 Pro 3.0.0.435
        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
        Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

        Comment


        • #5
          http://username:password@192.168.1.2.../snapshot.cgi?

          Apr-19 9:51:20 AM Error Getting web page from plugin page NetCam_Config:Object reference not set to an instance of an object.
          Apr-19 9:51:15 AM Warning Plugin NetCAM is not responding but it is still running, not restarting yet.
          Apr-19 9:51:11 AM Error Posting back to plugin web page NetCam_View: Object reference not set to an instance of an object.-> at System.Runtime.Remoting.Messaging.LogicalCallContext.Propaga teIncomingHeadersToCallContext(IMessage msg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.PostBackProc(String page, String data, String user, Int32 userRights) at Scheduler.proxyPage.postBackProc(StateObject& state, String Data)
          Mark
          Mark

          HS3 Pro 3.0.0.435
          Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
          Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
          Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

          Comment


          • #6
            i ended up installing blue iris then using its webserver to let homeseer access it.
            HS3 Pro on Windows 8 64bit
            53 Z-wave nodes(46 devices, 7 remotes), 15 DS10a's, 10 ms16a's, 9 Oregon Sensors, W800, RFXCOMtrx433, Way2Call, 3 HSTouch Clients, 2xRussound CAS44, Global Cache GC100-12,10 Rollertrol blinds(+ zwave) ,3 Squeezebox Radios and 1 Squeezebox Boom,DMX Arduino via ethernet,Rain8Net,3x Echo Dot's


            Check out my electronics blog here:
            https://www.facebook.com/RaptorsIrrationalInventions

            Comment


            • #7
              Originally posted by Raptor View Post
              i ended up installing blue iris then using its webserver to let homeseer access it.
              thanks.

              i considered blue iris but decided on Synology Survellience Station. i wanted to avoid the additional load on my server. i did figure out my snapshot issue with the Dahua cameras with the latest firmware v2.4x.

              Code:
              http://192.168.1.22/onvifsnapshot/media_service/snapshot?channel=1&subtype=0
              there is no authentication required but my cameras are not exposed to the internet so no worries
              Mark

              HS3 Pro 3.0.0.435
              Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
              Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
              Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

              Comment

              Working...
              X