[ST Edge] ONVIF-compliant IP Camera Motion Detection & Video Streaming - Testers Wanted!


I can re-add both cameras again

Driver can’t find cameras again. I’ll try to reboot

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell Install PowerShell on Windows, Linux, and macOS - PowerShell | Microsoft Docs

PS C:\dev\edgedrivers> smartthings edge:drivers:logcat 1d68e5c3-03c0-4229-985d-14e225550049 --hub-address 192.168.1.100
connecting… connected
2022-05-15T01:16:45.800880953+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with lifecycle handlers:
DeviceLifecycleDispatcher: onvifDriver
default_handlers:
driverSwitched:
infoChanged:
doConfigure:
init:
removed:
added:
deleted:
child_dispatchers:

2022-05-15T01:16:45.805913411+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with Capability handlers:
CapabilityCommandDispatcher: onvifDriver
default_handlers:
videoStream:
startStream
stopStream
partyvoice23922.motionevents:
setSwitch
partyvoice23922.refresh:
push
child_dispatchers:

2022-05-15T01:16:45.809133744+00:00 DEBUG ONVIF Video Camera V1 **** ONVIF Driver V1 Start ****
2022-05-15T01:16:45.821965078+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:16:45.825811411+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:16:45.829044578+00:00 DEBUG ONVIF Video Camera V1 Z-Wave hub node ID environment changed.
2022-05-15T01:16:45.833330578+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:16:45.838972911+00:00 DEBUG ONVIF Video Camera V1 Starting discovery
2022-05-15T01:16:45.844547744+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:17:01.371428710+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:17:12.905085758+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:17:12.990838985+00:00 TRACE ONVIF Video Camera V1 Received event with handler driver_lifecycle
2022-05-15T01:17:16.925301812+00:00 INFO ONVIF Video Camera V1 Driver is exiting discovery
2022-05-15T01:17:16.930009290+00:00 DEBUG ONVIF Video Camera V1 discovery device thread event handled
2022-05-15T01:17:24.762189077+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with lifecycle handlers:
DeviceLifecycleDispatcher: onvifDriver
default_handlers:
driverSwitched:
deleted:
doConfigure:
infoChanged:
removed:
init:
added:
child_dispatchers:

2022-05-15T01:17:24.767496921+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with Capability handlers:
CapabilityCommandDispatcher: onvifDriver
default_handlers:
partyvoice23922.motionevents:
setSwitch
videoStream:
startStream
stopStream
partyvoice23922.refresh:
push
child_dispatchers:

2022-05-15T01:17:24.770688408+00:00 DEBUG ONVIF Video Camera V1 **** ONVIF Driver V1 Start ****
2022-05-15T01:17:24.784118023+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:17:24.788150756+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:17:24.791310384+00:00 DEBUG ONVIF Video Camera V1 Z-Wave hub node ID environment changed.
2022-05-15T01:17:24.795599613+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:17:24.801421451+00:00 DEBUG ONVIF Video Camera V1 Starting discovery
2022-05-15T01:17:24.807265444+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:17:40.341209283+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:17:54.554114743+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:17:54.586030201+00:00 TRACE ONVIF Video Camera V1 Received event with handler driver_lifecycle
2022-05-15T01:17:55.867688868+00:00 INFO ONVIF Video Camera V1 Driver is exiting discovery
2022-05-15T01:17:55.871037285+00:00 DEBUG ONVIF Video Camera V1 discovery device thread event handled
2022-05-15T01:18:01.051890160+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with lifecycle handlers:
DeviceLifecycleDispatcher: onvifDriver
default_handlers:
deleted:
added:
driverSwitched:
init:
doConfigure:
removed:
infoChanged:
child_dispatchers:

2022-05-15T01:18:01.057343452+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with Capability handlers:
CapabilityCommandDispatcher: onvifDriver
default_handlers:
partyvoice23922.motionevents:
setSwitch
videoStream:
stopStream
startStream
partyvoice23922.refresh:
push
child_dispatchers:

