property ID: this is the base topic of a property. Each property must have a unique property ID on a per-node basis which adhere to the ID format.
A property payload (e.g. a sensor reading) is directly published to the property topic, e.g.:mmrc/super-car/engine/temperature → "21.5"
The following attributes are required:
|$name||Friendly name of the property.||String|
|$datatype||The data type. See Payloads.||Enum: [integer, float, boolean,string, enum, color]|
The following attributes are optional:
|$format||Specifies restrictions or options for the given data type||See below|
For example, our
temperature property would send:
Settable and retained:
Properties can be settable. For example, you don't want your
temperatureproperty to be settable in case of a temperature sensor (like the car example), but to be settable in case of a thermostat.
Properties can be retained. A property is retained by default. A non-retained property would be useful for momentary events (door bell pressed).
A combination of those flags compiles into this list:
- retained + non-settable: The node publishes a property state (temperature sensor)
- retained + settable: The node publishes a property state, and can receive commands for the property (by controller or other party) (lamp power)
- non-retained + non-settable: The node publishes momentary events (door bell pressed)
- non-retained + settable: The node publishes momentary events, and can receive commands for the property (by controller or other party) (brew coffee)
float: Describes a range of payloads e.g.
payload,payload,payloadfor enumerating all valid payloads.
rgbto provide colors in RGB format e.g.
hsvto provide colors in HSV format e.g.
Property command topic
set: The device must subscribe to this topic if the property is settable (in case of actuators for example).
A MMRC controller publishes to the
set command topic with non-retained messages only.
The assigned and processed payload must be reflected by the MMRC device in the property topic
device ID /
node ID /
property ID as soon as possible.
This property state update not only informs other devices about the change but closes the control loop for the commanding controller, important for deterministic interaction with the client device.
To give an example: A
kitchen-light device exposing the
light node with a settable
power property subscribes to the topic
mmrc/kitchen-light/light/power/set for commands:
In response the device will turn on the light and upon success update its
power property state accordingly: