Re: Protocol Binding for OCF

> On 9 May 2017, at 20:32, Michael Koster <michael.koster@smartthings.com> wrote:
> 
> Hi,
> 
> Here is a sketch of a strawman proposal for OCF protocol binding, also attached:
> 
> https://github.com/mjkoster/wot-protocol-binding/blob/master/ocf-binding-template.pdf <https://github.com/mjkoster/wot-protocol-binding/blob/master/ocf-binding-template.pdf>
> 
> The example TD file is in the same repository:
> 
> https://github.com/mjkoster/wot-protocol-binding/blob/master/td-ocf-protocol-binding.json <https://github.com/mjkoster/wot-protocol-binding/blob/master/td-ocf-protocol-binding.json>
> 
> I made small changes to the TD vocabulary, assuming some mapping involving an implicit JSON-LD context. 
> 
> A design goal is to keep the driver software simple and generic, unaware of specific OCF resource definitions.
> 
> The general strategy is applicable to other protocol bindings. There is an MQTT example for illustration.
> 
> Best regards,
> 
> Michael
> 
> <ocf-binding-template.pdf>
> <td-ocf-protocol-binding.json>


Hi Michael,

Thanks for the example for the light brightness level. I guess that this is for the “oic.r.light.brightness" resource.  I modelled that in JSON as:

{
    "comment": "read/write access to light brightness level",
    "platform”: "http://ocf.org/v1",
    "oic_rt": "oic.r.light.brightness",
    "href": "coap://192.168.1.34/light23",
    "properties": {
        "brightness": {
            "type": "integer",
            "min": 0,
            "max": 100
        }
    }
}

Here “platform" is a URI for the RDF concept that identifies OCF as an IoT platform. “oic_rt” and “href” are metadata specific to the OCF platform. They respectively identify the OIC resource type and the URI for accessing the resource, and are interpreted by the software driver for the OCF platform.

The above is the interaction model, and lacks the connection to the semantics. I am guessing that we may want to indicate that this is a a light with an adjustable brightness. I can imagine expressing that as two RDF triples, the first would indicate this thing is an instance of the class light, and the second would indicate that the property sets the brightness.  It might be sufficient to just assert the first triple if the semantic model itself binds the brightness property in the interaction model to the light’s brightness.

More examples are at: https://www.w3.org/WoT/demos/td2ttl/oic.html <https://www.w3.org/WoT/demos/td2ttl/oic.html>

Best regards,

Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
W3C champion for the Web of things

Received on Wednesday, 10 May 2017 11:31:44 UTC