2022-05-15T01:18:01.060559535+00:00 DEBUG ONVIF Video Camera V1 **** ONVIF Driver V1 Start ****
2022-05-15T01:18:01.073618494+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:18:01.077498910+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:18:01.080577410+00:00 DEBUG ONVIF Video Camera V1 Z-Wave hub node ID environment changed.
2022-05-15T01:18:01.084512535+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:18:01.091251244+00:00 DEBUG ONVIF Video Camera V1 Starting discovery
2022-05-15T01:18:01.096820994+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:18:16.617865287+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:18:31.376403872+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:18:31.478061331+00:00 TRACE ONVIF Video Camera V1 Received event with handler driver_lifecycle
2022-05-15T01:18:32.215226706+00:00 INFO ONVIF Video Camera V1 Driver is exiting discovery
2022-05-15T01:18:32.218600456+00:00 DEBUG ONVIF Video Camera V1 discovery device thread event handled
2022-05-15T01:19:00.506718293+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with lifecycle handlers:
DeviceLifecycleDispatcher: onvifDriver
default_handlers:
infoChanged:
removed:
deleted:
init:
added:
driverSwitched:
doConfigure:
child_dispatchers:

2022-05-15T01:19:00.511913501+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with Capability handlers:
CapabilityCommandDispatcher: onvifDriver
default_handlers:
partyvoice23922.motionevents:
setSwitch
videoStream:
startStream
stopStream
partyvoice23922.refresh:
push
child_dispatchers:

2022-05-15T01:19:00.514936668+00:00 DEBUG ONVIF Video Camera V1 **** ONVIF Driver V1 Start ****
2022-05-15T01:19:00.528354543+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:19:00.532434293+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:19:00.535544168+00:00 DEBUG ONVIF Video Camera V1 Z-Wave hub node ID environment changed.
2022-05-15T01:19:00.540274043+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:19:00.547220209+00:00 DEBUG ONVIF Video Camera V1 Starting discovery
2022-05-15T01:19:00.553107168+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
202

It looks good, actually, so don’t recreate your devices. The only issue I would see is your resolution is probably too high (1920 x 1080) for SmartThings to be able to stream with multiple cameras. We need to get you on a lower setting.

First thing to try is go into Device settings and modify the Video Stream Selection. It’s probably set to ‘sub’, which is the default. Try changing that to ‘main’. Save it, then hit Refresh back on the controls screen. Then look at that last line in the Info table and see what it says for resolution. If it’s not something low like 480 x 640, then you may need to go into your camera app and find a way to change the resolution for the sub stream. Remember to put the Device setting for Video Stream Selection back to ‘sub’.

It was video streaming in that high resolution on both cameras live

OK false alarm then. If video streaming is working fine for you and motion events is the only problem, then I’ll need a log for when you start a Refresh. Please DM me your logs so we don’t fill up this community topic.

@Sakari had this same problem with his devices not getting discovered. I really don’t know why that is happening but I’ll have to spend some more time on that one.

It’s not discovering cameras anymore. Use to be instant

this the log
PS C:\dev\edgedrivers> smartthings edge:drivers:logcat 1d68e5c3-03c0-4229-985d-14e225550049 --hub-address 192.168.1.100
connecting… connected
2022-05-15T01:24:40.455521169+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with lifecycle handlers:
DeviceLifecycleDispatcher: onvifDriver
default_handlers:
removed:
added:
deleted:
driverSwitched:
doConfigure:
init:
infoChanged:
child_dispatchers:

2022-05-15T01:24:40.460748085+00:00 TRACE ONVIF Video Camera V1 Setup driver onvifDriver with Capability handlers:
CapabilityCommandDispatcher: onvifDriver
default_handlers:
partyvoice23922.refresh:
push
partyvoice23922.motionevents:
setSwitch
videoStream:
startStream
stopStream
child_dispatchers:

2022-05-15T01:24:40.463911877+00:00 DEBUG ONVIF Video Camera V1 **** ONVIF Driver V1 Start ****
2022-05-15T01:24:40.476719460+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:24:40.480732627+00:00 TRACE ONVIF Video Camera V1 Received event with handler environment_info
2022-05-15T01:24:40.483713210+00:00 DEBUG ONVIF Video Camera V1 Z-Wave hub node ID environment changed.
2022-05-15T01:24:40.487652252+00:00 TRACE ONVIF Video Camera V1 Received event with handler driver_lifecycle
2022-05-15T01:24:40.491566835+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:24:40.498154710+00:00 DEBUG ONVIF Video Camera V1 Starting discovery
2022-05-15T01:24:40.503804752+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:24:56.027843379+00:00 DEBUG ONVIF Video Camera V1 Making WS discovery request
2022-05-15T01:25:10.132656714+00:00 TRACE ONVIF Video Camera V1 Received event with handler discovery
2022-05-15T01:25:10.201987005+00:00 TRACE ONVIF Video Camera V1 Received event with handler driver_lifecycle
2022-05-15T01:25:11.551295589+00:00 INFO ONVIF Video Camera V1 Driver is exiting discovery
2022-05-15T01:25:11.554788214+00:00 DEBUG ONVIF Video Camera V1 discovery device thread event handled

