New Device Metadata for OCF Standard


(Jim Anderson) #1

At SmartThings, we continue to review emerging open standards in the IoT space. The Open Connectivity Framework (OCF) defines an open standard for IoT resource types, similar to the SmartThings Capabilities model. This specification is referred to as the Open Interconnect Consortium (OIC) Resource Type specification, and is available for download on the OCF Specifications page.

As a first step towards supporting OIC Resource Types, we will be adding metadata to several of our Device Handlers. You will see these changes being made in the coming days in our public repository of SmartApps and Device Handlers.

This metadata specifies the OIC Resource Type of the device, and will look something like this:

metadata {
  definition(name: 'device-name', namespace: 'my-namespace', 
             author: 'smartthings', ocfDeviceType: 'oic.r.button')
  …
}

This allows the device to explicitly declare its OCF Resource Type. This is a first step towards supporting this new standard; we will continue to add support in an iterative way.

This change has no behavioral impact on your SmartThings-connected devices or automations, nor on any custom Device Handlers. It is, however, an important first step towards supporting an exciting new open IoT standard.


FAQ

Should I update my custom Device Handlers with this new ocfDeviceType metadata?

No. At this point there is no behavioral impact of this field. The ocfDeviceType metadata is only used for specific devices that are targeting initial OCF support, and only in cases where we cannot correctly determine the best OIC Resource Type to use from the device’s defined capabilities.

Will this impact any of my SmartThings-connected devices or automations?

No. There will be no behavioral impact on any SmartThings-connected device or automation.

When will SmartThings fully support the OCF standard?

There is no specific date targeted for full OCF support, but we are taking initial steps towards supporting it.

Where can I learn more about OCF?

https://openconnectivity.org/ is the best resource to learn more about OCF. There you will find the various specifications, developer resources, and latest news.


(Morten) #2

Love this step toward OCF. Huge applause.

This might be premature, but are you only considering OCF from a consumption/client point of view? Ie, only consume OCF devices? Or are you also considering exposing SmartThing’s own devices as OCF via the hub - in essence acting as an OCF Bridge for other clients to build on?


(Jeff Beck) #3

We are not at this time exposing OCF from the hub in the way you are talking about. The SamsungConnect app does interact with ST devices via ocf, but they are not exposed over hub.


(Jimmy) #4

@Jim or @beckje01 it looks like the SmartThings (Samsung Connect) app uses the ocfDeviceType metadata to determine the icon used for a device in the list view. Is there an ocf type for fan that works with STSC? I tried oic.d.fan with no success. oic.d.swtch does work and displays the switch icon.


(Allan) #5

@Jim Any official answers on this or how to update third party DTH’s without having to go through github and guess?


(PPO16) #6

You can certainly go to the OCF page and use their IDs. So far I got good results doing so.


(Allan) #7

Tried that for a garage door opener and couldn’t get it to work. Well should say works fine in classic, doesn’t in “new” app. I’ll keep playing with it but it would be nice to have something official.


(PPO16) #8

Have you checked the DTH code of Z-Wave Garage Door Opener?
This the one used by my Iris opener and it works fine in the new app.


(Allan) #9

I did and it doesn’t have a ofc or vid code in it so back to my original statement “without having to go through github and guess?”


(Jimmy) #10

There’s is no official documentation yet on getting custom handlers to work in the new app


(Simon Tether) #11

I have been editing my DTHs to make my devices appear and be operational in the new app (and my 2018 TV).
These are the OCF device types that work and have an icon appear in the device:

x.com.st.d.sensor.moisture
x.com.st.d.siren
x.com.st.d.sensor.contact
oic.d.light
oic.d.smartplug
x.com.st.d.sensor.smoke
oic.d.watervalve
x.com.st.d.remotecontroller
oic.d.blind
oic.d.switch
x.com.st.d.sensor.motion
oic.d.smartlock
oic.d.garagedoor
oic.d.airpurifier
oic.d.airconditioner
oic.d.camera
oic.d.dishwasher
oic.d.washer
oic.d.dryer
oic.d.oven
oic.d.refrigerator
oic.d.robotcleaner
oic.d.tv
oic.d.thermostat
oic.d.watervalve