WebThingsIO / schemas

A Web of Things schema repository
https://webthings.io/schemas/
5 stars 8 forks source link

MotionSensor, DoorSensor and PushButton #7

Closed benfrancis closed 6 years ago

benfrancis commented 6 years ago

These are all just specialisations of a BinarySensor with a single boolean property. I haven't defined any events yet. There are lots of events it's tempting to add, but I want to be sure they're definitely adding something over just property changes alone. We may need to add some events for the push button to detect certain time-sensitive interactions like double press or long press.

Can be viewed live at https://benfrancis.github.io/schemas/

Fixes #8 Fixes #9 Fixes #10

benfrancis commented 6 years ago

See also: #8, #9 and #10

benfrancis commented 6 years ago

I've addressed the review comments.

There are lots of events I'm tempted to add:

PushButton:

MotionSensor:

DoorSensor:

The thing is that none of these really add functionality which can't be achieved by just listening for property changes. ClickEvent and LongPressEvent are arguably time dependent and could therefore be useful.

Perhaps we should start with just the properties and see whether the events are actually needed?

benfrancis commented 6 years ago

Related: I'm still waiting for an answer on https://github.com/iot-schema-collab/iotschema/issues/32