Is there a way to get old driver back from May 11th? That one was discovering cameras instantly.

I haven’t touched the discovery code; that’s what is so perplexing.

Please don’t post your logs here, please send me a direct message with them instead.

1 Like

I’m going to change the discovery routine now so that it waits a shorter amount of time for answers, leaving more time to repeat the probe message more than just twice, which is what it is doing now.

1 Like

Driver update version 2022-05-15T02:33:09.791343

I’ve made some modifications to the discovery process to see if I can address the issues that a couple of you have seen (@Sakari and @milandjurovic71) with discovery not finding any devices.

Milan - I actually hope you are still having that issue because I’d like to see if you have better success with this driver update. Let me know!

1 Like

@TAustin Look same issue to me. I’ll DM you logs

Driver update version 2022-05-15T04:40:40.754245

I’ve been attacking the discovery problem some people are having and this update should address that. I’ll be anxious to hear back from you, Milan, to see if this fixes things.

Thanks for everyone’s patience!

Hi, I tried the new driver. motion sensors work perfectly, there is also video streaming. But there is a small problem. If there is movement in the camera, there is a stream of images. I share my camera settings and video to you. Thank you for your help.
some features are not working.
1- Camera does not open full screen
2- Automations like send photo not working when motion is detected
3- does not send images/video if intruder
4- If there is movement, the camera streams the image.
5- microphone and speaker passive
Thank You!

These are things Tod and the driver has no control over, they are controled by the existing Smartthings platform, once the driver has done its bit of discovery and connection to your camera it hands the rest to Smartthings, the streaming part was not specifically designed for our useage so there are bits in the streaming part that fail to work

That said, occasionally you can get full screen

  1. When looking at a group of cameras, rotate the phone to lanscape mode
  2. tap the camera full screen icon and quickly rotate the screen to portrait and back to landscape
    Sometimes this produces full screen image, its hit and miss but i have it working now and again

The other options you mention are also down to how the platform handles your stream

I do have audio input from the camera working so that can work but your failure may be due to the audio format sent from the camera, not all cameras have options for different audio formats but if yours is configurable, try a different audio format

Sending a captured image to a recipient is not YET available, perhaps in time @TAustin might be able to look into that, capturing a screen image is possible on my stream but not as part of an automation, again they may be down to Smartthings and there part of the stream which there is no control over

I have requested Smartthings help us out with some fixes to the streaming part and the reply was it has been added as a feature request… i dont hold much hope on a fix coming anytime soon sadly

1 Like

New driver version has been pushed out: 2022-05-16T00:34:34.722726

For those of you running logs, I have to apologize for the volume of messages you’ll be seeing. As I try to find solutions to reported issues, I’m having to add more and more tracing messages to help diagnose. Rest assured, I will be removing as much as possible when I can, so the output will eventually be much less verbose.

Updates:

  • another attempt at solving the discovery problem some people are seeing (@milandjurovic71, @Sakari)
  • fix to Axis camera event subscription renewal: symptoms were that events would work for 10 minutes when device first initialized, but then stop. This was because the subscription renewal request (which are done every 10 minutes) was being rejected. It’s possible that this fix might solve the same problem with other cameras as well (@amin300)

Some good news is that the Motion Rule Selection option that I added a couple days ago seems to be working fairly well for those with Profile T cameras. :+1:t3:

1 Like

An odditty i have found Tod
2 different cams
Both Hikvision
Both have 640 x 360 available as a substream
1 expands correctly to give proper aspect ratio when in group 16:9
1 does not and stays at 4:3

I know the stream part is not in your control but is there anything that can be done to force 16:9 when handing over to stream

No sorry; there is nothing I can do in the driver about that. It would have to be controlled through the camera config itself, or support improved by SmartThings.

No changes to the worse after this update. Deleted old device, new was found instantly after hitting the scan button. Stream works fine, motion detection not.