ONVIF not detect services of china IPCAM RS7507H

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
proasnet
Posts: 4
Joined: Thu Nov 19, 2020 7:10 am
Location: Slovakia

ONVIF not detect services of china IPCAM RS7507H

Post by proasnet »

Hi all, I am beginner with Zoneminder. I have installed it in Ubuntu 20.04 LTS virtual machine on Synology NAS. Zoneminder is working now, but if I try add a camera by ONVIF probe, zm find it, I am input login informations but on the next page I can not choose services.
This cameras was found by another softwares, on iSpy agent not problem, but I want use a ZM.
Cameras are RS7507H based on Hi3507 chip (chinesse)..
Please, is anybody for help me?
Thank you.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ONVIF not detect services of china IPCAM RS7507H

Post by iconnor »

I would probably need access to one of these cameras to figure it out.

However lets try:

Start by using a command line

sudo zmonvif-probe.pl -v probe

paste the output here.


You should a list of devices, something like:
http://192.168.1.243/onvif/device_service, 1.1, (location/country='china', name='General', hardware='ASH21-B', Profile='Streaming', type='Network_Video_Transmitter', extension/unique_identifier='1')

Then do
sudo zmonvif-probe.pl -v profiles http://192.168.1.243/onvif/device_service 1.1 username password

substituting 1.1 or 1.2 depending on what is listed. 1.2 is newer/better.

paste the output here.
proasnet
Posts: 4
Joined: Thu Nov 19, 2020 7:10 am
Location: Slovakia

Re: ONVIF not detect services of china IPCAM RS7507H

Post by proasnet »

Thank you for interesting. Here is codes:

Code: Select all

administrator@nvr:~$ sudo zmonvif-probe.pl -v probe
[sudo] heslo pro administrator: 
Probing for SOAP 1.1
<Probe xmlns="http://schemas.xmlsoap.org/ws/2005/04/discovery"><Types xmlns="">dn:NetworkVideoTransmitter</Types></Probe>
Received message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:dndl="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:dnrd="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:5db32d33-546e-40b9-9408-816979656f63</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><d:Probe><d:Types>dn:NetworkVideoTransmitter</d:Types></d:Probe></SOAP-ENV:Body></SOAP-ENV:Envelope>
Probing for SOAP 1.2
<Probe xmlns="http://schemas.xmlsoap.org/ws/2005/04/discovery"><Types xmlns="">dn:NetworkVideoTransmitter</Types></Probe>
Received message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:x0018="http://tempuri.org/x0018.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ns1="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:dndl="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:dnrd="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:ns3="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns10="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:ns11="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:ns12="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:ns5="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:ns6="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:ns7="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:ns8="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:ns9="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:urn:uuid:1ed0-4a4a-b868-b0006b15229e</wsa:MessageID><wsa:RelatesTo>urn:uuid:80f1865c-c729-47f7-a3aa-1bcd3d11f47e</wsa:RelatesTo><wsa:To SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><d:ProbeMatches><d:ProbeMatch><wsa:EndpointReference><wsa:Address>urn:Hi3507-RS7507-ea00a8c0</wsa:Address></wsa:EndpointReference><d:Types>dn:NetworkVideoTransmitter</d:Types><d:Scopes>onvif://www.onvif.org/location/country/china onvif://www.onvif.org/hardware/RS7507 onvif://www.onvif.org/name/Hi3507 onvif://www.onvif.org/type/video_encoder onvif://www.onvif.org/type/audio_encoder </d:Scopes><d:XAddrs>http://192.168.0.234/onvif/device_service</d:XAddrs><d:MetadataVersion>1</d:MetadataVersion></d:ProbeMatch></d:ProbeMatches></SOAP-ENV:Body></SOAP-ENV:Envelope>

l_xaddr = http://192.168.0.234/onvif/device_service
http://192.168.0.234/onvif/device_service, 1.2, (location/country='china', hardware='RS7507', name='Hi3507', type='video_encoder', type='audio_encoder')
Received message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:dndl="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:dnrd="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:9c60a899-957b-4d8b-bc89-fb21eae8e86a</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><d:Probe><d:Types>dn:NetworkVideoTransmitter</d:Types></d:Probe></SOAP-ENV:Body></SOAP-ENV:Envelope>

