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

Hi Troy - welcome to the community.

Unfortunately there was a SmartThings change made that broke all community-developed driver device labels. We don’t know if it will ever be fixed or if we all have to go back to do a bunch of rework to ever make them right again. The switch that you see below the motion sensor is for turning on and off motion events. The button at the very bottom is for refreshing the device.

The second bit of bad news is that Foscam cameras do not support motion event notifications through their ONVIF interface.

I have 410w working just fine. Look at mine video resolution. Maybe you have too high video profile set?

Thanks. It’s a good thought, but it looks like @Raimundo has the same resolution set according to his earlier screen shot.

Do you have the latest firmware available for that camera?

Thank you for the very quick reply. That is too bad about the labels and hopefully smartthings fixes that.
That is bad news about Foscam cameras not supporting motion detection since that makes this interface useless to me unless I want to just view the cameras. Thank you for writing this driver though.

I would like to let you know that it worked, it was the camera resolution that was preventing it from working correctly.

Thank you @TAustin

*After some tests, I realized that the image function itself is not very interesting, because it only works within the same network and anyway, it is easier to visualize using the camera app (higher resolution), but the detection functionality of movements is very good!

Hi @TAustin, after a hub reboot (I have plenty of reboots happening these days as I carry the hub with me around the house to exclude/include devices to convert them to Edge drivers) about 4 of my cameras reverted to Not Responding, and will not reconnect even after pressing Refresh.

In fact, I further worsened the situation by trying to kickstart one of the cameras by chnging its driver to Mariano’s Zwave Device Config driver (yes - I know it’s not a Zwave device of course), and then resetting it back to its original driver, thinking it would be re-initialised in this manner. Of course, this did not work - instead the device is currently unusable, showing only the following page.

What can I do to:

  1. Re-activate the cameras Not Responding; and
  2. Bring back to life the camera I managed to stop working as per image above.

Many thanks

To clarify your situation, do you have some cameras working and others not?

Yes - indeed, that is the case… only 2 of 6 are working now.

Just for future reference, what adjustment did you make to your camera settings? It looked like the resolution (640 x 360) was OK in the screenshot you posted.

And yes, I tend to agree that the manufacturer’s app will always be superior for viewing the video. It’s really the motion detection integration that’s more useful for most people.

If that’s the case then, have you just deleted those non-working camera devices and re-run Scan for nearby devices to get them recreated? Remember to configure your userid and password for the new ones and then do a Refresh and see if they are back working.

If that’s not working I’m wondering if there is something wrong with the driver itself. Would it be possible to get some log output? You’ll need the CLI.

The camera was outputting 4MP (in the reolink app) and the driver was with a lower resolution, causing a conflict. From what I understand, both must have the same resolution (in the reolink app, the following options appear: clear, fluent, high… only clear made it work in smartthings)

1 Like

Hi @TAustin - thanks for replying. I solved the problem, somehow, though still not sure why it happened.

So, first I deleted 2 of the affected cameras and rescanned… no joy, though they remained in a “Not Responding” state. I then started the CLI and saw that I was getting errors on the affected cameras only, as follows:

