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


Echoing the above post but with TP-Link Tapo cameras. I have 11 in total and all are responding and all are streaming bar 1 (not model unique). I am also not seeing any motion reporting from any of the cameras (need to investigate this a bit more though). Have also tried setting combinations as mentioned above but behaviour is the same and motion sensing is not affected.

Have tried removal & re-introduction without success.

Will continue investigating the movement reporting over the next few days as time permits. Thanks again for this driver and your efforts :+1:

Hi Martin - Sorry for the delay in responding but glad you got your cameras working. Unfortunately no Foscam cameras we have tested support motion events through their ONVIF interface. For some strange reason they chose not to support this, so only the video streaming is usable with these cameras.

I have tried to get motion events to work with these cameras but so far have been unsuccessful. I’m not convinced that these cameras don’t support motion events (like Foscam), but rather it seems to be something unique in their interface that isn’t following the ONVIF spec precisely.

If anyone has a spare camera they would be willing to lend me I might be able to get it working.


Reolink RLC 511WA work with drive?

It should; we’ve had good success with most Reolink cameras.

Hi @TAustin - so, just so I understand, what you are saying is that even though motion detection is actually an operational feature for Foscam cameras, they will not send that information (motion detected/no motion) through an ONVIF connection, right?

Right. I’m not saying they don’t report motion through other means ( their own proprietary app, etc), but not on the ONVIF interface.

Ok, thank you. That’s disappointing of Foscam. I will have to see whether I can capture those motion through my NVR software and somehow send them over by posting something to a URL, but again, more time and more devices to set up (eating away at that 200 limit), so not the ideal solution. Will have to keep this in mind next time I order any CCTV cam.

With edgebridge server running, when I search for a device, the following error occurs.<=== edgebridge server ip

2022-09-06T13:58:05.135978585+00:00 DEBUG ONVIF Video Camera V1.1 Discovery response from:
2022-09-06T13:58:05.165513544+00:00 FATAL ONVIF Video Camera V1.1 Lua: runtime error: [string “cosock.lua”]:296: [string “discover.lua”]:112: attempt to index a nil value (field ‘ProbeMatch’)
stack traceback:
[string “discover.lua”]:112: in upvalue ‘parse’
[string “discover.lua”]:221: in function <[string “discover.lua”]:208>
stack traceback:
[C]: in function ‘error’
[string “cosock.lua”]:296: in field ‘run’
[string “st/driver.lua”]:739: in method ‘run’
[string “init.lua”]:935: in main chunk
stack traceback:
[C]: in function ‘error’
[string “cosock.lua”]:296: in field ‘run’
[string “st/driver.lua”]:739: in method ‘run’
[string “init.lua”]:935: in main chunk

Just realised the driver cannot be used remotely, only when at home on the same network as pointed out by @TAustin earlier on in this thread. Pity, but it obviously is connected at a local network level, within the same subnet, as a direct connection between the device and the cameras, and those IPs are useless once you step outside that subnet. :sunglasses:

I can understand the technical limitation, but have to say it is an annoying one as you’d want to have a look at them mostly when away from home, and I have zero hope that Foscam will try to allow build something to allow connectivity via their servers, in the same way the Foscam app does.

What about the dyndns option mentioned earlier on? Is that something that maybe could be added to the driver - so it has an alternative means of connecting to the cameras when not in the same location?

Yes, I’m sorry for the limitation. SmartThings is not even officially supporting video from Edge drivers, so we have to live with what we have. The way it works behind the scenes is that when video streaming is requested, SmartThings asks the driver for the streaming URL, which the driver had obtained from the camera during initialization. At this point, the driver is out of the equation and it is the SmartThings platform (likely the mobile app itself) that then uses that URL to get and display the video feed. So of course if the phone isn’t connected to your local network, it can’t access the URL which is a local network address.

I have not looked at dyndns, but I’ll try to. If we could somehow turn that local streaming URL into an internet-accessible URL, then maybe it could work.

1 Like

There’s no need to be sorry - you did a great job with the tools available to you and the limitations thereof - I understand this technical limitation, just disappointed with the overall situation, but still very grateful to at least be able to access them from home.

Yes - if we could maybe change the IP-based URL you get from the device during discovery, to one with a dyndns (or other dynamic DNS) URL and port number, then maybe we can at least configure our routers to do port forwarding to specific cameras. but I understand it is a lot of work as well, and possibly a lot of testing to be carried out, so, no stress, just look at it when and if you have the time to, - and if you feel like it. Really appreciate your hard work on this, even as it is!

Hey @TAustin, I realised over the past few days that a number of cameras stop working occasionally. I have to go into the detail view of each camera and find their onvifstatus status “Not responding”, and I have to refresh before I can see the stream once again (sometimes it takes a few refreshes before it reverts to a connected 'Responding" state) - and then it works fine, likely for a few days, though likely will revert at some state once again.

Is this normal, and is there any way I can avoid this happening? Can we perhaps have an auto-refresh happen occasionally to keep them connected? Not sure what’s possible here, just asking.

Hi Martin - Thanks for reporting this. I too have experienced this periodically. The last time it happened to me was when my hub got rebooted. I’ve only once been able to catch a log when the driver is just starting after a reboot (it’s a little tricky to do) and saw that there were repeated socket errors occurring. I need to determine what is causing this in the first place.

But regardless of solving that, it is the case that if the cameras don’t initialize at driver startup, then I should implement some kind of periodic retry until they do. I will definitely look at this for my next update, as I agree that it is important.

1 Like

Great - thanks a lot @TAustin, I look forward to it. I am not sure it happens after hub reboots, and to be fair, I have a number of hub reboots happening per week these days, as I am doing loads of exclusions and inclusions thanks to this Edge project. Will try to keep a record of reboots to see whether it is happening right after those - but in any case, thank you.

Hi, can you tell me how you managed to display the video in the smartthings app? I only got motion detection (I’ve even tested it as a routine trigger and it worked), but the image doesn’t appear.

Mine is an RLC 410W too.

I send below the information that appears in the smartthings app



Are there any special characters in your userid or password for the cameras, or anything unusual about them? We have found that in some cases this can cause problems with the authentication during the streaming request to the camera.

The user is the default admin and the password has only letters (uppercase and lowercase) and numbers…

Honestly, I don’t know what it could be.

I’m thinking of resetting my camera and trying everything again to see if anything changes.

The interesting thing would be someone who has already managed to put the Reolink RLC 410W to work to give a configuration tip…

I’m sorry you’re not having success. Someone has definitely reported that they had the 410W working OK. The only other thing I can think of is to make sure that you don’t have some config option that needs to be turned on for ONVIF support.

If you can, you could download the CLI and run some log outputs so I can see if anything is going wrong. But it looks to me like all the initialization completed OK.

So I just downloaded the driver and it successfully found all my foscam cameras. The problem I have is that inside the smartthings app, I have no labels on any of the camera details (i.e. below the box that says Motion sensor it has a box with a switch labelled untitled. I can see it is off but I can’t turn it on. The cameras are responding or so it says in the next ‘untitled’ box. My question is why are these untitled for me when I can see others have labels? Driver version is 2022-07-05T18:39:13… Also, I am unable to turn on motion detection (the on / off switch won’t turn on. Any suggestions?