Capabilities Reference : VideoStream NO Video Codec and Audio Codec Information

There is already visibility metadata available.

The displayed field should deal with mobile app history. That’s the equivalent of the option we had in Groovy.

The ephemeral field may be useful if you don’t want a history at all, but I am not totally confident about that as it is a new on me. That seems to be what it is for. I’d imagine there could also be a relationship to the ephemeral field that crept into capabilities unheralded.

https://developer-preview.smartthings.com/docs/edge-device-drivers/capabilities.html#visibility

Thanks! I think you had told me this before, but I couldn’t figure out how to get it work. Is it meant to be a second parameter in the emit_capability command? i.e.:

device:emit_event(capabilities.videoStream.stream(live_video), { visibility = { displayed = false } })

Yeah, that’s actually the result of a previous request from @TAustin:

I’m just confirming with the team that everything is correct…let me know your results.
It’s the second parameter of the capability event, so it should be inside .stream(). Here’s another example:
capabilities.threeAxis.threeAxis({1,2,3}, {visibility = {displayed = false} })

Thanks, apparently my mind is a sieve!

Regarding the videoCamera capability. I finally got it to display something but it’s only an on/off power switch! Not much use in that. Trying to change the mute or statusMessage attributes only results in history entries. The ‘settings’ object remains a mystery.

It goes in the same table a state_change would, so it is part of the second argument when building the capability event. Looks like @nayelyz has beat me to it though.

Sorry, it’s just that I found the report generated for this request and the sample was there. Didn’t mean to beat you :smiley:

Oh and you mentioned the SmartThings-smartthings-c2c-ring-camera VID earlier. Have you pulled that from the API to see if there is anything of interest in it? I don’t know if you can also pull the device config. The older VIDs were larger files (100-200 kB) and predated the device configs but they may have been updated to something less frightening.

Yes I took a look at the definition of that VID and see that it seems to be using a capability called webrtc for the video display. There is no associated presentation available.

{
    "id": "webrtc",
    "version": 1,
    "status": "live",
    "name": "webrtc",
    "ephemeral": false,
    "attributes": {
        "sdpAnswer": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sdp": {
                                "type": "string"
                            },
                            "turn_url": {
                                "type": "string"
                            },
                            "turn_user": {
                                "type": "string"
                            },
                            "turn_pwd": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "sdp"
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        },
        "talkback": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        },
        "supportedFeatures": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                            "bundle": {
                                "type": "boolean"
                            },
                            "order": {
                                "type": "string"
                            },
                            "audio": {
                                "type": "string"
                            },
                            "video": {
                                "type": "string"
                            }
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        },
        "audioOnly": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        },
        "stunUrl": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "title": "URL",
                        "type": "string",
                        "pattern": "^(stun?):((?:[a-zA-Z0-9.-]|%[0-9A-F]{2}){3,})(?::(\\d+))?((?:\/(?:[a-zA-Z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})*)*)(?:\\?((?:[a-zA-Z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-zA-Z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*))?$"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        }
    },
    "commands": {
        "sdpOffer": {
            "arguments": [
                {
                    "name": "id",
                    "optional": false,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "name": "sdp",
                    "optional": false,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "end": {
            "arguments": [
                {
                    "name": "id",
                    "optional": false,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        }
    }
}

If only there was documentation or examples, I might be able to use it.

@TAustin Would this driver work with, Foscam cams? It used to work with old Classic app. It does require username and password.

Hi Milan - It may if they are ONVIF compatible. Tested so far with Reolink & Hikvision.

Is there any way I could test the driver? I also have those Wyze cams

Absolutely! I think I’m nearly at the point of being ready to make a post and invite others to test. Give me a couple days and I should have it out soon.

FYI, the value I see in my ONVIF Edge driver is more for the motion alerts and less so for the video. The manufacturer app will always provide a superior user experience for viewing the video, but with this driver and defining camera groups, at least there is a way to do it.

I know the holy grail is to be able to display video on an integrated display like action tiles - or to automatically bring up video when motion is detected. Given the current platform limitations, I don’t think we’re quite there yet.

Hey Todd, once you have this cracked any thought of updating the Blue Iris driver to include a stream too?

I’m definitely interested in this as my whole camera system is Reolink.

Are you referring to my Motion driver that goes through the forwarding bridge server? If so, no. I see this new driver more as a potential replacement for that. This driver talks directly to the cameras without need for Blue Iris. Not to say you can’t also have Blue Iris running in parallel.

Yep, the motion sensor and bridge.

I appreciate that direction and it totally makes sense. I guess I just haven’t known what it’s like to have another option.

Thanks again for all your work!

Awesome! I have a few different models; found that only one isn’t able to respond to ONVIF requests. Will be interesting to see what your findings are.

For anyone stumbling on this topic later, following up to the webrtc capability I found within the Ring camera device config (SmartThings-smartthings-c2c-ring-camera): I tried to create my own VID with it and used it in a device profile, but the device unfortunately doesn’t display any video output frame with it included. So it appears to be some kind of custom internal presentation and not useable for driver developers.

I also tried one other thing, and that is to start with one device profile to get my device configured (that excluded the special VID and therefore allowed me to use device settings), and then once I did that, I used a device setting to trigger my driver to then issue the try_update_metadata function to change the profile to one that specifies the special VID, but the device became unresponsive when I did that. Not surprised, as I don’t think you can ever just change a device’s presentation on the fly like that. But it was worth a shot…

This is really clever! It shouldn’t cause any issue. What do you mean by “unresponsive”, you couldn’t send commands anymore?
I believe it’s easier in Android but you work with iOS, right?

Out of curiosity, which camera model that supports webrtc are you using to test? I haven’t found any that make the webrtc stream easy to find.