Git Product home page Git Product logo

onvif's People

Contributors

cycne avatar rockyjvec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

onvif's Issues

The action requested requires authorization and the sender is not authorized

Hello, I try to use inside Laravel project and always return this message.
The camera is a PTZ Hikvision and works fine with PYTHON ONVIF R resource

$o = new \Rockyjvec\Onvif\Onvif("http://".$session->camera->host.":".$session->camera->port."/onvif/device_service", $session->camera->onvif_user, $session->camera->onvif_pass);            

print_r($o->media->GetProfiles());

Output

{
    "status": "error",
    "code": 500,
    "time": 1642591673,
    "data": {
        "line": 61,
        "file": "...../vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php",
        "message": "The action requested requires authorization and the sender is not authorized",
        "type": "Exception"
    }
}

Thanks!

bad line Onvif.php

Line 59. Please comment
// $class = "Rockyjvec\Onvif\Onvif\Extension\" . $name;

Must be
$class = "Rockyjvec\Onvif\Service\Extension\" . $name;

Unable to get stream uri because of soap validation constraint violation

On a PTZ camera, I can get Presets, send presets etc, but I didn't manage to get the stream URI unfortunately, despite spending hours tinkering with the library and checking the ONVIF specs...

Here is how I ask for streams :

$o = new Rockyjvec\Onvif\Onvif("http://192.168.1.47:81/onvif/device_service", "admin", "password");
$o->media->GetProfiles();

$params = [
			'StreamSetup'=>
				[	
					'Stream'=>'RTP-Unicast',
					'Transport'=>
						[
							'Protocol'=>'RTSP'
						]
				],
				'ProfileToken' => 'profile_cam1_stream1'
		  ];
		  
print_r($o->media->GetStreamUri($params));

And here is the output :

PHP Fatal error: Uncaught SoapFault exception: [s:Client] Validation constraint violation: empty value provided where a value is required in element 'SOAP-ENC:Struct' in /home/nicolas/Projets/onphp/vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php:75

If someone passes by and succesfully cot their camera stream uri :) any help is welcome.

Problem calling WSDL defined functions

Hi,
I'm trying to use your lib and it work for basic data collection but each time I try to call a function, I receive this error.

$o = new Rockyjvec\Onvif\Onvif($SrvURI, $user, $password);
//var_dump($o);

$event = $o->events;
//var_dump($o->media);
$f=$o->media->GetProfiles();

==>>
( ! ) Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] in C:\wamp64\www\ONVIF2\vendor\rockyjvec\onvif\src\Rockyjvec\Onvif\Soap\SoapClient.php on line 61
( ! ) SoapFault: in C:\wamp64\www\ONVIF2\vendor\rockyjvec\onvif\src\Rockyjvec\Onvif\Soap\SoapClient.php on line 61
Call Stack

Time Memory Function Location

1 0.0044 362120 {main}( ) ...\index.php:0
2 0.1364 404560 Rockyjvec\Onvif\Soap\SoapClient->GetProfiles( ) ...\index.php:8
3 0.1364 404560 Rockyjvec\Onvif\Soap\SoapClient->__call( $method = 'GetProfiles', $args = [] ) ...\index.php:8
4 0.1366 414112 __call( $name = 'GetProfiles', $args = [] ) ...\SoapClient.php:61

As you can see, I'm working on Windows with PHP 8.0.26

Any idea ?
Thanks

I'm missing things

Good library but i'm missing things. I'm looking for ways to control the camera trough PTZ and also retrieve a snapshot of the camera or live video.

I want to help i i can but i don't know how since i've almost never done anything with soap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.