W3C home > Mailing lists > Public > public-wot-ig@w3.org > January 2016

Re: [T2TRG] 2. WoT Thing needs to have istate/ostate Bands

From: Michael Richardson <mcr+ietf@sandelman.ca>
Date: Thu, 28 Jan 2016 15:12:07 -0500
To: David Janes <davidjanes@davidjanes.com>
cc: "t2trg\@irtf.org" <t2TRG@irtf.org>, public-wot-ig@w3.org
Message-ID: <28636.1454011927@obiwan.sandelman.ca>

David Janes <davidjanes@davidjanes.com> wrote:
    > 1 the switch is off
    > 2 the user sends turn on command / the WeMo receives it
    > 3 about 300ms (guestimate) passes
    > 4 the switch is on

    > It's step (3) we're considering.

    > WoT Thing

    > So let's look at this as a WoT property manipulation. Note that I'm just
    > pseudocoding this, I don't know if there's a property called exactly "on" but
    > I'm sure there's something like it.

    > thing.getProperty("on")         ## (stage 1) a promise that yields false
    > thing.setProperty("on", true)   ## (stage 2)
    > thing.getProperty("on")     ## (stage 3) WHAAA?
    > thing.getProperty("on")     ## (stage 4)

    > The contradiction

    > It's Stage 3 that's the concern. We don't have a clean way of knowing that
    > we're turning on the light, but the light is currently off.

    > This is called the "Interstitial State" and it's important that this is
    > indicated in the UI.

okay... so the RESTful analysis would tend to look at the problem
differently.  (The example I recall was about rebooting a virtual machine)

One would do:
    POST /light/XXX      state: on
one would receive a 201 Location: /light/XXX/activity/YYY

A GET to /light/XXX/activity/YYY  would return the Interstitial State, with
the current value retured, and possibly some other status, such as maybe,
some kind of encoding: "power is on, but no current flowing, is bulb probably absent?"

Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-

Received on Thursday, 28 January 2016 20:12:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:26:54 UTC