Stereotypes - SukkoPera/Arduino-Sensoria GitHub Wiki

Stereotypes describe how to interpret data that is read from a transducer or written to it.

Since Sensoria is a text-based protocol, all data that is sent and received must be encoded to or decoded from text form. Stereotype describe exactly how this is done.

Stereotypes are identified by a two-character code which is reported together with each transducer in the HLO/QRY command replies.

Known Stereotypes

The following stereotypes are currently defined:

WD - Weather Data

The WD stereotype carries various weather-related data.

Data encoded with the WD stereotype contains one or more sections of the format:

<label>:<value>

If more than one section is present, every section MUST be separated by a single space character. The following sections are currently defined:

Label Value
T Temperature [degrees Celsius]
H Relative Humidity [percentage]
LP Local Pressure [mbar]
SP Sea-Level Pressure [mbar]
A Altitude [meters above sea-level]
LX Illuminance [lux]
LU Illuminance [0 (total dark) - 1023 (max light)]

Labels MUST be all upper-case.

RD - Device status

The RD stereotype provides status information of a relay or simple device.

Data encoded with the RD stereotype is a single string according to the following table:

String Meaning
ON Device is on
OFF Device is off
UNK Device state is unknown

The string MUST be all upper-case.

CR - Controlled Relay Status

The CR stereotype provides status information of a relay or simple device that can either be controlled automatically or manually.

Data encoded with the CR stereotype contains exactly two sections of the format:

<label>:<value>

The two sections MUST be separated by a single space character. The two sections are defined as follows:

Label Meaning Values
S Device Status ON: Device is on
OFF: Device is off
C Control Mode AUT: Device is under automatic control
MAN: Device is under manual control

Labels and values MUST be all upper-case. The two sections can appear in any order, but S SHOULD come first.

MD - Motion Detection Status

The MD stereotype provides status information of a motion-detecting device. Transducers using this stereotype will usually be sensors providing change notifications.

Data encoded with the MD stereotype is a single string according to the following table:

String Meaning
MOTION Motion detected
NO_MOTION No motion detected

The string MUST be all upper-case.

⚠️ **GitHub.com Fallback** ⚠️