? Select a driver. 12
connecting... connected
2022-09-18T08:22:40.020916311+00:00 TRACE ONVIF Video Camera V1.1  Received event with handler capability
2022-09-18T08:22:40.030577311+00:00 INFO ONVIF Video Camera V1.1  <Device: 00de5fae-12e0-4236-863e-9b942a0f2c24 (IPCam #2 (configure!))> received command: {"args":{},"capability":"partyvoice23922.refresh","command":"push","component":"info","positional_args":{}}
2022-09-18T08:22:40.036858311+00:00 TRACE ONVIF Video Camera V1.1  Found CapabilityCommandDispatcher handler in onvifDriver
2022-09-18T08:22:40.041932644+00:00 INFO ONVIF Video Camera V1.1  Refresh requested
2022-09-18T08:22:40.047167644+00:00 INFO ONVIF Video Camera V1.1  Starting Device Initialization routine for    IPCam #2 (configure!)
2022-09-18T08:22:40.053264978+00:00 INFO ONVIF Video Camera V1.1  <Device: 00de5fae-12e0-4236-863e-9b942a0f2c24 (IPCam #2 (configure!))> emitting event: {"attribute_id":"info","capability_id":"partyvoice23922.onvifinfo","component_id":"info","state":{"value":"<!DOCTYPE html>\n<HTML>\n<HEAD>\n<style>\ntable, td {\n  border: 1px solid black;\n  border-collapse: collapse;\n  font-size: 11px;\n  padding: 3px;\n}\n</style>\n</HEAD>\n<BODY>\n<table>\n<tr><td>IP addr:</td></tr>\n<tr><td>Name: IPC-model</td></tr>\n<tr><td>Hardware: IPC-model</td></tr>\n<tr><td>Location: country/china</td></tr>\n<tr><td>urn:uuid:88d87a05-d7f7-7e45-b1e9-00626E6D0090</td></tr>\n</table>\n</BODY>\n</HTML>\n"}}
2022-09-18T08:22:40.076359311+00:00 DEBUG ONVIF Video Camera V1.1  Sending GetSystemDateAndTime request to
2022-09-18T08:22:45.138825647+00:00 DEBUG ONVIF Video Camera V1.1  HTTP Response Header:
2022-09-18T08:22:45.147902980+00:00 WARN ONVIF Video Camera V1.1  Not an XML response
2022-09-18T08:22:45.153332313+00:00 ERROR ONVIF Video Camera V1.1  Unexpected HTTP Error nil from camera: IPCam #2 (configure!)
2022-09-18T08:22:45.167810980+00:00 ERROR ONVIF Video Camera V1.1  Failed to determine authentication method
2022-09-18T08:22:45.174625647+00:00 ERROR ONVIF Video Camera V1.1  Failed to get date/time from (IPCam #2 (configure!))
2022-09-18T08:22:45.180548980+00:00 ERROR ONVIF Video Camera V1.1  Failed to initialize device  IPCam #2 (configure!)
2022-09-18T08:22:45.186238980+00:00 INFO ONVIF Video Camera V1.1  <Device: 00de5fae-12e0-4236-863e-9b942a0f2c24 (IPCam #2 (configure!))> emitting event: {"attribute_id":"status","capability_id":"partyvoice23922.onvifstatus","component_id":"info","state":{"value":"Not responding"}}
2022-09-18T08:22:45.204993647+00:00 DEBUG ONVIF Video Camera V1.1  IPCam #2 (configure!) device thread event handled

So - I figured something was seriously wrong and the Edge driver was not latching on to the camera using the ONVIF protocol. So I decided to restart the camera (from the Foscam app), which I did, then refreshed from the camera page on SmartThings, and - it worked. So I repeated that for all cameras - all were giving the same log entries, and all were resolved with the above steps.

Not sure why this happened on 4 (of 6) cameras simultaneously, and not sure the above log can help you deduce anything. Hopefully, it was just a one-off, but if it happens again, will let you know.

I have the following cameras working. All were discovered but I have not dug deep into any of them to refine any of the camera settings:

HiKVision DS-HD1 , motion sensing does not appear to be working.
Duaha IPC-T5442T-ZE, motion and video
HiKVision DS-2CD2035-I, motion and video
HiKVision DS-2CD2135F-IS, motion and video

Duaha IPC-B544E-ZE , no motion or video
Duaha IPC-HFW5442E-ZE , no motion or video

I’m curious how everyone is using their cameras in Automation?

As I suspected before connecting them I’m getting far too many motion events to be able use them in automations, even the cameras in the garage report many motion events just caused by the change in sunlight coming through the window.

Thanks for providing the log. I have seen this behavior occasionally where the camera doesn’t respond correctly to ONVIF requests and it takes a camera reset to clear it - just as you have found. I’m not certain these cases are specific to Foscams or not, but please do let me know if it happens repeatedly. We may need to try to get more debugging info to see if it is something that could be recovered from via some driver code.

Thanks for the report! Interesting that you got one of your Duaha cameras working - that’s good to hear. I’ve read online some interface issues with those cameras. I’m not familiar with the various models, but is the one that is working a more recent model and/or has more recent firmware?

I think this is a common discovery and will require some fine-tuning of the camera settings. The more expensive cameras seem to have better adjustments to be able to eliminate these things. My Reolinks generate a motion event whenever they go from daylight to nighttime mode or back again. Quite annoying!

I’m working on adding line crossing event support, so maybe if your camera supports that it would give you a more consistently reliable trigger to use for automations.

Thank you, appreciate that.

If it will happen again, it will likely be after a hub restart. Thus far, they all look fine, but will let you know if it happens again.

hi @TAustin thanks for creating this driver and all the support you provide on it…
i was trying to use my Foscam C1 with this… it shows as not responding … these are the error msgs in cli…

2022-09-23T01:49:08.464341043+00:00 ERROR ONVIF Video Camera V1.1 Unexpected SOAP fault
2022-09-23T01:49:08.468063015+00:00 ERROR ONVIF Video Camera V1.1 GetEventProperties request failed with HTTP Error 400 (camera IPCam #1 (configure!))

2022-09-23T01:49:08.474248212+00:00 ERROR ONVIF Video Camera V1.1 Failed to get event properties from
2022-09-23T01:49:08.477125523+00:00 ERROR ONVIF Video Camera V1.1 Event properties not available
2022-09-23T01:49:08.480047436+00:00 ERROR ONVIF Video Camera V1.1 Failed to initialize device IPCam #1 (configure!)

Hello. Thanks for reporting this. Foscam cameras don’t seem to support motion events through the ONVIF interface, so I’d be surprised if we can get that to work, but you should be able to get video streaming.

Regardless of that, this particular error shouldn’t be happening, so I’d like to diagnose that some more if you are willing. I will direct message you.

Hello, I am using this dth to record my Dahua ip camera on and off. Is it possible to prepare an edge driver for this?