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

The first release went live the is morning and there is now the first update available at:


Should hopefully fix a few bugs that have been discovered with the help of @Rocodamelshekima

3 Likes

Can you try the \test version linked above to see if that works?

Adrian. Version 005 installed. After 8 sec same error: no camera found. My Hdminicampro app has lost the camera also. I have removed the app 005 and installed it again on homey and restart the camera and after that my Hdminicampro app functioned again but the 005 version on homey did not find the camera after 8 sec. of searching the error: no camera found again. the Hdmincampro keeps working.

I have a crash dump from around 16:56 so not sure if that came from you (no identification is included with them).
That shows an invalid response from a camera couldn’t be handled by the ONVIF lib. Unfortunately it doesn’t show what the response was but I can see where better error handling is required so it doesn’t crash the app.
I will also add a log page like I have in my other apps so more diagnostic information can be gathered.
Watch this space for updates :wink:

Hello Adrian,
perhaps this was mine, 17:56 german summer time. Perhaps this ist the reason for the 1 hour difference.
I tried to search for cameras (HiKam S6 and Lutec lamp with camera).
The app doesn’t find a camera. It shows a timeout message.
Would it be possible to create a device with settings (IP, Port or URL) if the search doesn’t work?
I’ll wait for the new test version with some log information. Perhaps I can find the reason why search is not successful.
Thanks for this app. I would like to use it, because Athom added some checks for virtual cameras that prevents adding a valid URL (error message EHOSTUNREACH in Homey-app, but in Browser it’s ok).

I have posted a new test version 0.0.6.
This adds a log page to the Configure app in the Apps section of Homey. If you have issues then go to that screen and enable the logging. Then repeat the troublesome task, e.g. pairing, and when finished return to the log screen to view the diagnostics message. If you could send then to me by PM or create an issue on GitHub (link is in the app store by clicking on Report an issue) then I can try to improve the app.
To copy the log on Android you can long press on the log text until the menu pops up and then touch ‘Select All’ followed by ‘Copy’. After that you can paste the text into the target view.

I have also added extra error traps to the ONVIF library so hopefully the previous crashes will not happen.

The only problem is if the discovery fails then the forced connection will probably fail. Discovery is a mandatory feature of ONVIF, so provided the camera is ONVIF compliant then it ‘should’ work. As this is the first release there are possibly issues with my code at the moment. I only have H.View cameras and an unbranded camera in a bird box to test with, which are working fine.
The problem I can foresee is coping with the various revisions of the ONVIF protocol so that may take some help from users to get established.

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).