W3C home > Mailing lists > Public > public-wot-ig@w3.org > May 2017

Re: Protocol Binding for OCF

From: Dave Raggett <dsr@w3.org>
Date: Wed, 10 May 2017 12:31:33 +0100
Message-Id: <6A4E4535-7CAD-45A9-9AB1-37B2F471B9D1@w3.org>
Cc: Public Web of Things IG <public-wot-ig@w3.org>
To: Michael Koster <michael.koster@smartthings.com>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:27:12 UTC