Code: Select all

administrator@nvr:~$ sudo zmonvif-probe.pl -v profiles http://192.168.0.234/onvif/device_service 1.2 admin admin
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/ONVIF/Client.pm line 120.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ONVIF not detect services of china IPCAM RS7507H

Post by iconnor »

Edit /usr/share/perl5/ONVIF/Client.pm

Replace the block of code around line 120 with the following

Code: Select all

  if ( $result ) {
    my $services = $result->get_Service();
    if ( $services ) {
      foreach my $svc ( @{ $services } ) {
        my $short_name = $namespace_map{$svc->get_Namespace()};
        my $url_svc = $svc->get_XAddr()->get_value();
        if ( defined $short_name && defined $url_svc ) {
          #print "Got $short_name service\n";
          $self->set_service($short_name, 'url', $url_svc);
        }
      }
    }
    #} else {
    #print "No results from GetServices: $result\n";
  }
proasnet
Posts: 4
Joined: Thu Nov 19, 2020 7:10 am
Location: Slovakia

Re: ONVIF not detect services of china IPCAM RS7507H

Post by proasnet »

Thank you for help. Today, I tried edit fileClient.pm, but nothing...
Still I have not a choice for profle.
And, today I found a second problem. I add a second network adapter for zoneminder server. This adapter I am using for isolated network only for cameras.
An IP adresses is as private range 10.0.1.x where 10.0.1.253 is zoneminder server. The first adapter has 192.168.0.253 in home network.
Cameras in the isolated network aren´t found by ONVIF probe. Only cameras on the first network is possible probing. All without profiles.
I thing that is possible use only one adapter for zoneminder and one network for web of ZM and for cameras

Code: Select all

l_xaddr = http://192.168.0.231/onvif/device_service
http://192.168.0.231/onvif/device_service, 1.2, (location/country='china', hardware='RS7507H', name='Hi3507', type='video_encoder', type='audio_encoder')
Received message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:dndl="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:dnrd="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:3f500e1b-f5d8-46bd-96c7-ce7a1f00b1e5</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><d:Probe><d:Types>dn:NetworkVideoTransmitter</d:Types></d:Probe></SOAP-ENV:Body></SOAP-ENV:Envelope>

Code: Select all

administrator@nvr:~$ sudo zmonvif-probe.pl -v profiles http://192.168.0.231/onvif/device_service 1.2 admin admin
No results from GetCapabilities: <Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP-ENV:Server</faultcode><faultstring>Error deserializing message: Bad top node HTML at /usr/share/perl5/ONVIF/Deserializer/MessageParser.pm line 89.
 at line 1 at /usr/share/perl5/SOAP/WSDL/Expat/Base.pm line 82.
. 
Message was: 
&lt;HTML&gt;
&lt;HEAD&gt;&lt;TITLE&gt;404 Not Found&lt;/TITLE&gt;&lt;/HEAD&gt;
&lt;BODY BGCOLOR=&quot;#cc9999&quot; TEXT=&quot;#000000&quot; LINK=&quot;#2020ff&quot; VLINK=&quot;#4040cc&quot;&gt;
&lt;H4&gt;404 Not Found&lt;/H4&gt;
File not found.
&lt;HR&gt;
&lt;ADDRESS&gt;&lt;A HREF=&quot;&quot;  target=&quot;_new&quot;&gt;&lt;/A&gt;&lt;/ADDRESS&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</faultstring><faultactor>urn:localhost</faultactor></Fault>
No media endpoint for client.
proasnet
Posts: 4
Joined: Thu Nov 19, 2020 7:10 am
Location: Slovakia

Re: ONVIF not detect services of china IPCAM RS7507H

Post by proasnet »

Problems are not solved. ONVIF for china cameras not working.
ZM find cameras only on the first network adapter for server manage with internet, but not possible choose any services. On the separated network only for cameras without internet on the second adapter of server cameras working only on RTSP protocol, but ONVIF can not find any camera. Now, I have not any idea :(
Is here somebody with working ONVIF with RS7507H cameras?
Thank you
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ONVIF not detect services of china IPCAM RS7507H

Post by iconnor »

You will need to run master branch to do ONVIF on a second network card.
Post Reply