This is a conceptual flow diagram of a ThingFacet interaction with a sensor, using a serial temperature sensor example. Refer to the tutorial 1. Serial Temperature Sensor for the actual code.
Note that ThingFacet is only persisted and executable when combined with a ThingModel.
Key concepts involved:: ThingFacet, ThingModel, Model Instance, Attributes, Action, Value and Known, Workflow, Perif Protocol Handler