[APP][Pro] Support for ONVIF compatible cameras (Release 2.0.41)

Hello Adrian,
thanks for your answer. I tried again and got an app crash. I sent a debug report:
04044252-2d90-4a2e-8bed-10f6d347815f
I hope that could help to find the reason.
Please write, if I can help with tests.
Ronny

Adrian, I tested 006. (log enabled) camera search after 8 sec. error no camera found. in the log the message: App Started * Discoverd: square.

The dump says it is from version 0.0.5. Could you update to the 0.0.6 version and try as that has the extra error traps and logs.
Thanks for your patience.

I guess that’s an improvement as it didn’t crash the app :wink:
I must admit the log data is not so helpful though.
I will look again to see if I can get some more useful data.

Great. I will keep my fingers crossed :+1:

Where you have typed square, could tha have been [] as in an open [ followed by a closed ] square bracket pair?
If so then it is just an empty list of devices rather than an unprintable message.

Hi, with version 0.0.6 the camera was added. Thanks for the fix. I will do some tests this evening.
Btw…could it be possible to add non-Onvif cameras with rtsp-URL?
I don’t know your app in detail, if it’s extracting the snapshot from rtsp stream or if the camera hast to provide a snapshot via Onvif. So if it’s done from the stream, support for rtsp cameras would be very cool.

I think you’re right [ ]
as always :grinning:

Perhaps a dumb question…where can I see the snapshot. I can’t see it in the device and can’t get in flows like virtual camera images. Does it mean the camera doen’t support snapshots over Onvif?

OK, so I need to find a way to add more messages to the log to help locate why it is not finding any cameras.
I will dig deeper in to the ONVIF library.

The snap shots should appear in the device as well as being tags in the flows.


In the device the text that shows Motion Event in the image is a drop list where you can also select Now for the ‘Live’ image.
The actual snap shot comes from a URL that is provided during the discovery process.
Maybe you could switch on logging and then restart the app as it should then display the URL it will use.

After activating motion event and app restart I could see the image screen without image.

Here is the log.

  • “RuleEngine/CellMotionDetector/Motion”
  • Event IsMotion = true
  • ------ Event detected ------
  • {
    “topic”: {
    “_”: “tns1:RuleEngine/CellMotionDetector/Motion”,
    ": { "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet" } }, "message": { "message": { "”: {
    “UtcTime”: “2020-04-20T14:30:30.000Z”,
    “PropertyOperation”: “Changed”
    },
    “source”: {
    “simpleItem”: [
    {
    ": { "Name": "VideoSourceConfigurationToken", "Value": "VideoSourceToken" } }, { "”: {
    “Name”: “VideoAnalyticsConfigurationToken”,
    “Value”: “000”
    }
    },
    {
    ": { "Name": "Rule", "Value": "000" } } ] }, "data": { "simpleItem": { "”: {
    “Name”: “IsMotion”,
    “Value”: true
    }
    }
    }
    }
    }
    }
  • “RuleEngine/CellMotionDetector/Motion”
  • Event IsMotion = true
  • Syncing time
  • ------ Event detected ------
  • {
    “topic”: {
    “_”: “tns1:RuleEngine/CellMotionDetector/Motion”,
    ": { "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet" } }, "message": { "message": { "”: {
    “UtcTime”: “2020-04-20T12:30:40.000Z”,
    “PropertyOperation”: “Changed”
    },
    “source”: {
    “simpleItem”: [
    {
    ": { "Name": "VideoSourceConfigurationToken", "Value": "VideoSourceToken" } }, { "”: {
    “Name”: “VideoAnalyticsConfigurationToken”,
    “Value”: “000”
    }
    },
    {
    ": { "Name": "Rule", "Value": "000" } } ] }, "data": { "simpleItem": { "”: {
    “Name”: “IsMotion”,
    “Value”: true
    }
    }
    }
    }
    }
    }
  • “RuleEngine/CellMotionDetector/Motion”
  • Event IsMotion = true

I can’t see a URL. In the device I got a this:

or this with the moving circle

So the good news is motion is being detected.
I think, with the motion on, it is overflowing the log as I have to limit the size so it doesn’t use too much of Homey’s memory.
Can you make sure the log is enabled, then restart the app and go straight back to the log view and switch the log off. You should see the URL information as part of the device start up logging. So i get:

App Started* Dev Data: {
“id”: “192.168.1.204”,
“port”: “80”
}

(I have removed the password hash, but note you don’t see your actual password, just an ‘encrypted’ version of it).

I got it now…

App Started* Dev Data: {
“id”: “192.168.1.150”,
“port”: “8090”
}


  • Connect to Camera
  • CONNECTED
  • SnapShot URL = http://192.168.1.150:8090/onvif/snapshot
  • SnapShot save file = eventimage192_168_1_150.jpg
  • Waiting for events
  • register
  • ------ Event detected ------
  • {
    “topic”: {
    “_”: “tns1:RuleEngine/CellMotionDetector/Motion”,
    ": { "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet" } }, "message": { "message": { "”: {
    “UtcTime”: “2020-04-21T01:48:57.000Z”,
    “PropertyOperation”: “Changed”
    },
    “source”: {
    “simpleItem”: [
    {
    ": { "Name": "VideoSourceConfigurationToken", "Value": "VideoSourceToken" } }, { "”: {
    “Name”: “VideoAnalyticsConfigurationToken”,
    “Value”: “000”
    }
    },
    {
    ": { "Name": "Rule", "Value": "000" } } ] }, "data": { "simpleItem": { "”: {
    “Name”: “IsMotion”,
    “Value”: true
    }
    }
    }
    }
    }
    }
  • “RuleEngine/CellMotionDetector/Motion”
  • Event IsMotion = true

The URL is without user/PW. In device settings user/PW is sset. Any ideas what I could try?
Thanks in advance.

Thank you for the information. I will investigate why it doesn’t have the login details.
Which camera is that (you mentioned two different cameras earlier)?
Does the other camera get detected at all?

Hi Adrian,

it’s a HiKam S6, but I think it doen’s support snapshots via http. It only seems to support rtsp-streams.

Do you read the picture from the rtsp-stream or from a http-jpeg-url?

The other cam is a Lutec lamp. It doesn’t support ONVIF. It’s not found in the app.
It’s only possible to show a rtsp stream and a jpeg snapshot on port 80.

So I think my cameras are not full compatible. If you have further ideas, please write. I will test :slight_smile:

Could you ask HiKam if it is possible to obtain a snapshot image from the camera?

I can’t see any mention of it in their FAQ section so maybe not, but it seems strange that it returns a URL to the ONVIF query (that information in the log is retrieved from the camera, it is not something I add).

Do you have security enabled on the camera?

Yes, security is enabled for rtsp (user/pw).
I asked HiKam some months ago about support of http-snapshots. They put in promising it could be added in a new firmware version. But there was no update.
So just don’t invest much work on this problem. Thank you for your help. I have to ask HiKam again…

OK, you are welcome. I hope they add it soon for you.

Hi Adrian,

The hikvision camera’s working perfect except the EBell ATZ-DBV01P 433 MHzdoorbell works not perfect (it has also the onvif protocol) Your app see’s the camera in the network but when i install the camera i got the message “Socket hang up”