idnits 2.17.1
draft-ietf-core-senml-10.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
== There are 4 instances of lines with non-RFC2606-compliant FQDNs in the
document.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
-- The document date (July 3, 2017) is 2489 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
-- Possible downref: Non-RFC (?) normative reference: ref. 'BIPM'
-- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE.754.1985'
-- Possible downref: Non-RFC (?) normative reference: ref. 'NIST811'
** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126)
** Obsolete normative reference: RFC 7049 (Obsoleted by RFC 8949)
** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259)
== Outdated reference: A later version (-05) exists of
draft-arkko-core-dev-urn-03
== Outdated reference: A later version (-11) exists of
draft-greevenbosch-appsawg-cbor-cddl-10
== Outdated reference: A later version (-10) exists of
draft-ietf-core-links-json-08
-- Obsolete informational reference (is this intentional?): RFC 2141
(Obsoleted by RFC 8141)
Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 5 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 Network Working Group C. Jennings
3 Internet-Draft Cisco
4 Intended status: Standards Track Z. Shelby
5 Expires: January 4, 2018 ARM
6 J. Arkko
7 A. Keranen
8 Ericsson
9 C. Bormann
10 Universitaet Bremen TZI
11 July 3, 2017
13 Media Types for Sensor Measurement Lists (SenML)
14 draft-ietf-core-senml-10
16 Abstract
18 This specification defines media types for representing simple sensor
19 measurements and device parameters in the Sensor Measurement Lists
20 (SenML). Representations are defined in JavaScript Object Notation
21 (JSON), Concise Binary Object Representation (CBOR), eXtensible
22 Markup Language (XML), and Efficient XML Interchange (EXI), which
23 share the common SenML data model. A simple sensor, such as a
24 temperature sensor, could use this media type in protocols such as
25 HTTP or CoAP to transport the measurements of the sensor or to be
26 configured.
28 Status of This Memo
30 This Internet-Draft is submitted in full conformance with the
31 provisions of BCP 78 and BCP 79.
33 Internet-Drafts are working documents of the Internet Engineering
34 Task Force (IETF). Note that other groups may also distribute
35 working documents as Internet-Drafts. The list of current Internet-
36 Drafts is at http://datatracker.ietf.org/drafts/current/.
38 Internet-Drafts are draft documents valid for a maximum of six months
39 and may be updated, replaced, or obsoleted by other documents at any
40 time. It is inappropriate to use Internet-Drafts as reference
41 material or to cite them other than as "work in progress."
43 This Internet-Draft will expire on January 4, 2018.
45 Copyright Notice
47 Copyright (c) 2017 IETF Trust and the persons identified as the
48 document authors. All rights reserved.
50 This document is subject to BCP 78 and the IETF Trust's Legal
51 Provisions Relating to IETF Documents
52 (http://trustee.ietf.org/license-info) in effect on the date of
53 publication of this document. Please review these documents
54 carefully, as they describe your rights and restrictions with respect
55 to this document. Code Components extracted from this document must
56 include Simplified BSD License text as described in Section 4.e of
57 the Trust Legal Provisions and are provided without warranty as
58 described in the Simplified BSD License.
60 Table of Contents
62 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3
63 2. Requirements and Design Goals . . . . . . . . . . . . . . . . 4
64 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
65 4. SenML Structure and Semantics . . . . . . . . . . . . . . . . 6
66 4.1. Base Fields . . . . . . . . . . . . . . . . . . . . . . . 6
67 4.2. Regular Fields . . . . . . . . . . . . . . . . . . . . . 6
68 4.3. Considerations . . . . . . . . . . . . . . . . . . . . . 7
69 4.4. Resolved Records . . . . . . . . . . . . . . . . . . . . 8
70 4.5. Associating Meta-data . . . . . . . . . . . . . . . . . . 9
71 4.6. Configuration and Actuation usage . . . . . . . . . . . . 9
72 5. JSON Representation (application/senml+json) . . . . . . . . 9
73 5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10
74 5.1.1. Single Datapoint . . . . . . . . . . . . . . . . . . 11
75 5.1.2. Multiple Datapoints . . . . . . . . . . . . . . . . . 11
76 5.1.3. Multiple Measurements . . . . . . . . . . . . . . . . 12
77 5.1.4. Resolved Data . . . . . . . . . . . . . . . . . . . . 13
78 5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 14
79 5.1.6. Collection of Resources . . . . . . . . . . . . . . . 14
80 5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 14
81 6. CBOR Representation (application/senml+cbor) . . . . . . . . 15
82 7. XML Representation (application/senml+xml) . . . . . . . . . 17
83 8. EXI Representation (application/senml+exi) . . . . . . . . . 19
84 9. Fragment Identification Methods . . . . . . . . . . . . . . . 22
85 9.1. Fragment Identification Examples . . . . . . . . . . . . 22
86 10. Usage Considerations . . . . . . . . . . . . . . . . . . . . 23
87 11. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
88 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
89 12.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 25
90 12.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 28
91 12.3. Media Type Registration . . . . . . . . . . . . . . . . 30
92 12.3.1. senml+json Media Type Registration . . . . . . . . . 30
93 12.3.2. sensml+json Media Type Registration . . . . . . . . 32
94 12.3.3. senml+cbor Media Type Registration . . . . . . . . . 33
95 12.3.4. sensml+cbor Media Type Registration . . . . . . . . 34
96 12.3.5. senml+xml Media Type Registration . . . . . . . . . 35
97 12.3.6. sensml+xml Media Type Registration . . . . . . . . . 37
98 12.3.7. senml+exi Media Type Registration . . . . . . . . . 38
99 12.3.8. sensml+exi Media Type Registration . . . . . . . . . 39
100 12.4. XML Namespace Registration . . . . . . . . . . . . . . . 41
101 12.5. CoAP Content-Format Registration . . . . . . . . . . . . 41
102 13. Security Considerations . . . . . . . . . . . . . . . . . . . 41
103 14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 41
104 15. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 42
105 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 42
106 16.1. Normative References . . . . . . . . . . . . . . . . . . 42
107 16.2. Informative References . . . . . . . . . . . . . . . . . 43
108 Appendix A. Links Extension . . . . . . . . . . . . . . . . . . 45
109 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 45
111 1. Overview
113 Connecting sensors to the Internet is not new, and there have been
114 many protocols designed to facilitate it. This specification defines
115 new media types for carrying simple sensor information in a protocol
116 such as HTTP or CoAP. This format was designed so that processors
117 with very limited capabilities could easily encode a sensor
118 measurement into the media type, while at the same time a server
119 parsing the data could relatively efficiently collect a large number
120 of sensor measurements. SenML can be used for a variety of data flow
121 models, most notably data feeds pushed from a sensor to a collector,
122 and the web resource model where the sensor is requested as a
123 resource representation (e.g., "GET /sensor/temperature").
125 There are many types of more complex measurements and measurements
126 that this media type would not be suitable for. SenML strikes a
127 balance between having some information about the sensor carried with
128 the sensor data so that the data is self describing but it also tries
129 to make that a fairly minimal set of auxiliary information for
130 efficiency reason. Other information about the sensor can be
131 discovered by other methods such as using the CoRE Link Format
132 [RFC6690].
134 SenML is defined by a data model for measurements and simple meta-
135 data about measurements and devices. The data is structured as a
136 single array that contains a series of SenML Records which can each
137 contain fields such as an unique identifier for the sensor, the time
138 the measurement was made, the unit the measurement is in, and the
139 current value of the sensor. Serializations for this data model are
140 defined for JSON [RFC7159], CBOR [RFC7049], XML, and Efficient XML
141 Interchange (EXI) [W3C.REC-exi-20140211].
143 For example, the following shows a measurement from a temperature
144 gauge encoded in the JSON syntax.
146 [
147 {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1}
148 ]
150 In the example above, the array has a single SenML Record with a
151 measurement for a sensor named "urn:dev:ow:10e2073a01080063" with a
152 current value of 23.1 degrees Celsius.
154 2. Requirements and Design Goals
156 The design goal is to be able to send simple sensor measurements in
157 small packets on mesh networks from large numbers of constrained
158 devices. Keeping the total size of payload under 80 bytes makes this
159 easy to use on a wireless mesh network. It is always difficult to
160 define what small code is, but there is a desire to be able to
161 implement this in roughly 1 KB of flash on a 8 bit microprocessor.
162 Experience with power meters and other large scale deployments has
163 indicated that the solution needs to support allowing multiple
164 measurements to be batched into a single HTTP or CoAP request. This
165 "batch" upload capability allows the server side to efficiently
166 support a large number of devices. It also conveniently supports
167 batch transfers from proxies and storage devices, even in situations
168 where the sensor itself sends just a single data item at a time. The
169 multiple measurements could be from multiple related sensors or from
170 the same sensor but at different times.
172 The basic design is an array with a series of measurements. The
173 following example shows two measurements made at different times.
174 The value of a measurement is given by the "v" field, the time of a
175 measurement is in the "t" field, the "n" field has a unique sensor
176 name, and the unit of the measurement is carried in the "u" field.
178 [
179 {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,
180 "v":23.5},
181 {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020091e+09,
182 "v":23.6}
183 ]
185 To keep the messages small, it does not make sense to repeat the "n"
186 field in each SenML Record so there is a concept of a Base Name which
187 is simply a string that is prepended to the Name field of all
188 elements in that record and any records that follow it. So a more
189 compact form of the example above is the following.
191 [
192 {"bn":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,
193 "v":23.5},
194 {"u":"Cel","t":1.276020091e+09,
195 "v":23.6}
196 ]
198 In the above example the Base Name is in the "bn" field and the "n"
199 fields in each Record are the empty string so they are omitted.
201 Some devices have accurate time while others do not so SenML supports
202 absolute and relative times. Time is represented in floating point
203 as seconds and values greater than zero represent an absolute time
204 relative to the Unix epoch while values of 0 or less represent a
205 relative time in the past from the current time. A simple sensor
206 with no absolute wall clock time might take a measurement every
207 second, batch up 60 of them, and then send the batch to a server. It
208 would include the relative time each measurement was made compared to
209 the time the batch was sent in each SenML Record. The server might
210 have accurate NTP time and use the time it received the data, and the
211 relative offset, to replace the times in the SenML with absolute
212 times before saving the SenML Pack in a document database.
214 3. Terminology
216 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
217 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
218 "OPTIONAL" in this document are to be interpreted as described in
219 [RFC2119].
221 This document also uses the following terms:
223 SenML Record: One measurement or configuration instance in time
224 presented using the SenML data model.
226 SenML Pack: One or more SenML Records in an array structure.
228 SenML Label: A short name used in SenML Records to denote different
229 SenML fields (e.g., "v" for "value").
231 SenML Field: A component of a record that associates a value to a
232 SenML Label for this record.
234 This document uses the terms "attribute" and "tag" where they occur
235 with the underlying technologies (XML, CBOR [RFC7049], and Link
236 Format [RFC6690]), not for SenML concepts per se. Note that
237 "attribute" has been widely used previously as a synonym for SenML
238 "field", though.
240 4. SenML Structure and Semantics
242 Each SenML Pack carries a single array that represents a set of
243 measurements and/or parameters. This array contains a series of
244 SenML Records with several fields described below. There are two
245 kinds of fields: base and regular. The base fields can be included
246 in any SenML Record and they apply to the entries in the Record.
247 Each base field also applies to all Records after it up to, but not
248 including, the next Record that has that same base field. All base
249 fields are optional. Regular fields can be included in any SenML
250 Record and apply only to that Record.
252 4.1. Base Fields
254 Base Name: This is a string that is prepended to the names found in
255 the entries.
257 Base Time: A base time that is added to the time found in an entry.
259 Base Unit: A base unit that is assumed for all entries, unless
260 otherwise indicated. If a record does not contain a Unit value,
261 then the Base Unit is used. Otherwise the value found in the Unit
262 (if any) is used.
264 Base Value: A base value is added to the value found in an entry,
265 similar to Base Time.
267 Base Sum: A base sum is added to the sum found in an entry, similar
268 to Base Time.
270 Version: Version number of media type format. This field is an
271 optional positive integer and defaults to 5 if not present. [RFC
272 Editor: change the default value to 10 when this specification is
273 published as an RFC and remove this note]
275 4.2. Regular Fields
277 Name: Name of the sensor or parameter. When appended to the Base
278 Name field, this must result in a globally unique identifier for
279 the resource. The name is optional, if the Base Name is present.
280 If the name is missing, Base Name must uniquely identify the
281 resource. This can be used to represent a large array of
282 measurements from the same sensor without having to repeat its
283 identifier on every measurement.
285 Unit: Units for a measurement value. Optional.
287 Value: Value of the entry. Optional if a Sum value is present,
288 otherwise required. Values are represented using basic data
289 types. This specification defines floating point numbers ("v"
290 field for "Value"), booleans ("vb" for "Boolean Value"), strings
291 ("vs" for "String Value") and binary data ("vd" for "Data Value").
292 Exactly one value field MUST appear unless there is Sum field in
293 which case it is allowed to have no Value field.
295 Sum: Integrated sum of the values over time. Optional. This field
296 is in the units specified in the Unit value multiplied by seconds.
298 Time: Time when value was recorded. Optional.
300 Update Time: An optional time in seconds that represents the maximum
301 time before this sensor will provide an updated reading for a
302 measurement. This can be used to detect the failure of sensors or
303 communications path from the sensor.
305 4.3. Considerations
307 The SenML format can be extended with further custom fields. Both
308 new base and regular fields are allowed. See Section 12.2 for
309 details. Implementations MUST ignore fields they don't recognize
310 unless that field has a label name that ends with the '_' character
311 in which case an error MUST be generated.
313 All SenML Records in a Pack MUST have the same version number. This
314 is typically done by adding a Base Version field to only the first
315 Record in the Pack.
317 Systems reading one of the objects MUST check for the Version field.
318 If this value is a version number larger than the version which the
319 system understands, the system SHOULD NOT use this object. This
320 allows the version number to indicate that the object contains
321 mandatory to understand fields. New version numbers can only be
322 defined in an RFC that updates this specification or it successors.
324 The Name value is concatenated to the Base Name value to get the name
325 of the sensor. The resulting name needs to uniquely identify and
326 differentiate the sensor from all others. It is RECOMMENDED that the
327 full names are represented as URIs [RFC3986] or URNs [RFC2141]. One
328 way to create a unique name is to include some bit string that has
329 guaranteed uniqueness (such as a 1-wire address) that is assigned to
330 the device. Some of the examples in this draft use the device URN
331 type as specified in [I-D.arkko-core-dev-urn]. UUIDs [RFC4122] are
332 another way to generate a unique name. Note that long-term stable
333 unique identifiers are problematic for privacy reasons and should be
334 used with care or avoided as described in [RFC7721].
336 The resulting concatenated name MUST consist only of characters out
337 of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", or
338 "_" and it MUST start with a character out of the set "A" to "Z", "a"
339 to "z", or "0" to "9". This restricted character set was chosen so
340 that these names can be directly used as in other types of URI
341 including segments of an HTTP path with no special encoding and can
342 be directly used in many databases and analytic systems. [RFC5952]
343 contains advice on encoding an IPv6 address in a name.
345 If the Record has no Unit, the Base Unit is used as the Unit. Having
346 no Unit and no Base Unit is allowed.
348 If either the Base Time or Time value is missing, the missing field
349 is considered to have a value of zero. The Base Time and Time values
350 are added together to get the time of measurement. A time of zero
351 indicates that the sensor does not know the absolute time and the
352 measurement was made roughly "now". A negative value is used to
353 indicate seconds in the past from roughly "now". A positive value is
354 used to indicate the number of seconds, excluding leap seconds, since
355 the start of the year 1970 in UTC.
357 If only one of the Base Sum or Sum value is present, the missing
358 field is considered to have a value of zero. The Base Sum and Sum
359 values are added together to get the sum of measurement. If neither
360 the Base Sum or Sum are present, then the measurement does not have a
361 sum value.
363 If the Base Value or Value is not present, the missing field(s) are
364 considered to have a value of zero. The Base Value and Value are
365 added together to get the value of the measurement.
367 Representing the statistical characteristics of measurements, such as
368 accuracy, can be very complex. Future specification may add new
369 fields to provide better information about the statistical properties
370 of the measurement.
372 4.4. Resolved Records
374 Sometimes it is useful to be able to refer to a defined normalized
375 format for SenML records. This normalized format tends to get used
376 for big data applications and intermediate forms when converting to
377 other formats.
379 A SenML Record is referred to as "resolved" if it does not contain
380 any base values and has no relative times, but the base values of the
381 SenML Pack (if any) are applied to the Record. That is, name and
382 base name are concatenated, base time is added to the time of the
383 Record, if the Record did not contain Unit the Base Unit is applied
384 to the record, etc. In addition the records need to be in
385 chronological order. An example of this is show in Section 5.1.4.
387 Future specification that defines new base fields need to specify how
388 the field is resolved.
390 4.5. Associating Meta-data
392 SenML is designed to carry the minimum dynamic information about
393 measurements, and for efficiency reasons does not carry significant
394 static meta-data about the device, object or sensors. Instead, it is
395 assumed that this meta-data is carried out of band. For web
396 resources using SenML Packs, this meta-data can be made available
397 using the CoRE Link Format [RFC6690]. The most obvious use of this
398 link format is to describe that a resource is available in a SenML
399 format in the first place. The relevant media type indicator is
400 included in the Content-Type (ct=) link attribute (which is defined
401 for the Link Format in Section 7.2.1 of [RFC7252]).
403 4.6. Configuration and Actuation usage
405 SenML can also be used for configuring parameters and controlling
406 actuators. When a SenML Pack is sent (e.g., using a HTTP/CoAP POST
407 or PUT method) and the semantics of the target are such that SenML is
408 interpreted as configuration/actuation, SenML Records are interpreted
409 as a request to change the values of given (sub)resources (given as
410 names) to given values at the given time(s).
412 5. JSON Representation (application/senml+json)
414 For the SenML fields shown in Table 1, the SenML labels are used as
415 the JSON object member names within JSON objects representing the
416 JSON SenML Records.
418 +---------------+-------+---------+
419 | Name | label | Type |
420 +---------------+-------+---------+
421 | Base Name | bn | String |
422 | Base Time | bt | Number |
423 | Base Unit | bu | String |
424 | Base Value | bv | Number |
425 | Base Sum | bs | Number |
426 | Version | bver | Number |
427 | Name | n | String |
428 | Unit | u | String |
429 | Value | v | Number |
430 | String Value | vs | String |
431 | Boolean Value | vb | Boolean |
432 | Data Value | vd | String |
433 | Value Sum | s | Number |
434 | Time | t | Number |
435 | Update Time | ut | Number |
436 | Link | l | String |
437 +---------------+-------+---------+
439 Table 1: JSON SenML Labels
441 The root JSON value consists of an array with one JSON object for
442 each SenML Record. All the fields in the above table MAY occur in
443 the records with member values of the type specified in the table.
445 Only the UTF-8 form of JSON is allowed. Characters in the String
446 Value are encoded using the escape sequences defined in [RFC7159].
447 Octets in the Data Value are base64 encoded with URL safe alphabet as
448 defined in Section 5 of [RFC4648], with padding omitted.
450 Systems receiving measurements MUST be able to process the range of
451 floating point numbers that are representable as an IEEE double
452 precision floating point numbers [IEEE.754.1985]. The number of
453 significant digits in any measurement is not relevant, so a reading
454 of 1.1 has exactly the same semantic meaning as 1.10. If the value
455 has an exponent, the "e" MUST be in lower case. The mantissa SHOULD
456 be less than 19 characters long and the exponent SHOULD be less than
457 5 characters long. This allows time values to have better than micro
458 second precision over the next 100 years.
460 5.1. Examples
461 5.1.1. Single Datapoint
463 The following shows a temperature reading taken approximately "now"
464 by a 1-wire sensor device that was assigned the unique 1-wire address
465 of 10e2073a01080063:
467 [
468 {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1}
469 ]
471 5.1.2. Multiple Datapoints
473 The following example shows voltage and current now, i.e., at an
474 unspecified time.
476 [
477 {"bn":"urn:dev:ow:10e2073a01080063:","n":"voltage","u":"V","v":120.1},
478 {"n":"current","u":"A","v":1.2}
479 ]
481 The next example is similar to the above one, but shows current at
482 Tue Jun 8 18:01:16.001 UTC 2010 and at each second for the previous 5
483 seconds.
485 [
486 {"bn":"urn:dev:ow:10e2073a0108006:","bt":1.276020076001e+09,
487 "bu":"A","bver":5,
488 "n":"voltage","u":"V","v":120.1},
489 {"n":"current","t":-5,"v":1.2},
490 {"n":"current","t":-4,"v":1.3},
491 {"n":"current","t":-3,"v":1.4},
492 {"n":"current","t":-2,"v":1.5},
493 {"n":"current","t":-1,"v":1.6},
494 {"n":"current","v":1.7}
495 ]
497 Note that in some usage scenarios of SenML the implementations MAY
498 store or transmit SenML in a stream-like fashion, where data is
499 collected over time and continuously added to the object. This mode
500 of operation is optional, but systems or protocols using SenML in
501 this fashion MUST specify that they are doing this. SenML defines a
502 separate media type to indicate Sensor Streaming Measurement Lists
503 (SensML) for this usage (see Section 12.3.1). In this situation the
504 SensML stream can be sent and received in a partial fashion, i.e., a
505 measurement entry can be read as soon as the SenML Record is received
506 and not have to wait for the full SensML Stream to be complete.
508 For instance, the following stream of measurements may be sent via a
509 long lived HTTP POST from the producer of a SensML to the consumer of
510 that, and each measurement object may be reported at the time it was
511 measured:
513 [
514 {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,
515 "bu":"%RH","v":21.2},
516 {"t":10,"v":21.3},
517 {"t":20,"v":21.4},
518 {"t":30,"v":21.4},
519 {"t":40,"v":21.5},
520 {"t":50,"v":21.5},
521 {"t":60,"v":21.5},
522 {"t":70,"v":21.6},
523 {"t":80,"v":21.7},
524 ...
526 5.1.3. Multiple Measurements
528 The following example shows humidity measurements from a mobile
529 device with a 1-wire address 10e2073a01080063, starting at Mon Oct 31
530 13:24:24 UTC 2011. The device also provides position data, which is
531 provided in the same measurement or parameter array as separate
532 entries. Note time is used to for correlating data that belongs
533 together, e.g., a measurement and a parameter associated with it.
534 Finally, the device also reports extra data about its battery status
535 at a separate time.
537 [
538 {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,
539 "bu":"%RH","v":20},
540 {"u":"lon","v":24.30621},
541 {"u":"lat","v":60.07965},
542 {"t":60,"v":20.3},
543 {"u":"lon","t":60,"v":24.30622},
544 {"u":"lat","t":60,"v":60.07965},
545 {"t":120,"v":20.7},
546 {"u":"lon","t":120,"v":24.30623},
547 {"u":"lat","t":120,"v":60.07966},
548 {"u":"%EL","t":150,"v":98},
549 {"t":180,"v":21.2},
550 {"u":"lon","t":180,"v":24.30628},
551 {"u":"lat","t":180,"v":60.07967}
552 ]
554 The size of this example represented in various forms, as well as
555 that form compressed with gzip is given in the following table.
557 +----------+------+-----------------+
558 | Encoding | Size | Compressed Size |
559 +----------+------+-----------------+
560 | JSON | 573 | 206 |
561 | XML | 649 | 235 |
562 | CBOR | 254 | 196 |
563 | EXI | 162 | 185 |
564 +----------+------+-----------------+
566 Table 2: Size Comparisons
568 5.1.4. Resolved Data
570 The following shows the example from the previous section show in
571 resolved format.
573 [
574 {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067464e+09,
575 "v":20},
576 {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067464e+09,
577 "v":24.30621},
578 {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067464e+09,
579 "v":60.07965},
580 {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067524e+09,
581 "v":20.3},
582 {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067524e+09,
583 "v":24.30622},
584 {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067524e+09,
585 "v":60.07965},
586 {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067584e+09,
587 "v":20.7},
588 {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067584e+09,
589 "v":24.30623},
590 {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067584e+09,
591 "v":60.07966},
592 {"n":"urn:dev:ow:10e2073a01080063","u":"%EL","t":1.320067614e+09,
593 "v":98},
594 {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067644e+09,
595 "v":21.2},
596 {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067644e+09,
597 "v":24.30628},
598 {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067644e+09,
599 "v":60.07967}
600 ]
602 5.1.5. Multiple Data Types
604 The following example shows a sensor that returns different data
605 types.
607 [
608 {"bn":"urn:dev:ow:10e2073a01080063:","n":"temp","u":"Cel","v":23.1},
609 {"n":"label","vs":"Machine Room"},
610 {"n":"open","vb":false},
611 {"n":"nfv-reader","vd":"aGkgCg"}
612 ]
614 5.1.6. Collection of Resources
616 The following example shows the results from a query to one device
617 that aggregates multiple measurements from another devices. The
618 example assumes that a client has fetched information from a device
619 at 2001:db8::2 by performing a GET operation on http://[2001:db8::2]
620 at Mon Oct 31 16:27:09 UTC 2011, and has gotten two separate values
621 as a result, a temperature and humidity measurement as well as the
622 results from another device at http://[2001:db8::1] that also had a
623 temperature and humidity. Note that the last record would use the
624 Base Name from the 3rd record but the Base Time from the first
625 record.
627 [
628 {"bn":"2001:db8::2/","bt":1.320078429e+09,
629 "n":"temperature","u":"Cel","v":25.2},
630 {"n":"humidity","u":"%RH","v":30},
631 {"bn":"2001:db8::1/","n":"temperature","u":"Cel","v":12.3},
632 {"n":"humidity","u":"%RH","v":67}
633 ]
635 5.1.7. Setting an Actuator
637 The following example show the SenML that could be used to set the
638 current set point of a typical residential thermostat which has a
639 temperature set point, a switch to turn on and off the heat, and a
640 switch to turn on the fan override.
642 [
643 {"bn":"urn:dev:ow:10e2073a01080063:"},
644 {"n":"temp","u":"Cel","v":23.1},
645 {"n":"heat","u":"/","v":1},
646 {"n":"fan","u":"/","v":0}
647 ]
648 In the following example two different lights are turned on. It is
649 assumed that the lights are on a network that can guarantee delivery
650 of the messages to the two lights within 15 ms (e.g. a network using
651 802.1BA [IEEE802.1ba-2011] and 802.1AS [IEEE802.1as-2011] for time
652 synchronization). The controller has set the time of the lights
653 coming on to 20 ms in the future from the current time. This allows
654 both lights to receive the message, wait till that time, then apply
655 the switch command so that both lights come on at the same time.
657 [
658 {"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":1},
659 {"n":"2001:db8::4","v":1}
660 ]
662 The following shows two lights being turned off using a non
663 deterministic network that has a high odds of delivering a message in
664 less than 100 ms and uses NTP for time synchronization. The current
665 time is 1320078429. The user has just turned off a light switch
666 which is turning off two lights. Both lights are dimmed to 50%
667 brightness immediately to give the user instant feedback that
668 something is changing. However given the network, the lights will
669 probably dim at somewhat different times. Then 100 ms in the future,
670 both lights will go off at the same time. The instant but not
671 synchronized dimming gives the user the sensation of quick responses
672 and the timed off 100 ms in the future gives the perception of both
673 lights going off at the same time.
675 [
676 {"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":0.5},
677 {"n":"2001:db8::4","v":0.5},
678 {"n":"2001:db8::3","t":0.1,"v":0},
679 {"n":"2001:db8::4","t":0.1,"v":0}
680 ]
682 6. CBOR Representation (application/senml+cbor)
684 The CBOR [RFC7049] representation is equivalent to the JSON
685 representation, with the following changes:
687 o For JSON Numbers, the CBOR representation can use integers,
688 floating point numbers, or decimal fractions (CBOR Tag 4); however
689 a representation SHOULD be chosen such that when the CBOR value is
690 converted back to an IEEE double precision floating point value,
691 it has exactly the same value as the original Number. For the
692 version number, only an unsigned integer is allowed.
694 o Characters in the String Value are encoded using a definite length
695 text string (type 3). Octets in the Data Value are encoded using
696 a definite length byte string (type 2).
698 o For compactness, the CBOR representation uses integers for the
699 labels, as defined in Table 3. This table is conclusive, i.e.,
700 there is no intention to define any additional integer map keys;
701 any extensions will use string map keys. This allows translators
702 converting between CBOR and JSON representations to convert also
703 all future labels without needing to update implementations.
705 +---------------+-------+------------+
706 | Name | Label | CBOR Label |
707 +---------------+-------+------------+
708 | Version | bver | -1 |
709 | Base Name | bn | -2 |
710 | Base Time | bt | -3 |
711 | Base Units | bu | -4 |
712 | Base Value | bv | -5 |
713 | Base Sum | bs | -6 |
714 | Name | n | 0 |
715 | Units | u | 1 |
716 | Value | v | 2 |
717 | String Value | vs | 3 |
718 | Boolean Value | vb | 4 |
719 | Value Sum | s | 5 |
720 | Time | t | 6 |
721 | Update Time | ut | 7 |
722 | Data Value | vd | 8 |
723 | Link | l | 9 |
724 +---------------+-------+------------+
726 Table 3: CBOR representation: integers for map keys
728 o For streaming SensML in CBOR representation, the array containing
729 the records SHOULD be a CBOR indefinite length array while for
730 non-streaming SenML, a definite length array MUST be used.
732 The following example shows a dump of the CBOR example for the same
733 sensor measurement as in Section 5.1.2.
735 0000 87 a7 21 78 1b 75 72 6e 3a 64 65 76 3a 6f 77 3a |..!x.urn:dev:ow:|
736 0010 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 3a |10e2073a0108006:|
737 0020 22 fb 41 d3 03 a1 5b 00 10 62 23 61 41 20 05 00 |".A...[..b#aA ..|
738 0030 67 76 6f 6c 74 61 67 65 01 61 56 02 fb 40 5e 06 |gvoltage.aV..@^.|
739 0040 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e 74 06 |fffff..gcurrent.|
740 0050 24 02 fb 3f f3 33 33 33 33 33 33 a3 00 67 63 75 |$..?.333333..gcu|
741 0060 72 72 65 6e 74 06 23 02 fb 3f f4 cc cc cc cc cc |rrent.#..?......|
742 0070 cd a3 00 67 63 75 72 72 65 6e 74 06 22 02 fb 3f |...gcurrent."..?|
743 0080 f6 66 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e |.ffffff..gcurren|
744 0090 74 06 21 02 f9 3e 00 a3 00 67 63 75 72 72 65 6e |t.!..>...gcurren|
745 00a0 74 06 20 02 fb 3f f9 99 99 99 99 99 9a a3 00 67 |t. ..?.........g|
746 00b0 63 75 72 72 65 6e 74 06 00 02 fb 3f fb 33 33 33 |current....?.333|
747 00c0 33 33 33 |333|
748 00c3
750 7. XML Representation (application/senml+xml)
752 A SenML Pack or Stream can also be represented in XML format as
753 defined in this section.
755 Only the UTF-8 form of XML is allowed. Characters in the String
756 Value are encoded using the escape sequences defined in [RFC7159].
757 Octets in the Data Value are base64 encoded with URL safe alphabet as
758 defined in Section 5 of [RFC4648].
760 The following example shows an XML example for the same sensor
761 measurement as in Section 5.1.2.
763
764
766
767
768
769
770
771
772
774 The SenML Stream is represented as a sensml element that contains a
775 series of senml elements for each SenML Record. The SenML fields are
776 represented as XML attributes. For each field defined in this
777 document, the following table shows the SenML labels, which are used
778 for the XML attribute name, as well as the according restrictions on
779 the XML attribute values ("type") as used in the XML senml elements.
781 +---------------+-------+---------+
782 | Name | Label | Type |
783 +---------------+-------+---------+
784 | Base Name | bn | string |
785 | Base Time | bt | double |
786 | Base Unit | bu | string |
787 | Base Value | bv | double |
788 | Base Sum | bs | double |
789 | Base Version | bver | int |
790 | Name | n | string |
791 | Unit | u | string |
792 | Value | v | double |
793 | String Value | vs | string |
794 | Data Value | vd | string |
795 | Boolean Value | vb | boolean |
796 | Value Sum | s | double |
797 | Time | t | double |
798 | Update Time | ut | double |
799 | Link | l | string |
800 +---------------+-------+---------+
802 Table 4: XML SenML Labels
804 The RelaxNG schema for the XML is:
806 default namespace = "urn:ietf:params:xml:ns:senml"
807 namespace rng = "http://relaxng.org/ns/structure/1.0"
809 senml = element senml {
810 attribute bn { xsd:string }?,
811 attribute bt { xsd:double }?,
812 attribute bv { xsd:double }?,
813 attribute bs { xsd:double }?,
814 attribute bu { xsd:string }?,
815 attribute bver { xsd:int }?,
817 attribute l { xsd:string }?,
819 attribute n { xsd:string }?,
820 attribute s { xsd:double }?,
821 attribute t { xsd:double }?,
822 attribute u { xsd:string }?,
823 attribute ut { xsd:double }?,
825 attribute v { xsd:double }?,
826 attribute vb { xsd:boolean }?,
827 attribute vs { xsd:string }?,
828 attribute vd { xsd:string }?
829 }
831 sensml =
832 element sensml {
833 senml+
834 }
836 start = sensml
838 8. EXI Representation (application/senml+exi)
840 For efficient transmission of SenML over e.g. a constrained network,
841 Efficient XML Interchange (EXI) can be used. This encodes the XML
842 Schema structure of SenML into binary tags and values rather than
843 ASCII text. An EXI representation of SenML SHOULD be made using the
844 strict schema-mode of EXI. This mode however does not allow tag
845 extensions to the schema, and therefore any extensions will be lost
846 in the encoding. For uses where extensions need to be preserved in
847 EXI, the non-strict schema mode of EXI MAY be used.
849 The EXI header MUST include an "EXI Options", as defined in
850 [W3C.REC-exi-20140211], with an schemaId set to the value of "a"
851 indicating the schema provided in this specification. Future
852 revisions to the schema can change the value of the schemaId to allow
853 for backwards compatibility. When the data will be transported over
854 CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes
855 things larger and is redundant to information provided in the
856 Content-Type header.
858 The following is the XSD Schema to be used for strict schema guided
859 EXI processing. It is generated from the RelaxNG.
861
862
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
895 The following shows a hexdump of the EXI produced from encoding the
896 following XML example. Note this example is the same information as
897 the first example in Section 5.1.2 in JSON format.
899
900
902
903
905 Which compresses with EXI to the following displayed in hexdump:
907 0000 a0 30 0d 84 80 79 d5 c9 b8 e9 91 95 d8 e9 bd dc |.0...y..........|
908 0010 e8 c4 c1 94 c8 c0 dc cd 84 c0 c4 c0 e0 c0 c0 d8 |................|
909 0020 cc e9 82 5d 9b db 1d 18 59 d9 48 0d 58 ac 42 60 |...]....Y.H.X.B`|
910 0030 18 e1 2c 6e ae 4e 4c ad ce 84 06 82 41 90 0e |..,n.NL.....A..|
911 003f
913 The above example used the bit packed form of EXI but it is also
914 possible to use a byte packed form of EXI which can makes it easier
915 for a simple sensor to produce valid EXI without really implementing
916 EXI. Consider the example of a temperature sensor that produces a
917 value in tenths of degrees Celsius over a range of 0.0 to 55.0. It
918 would produce an XML SenML file such as:
920
921
922
924 The compressed form, using the byte alignment option of EXI, for the
925 above XML is the following:
927 0000 a0 00 48 80 6c 20 01 07 1d 75 72 6e 3a 64 65 76 |..H.l ...urn:dev|
928 0010 3a 6f 77 3a 31 30 65 32 30 37 33 61 30 31 30 38 |:ow:10e2073a0108|
929 0020 30 30 36 33 02 05 43 65 6c 01 00 e7 01 01 00 03 |0063..Cel.......|
930 0030 01 |.|
931 0031
933 A small temperature sensor device that only generates this one EXI
934 file does not really need an full EXI implementation. It can simply
935 hard code the output replacing the 1-wire device ID starting at byte
936 0x20 and going to byte 0x2F with it's device ID, and replacing the
937 value "0xe7 0x01" at location 0x37 and 0x38 with the current
938 temperature. The EXI Specification [W3C.REC-exi-20140211] contains
939 the full information on how floating point numbers are represented,
940 but for the purpose of this sensor, the temperature can be converted
941 to an integer in tenths of degrees (231 in this example). EXI stores
942 7 bits of the integer in each byte with the top bit set to one if
943 there are further bytes. So the first bytes at is set to low 7 bits
944 of the integer temperature in tenths of degrees plus 0x80. In this
945 example 231 & 0x7F + 0x80 = 0xE7. The second byte is set to the
946 integer temperature in tenths of degrees right shifted 7 bits. In
947 this example 231 >> 7 = 0x01.
949 9. Fragment Identification Methods
951 A SenML Pack typically consists of multiple SenML Records and for
952 some applications it may be useful to be able to refer with a
953 Fragment Identifier to a single record, or a set of records, in a
954 Pack. The fragment identifier is only interpreted by a client and
955 does not impact retrieval of a representation. The SenML Fragment
956 Identification is modeled after CSV Fragment Identifiers [RFC7111].
958 To select a single SenML Record, the "rec" scheme followed by a
959 single number is used. For the purpose of numbering records, the
960 first record is at position 1. A range of records can be selected by
961 giving the first and the last record number separated by a '-'
962 character. Instead of the second number, the '*' character can be
963 used to indicate the last SenML Record in the Pack. A set of records
964 can also be selected using a comma separated list of record positions
965 or ranges.
967 (We use the term "selecting a record" for identifying it as part of
968 the fragment, not in the sense of isolating it from the Pack -- the
969 record still needs to be interpreted as part of the Pack, e.g., using
970 the base values defined in earlier records)
972 9.1. Fragment Identification Examples
974 The 3rd SenML Record from "coap://example.com/temp" resource can be
975 selected with:
977 coap://example.com/temp#rec=3
979 Records from 3rd to 6th can be selected with:
981 coap://example.com/temp#rec=3-6
983 Records from 19th to the last can be selected with:
985 coap://example.com/temp#rec=19-*
987 The 3rd and 5th record can be selected with:
989 coap://example.com/temp#rec=3,5
991 To select the Records from third to fifth, the 10th record, and all
992 from 19th to the last:
994 coap://example.com/temp#rec=3-5,10,19-*
996 10. Usage Considerations
998 The measurements support sending both the current value of a sensor
999 as well as the an integrated sum. For many types of measurements,
1000 the sum is more useful than the current value. For example, an
1001 electrical meter that measures the energy a given computer uses will
1002 typically want to measure the cumulative amount of energy used. This
1003 is less prone to error than reporting the power each second and
1004 trying to have something on the server side sum together all the
1005 power measurements. If the network between the sensor and the meter
1006 goes down over some period of time, when it comes back up, the
1007 cumulative sum helps reflect what happened while the network was
1008 down. A meter like this would typically report a measurement with
1009 the units set to watts, but it would put the sum of energy used in
1010 the "s" field of the measurement. It might optionally include the
1011 current power in the "v" field.
1013 While the benefit of using the integrated sum is fairly clear for
1014 measurements like power and energy, it is less obvious for something
1015 like temperature. Reporting the sum of the temperature makes it easy
1016 to compute averages even when the individual temperature values are
1017 not reported frequently enough to compute accurate averages.
1018 Implementors are encouraged to report the cumulative sum as well as
1019 the raw value of a given sensor.
1021 Applications that use the cumulative sum values need to understand
1022 they are very loosely defined by this specification, and depending on
1023 the particular sensor implementation may behave in unexpected ways.
1024 Applications should be able to deal with the following issues:
1026 1. Many sensors will allow the cumulative sums to "wrap" back to
1027 zero after the value gets sufficiently large.
1029 2. Some sensors will reset the cumulative sum back to zero when the
1030 device is reset, loses power, or is replaced with a different
1031 sensor.
1033 3. Applications cannot make assumptions about when the device
1034 started accumulating values into the sum.
1036 Typically applications can make some assumptions about specific
1037 sensors that will allow them to deal with these problems. A common
1038 assumption is that for sensors whose measurement values are always
1039 positive, the sum should never get smaller; so if the sum does get
1040 smaller, the application will know that one of the situations listed
1041 above has happened.
1043 11. CDDL
1045 For reference, the JSON and CBOR representations can be described
1046 with the common CDDL [I-D.greevenbosch-appsawg-cbor-cddl]
1047 specification in Figure 1.
1049 SenML-Pack = [1* record]
1051 record = {
1052 ? bn => tstr, ; Base Name
1053 ? bt => numeric, ; Base Time
1054 ? bu => tstr, ; Base Units
1055 ? bv => numeric, ; Base Value
1056 ? bs => numeric, ; Base Sum
1057 ? bver => uint, ; Base Version
1058 ? n => tstr, ; Name
1059 ? u => tstr, ; Units
1060 ? s => numeric, ; Value Sum
1061 ? t => numeric, ; Time
1062 ? ut => numeric, ; Update Time
1063 ? l => tstr, ; Link
1064 ? ( v => numeric // ; Numeric Value
1065 vs => tstr // ; String Value
1066 vb => bool // ; Boolean Value
1067 vd => binary-value ) ; Data Value
1068 * key-value-pair
1069 }
1071 ; now define the generic versions
1072 key-value-pair = ( label => value )
1074 label = non-b-label / b-label
1075 non-b-label = tstr .regexp "[A-Zac-z0-9][-_:.A-Za-z0-9]*" / uint
1076 b-label = tstr .regexp "b[-_:.A-Za-z0-9]+" / nint
1078 value = tstr / binary-value / numeric / bool
1079 numeric = number / decfrac
1081 Figure 1: Common CDDL specification for CBOR and JSON SenML
1083 For JSON, we use text labels and base64url-encoded binary data
1084 (Figure 2).
1086 bver = "bver" n = "n" s = "s"
1087 bn = "bn" u = "u" t = "t"
1088 bt = "bt" v = "v" ut = "ut"
1089 bu = "bu" vs = "vs" vd = "vd"
1090 bv = "bv" vb = "vb" l = "l"
1091 bs = "bs"
1093 binary-value = tstr ; base64url encoded
1095 Figure 2: JSON-specific CDDL specification for SenML
1097 For CBOR, we use integer labels and native binary data (Figure 3).
1099 bver = -1 n = 0 s = 5
1100 bn = -2 u = 1 t = 6
1101 bt = -3 v = 2 ut = 7
1102 bu = -4 vs = 3 vd = 8
1103 bv = -5 vb = 4 l = 9
1104 bs = -6
1106 binary-value = bstr
1108 Figure 3: CBOR-specific CDDL specification for SenML
1110 12. IANA Considerations
1112 Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with
1113 the RFC number of this specification.
1115 12.1. Units Registry
1117 IANA will create a registry of SenML unit symbols. The primary
1118 purpose of this registry is to make sure that symbols uniquely map to
1119 give type of measurement. Definitions for many of these units can be
1120 found in location such as [NIST811] and [BIPM]. Units marked with an
1121 asterisk are NOT RECOMMENDED to be produced by new implementations,
1122 but are in active use and SHOULD be implemented by consumers that can
1123 use the related base units.
1125 +----------+------------------------------------+-------+-----------+
1126 | Symbol | Description | Type | Reference |
1127 +----------+------------------------------------+-------+-----------+
1128 | m | meter | float | RFC-AAAA |
1129 | kg | kilogram | float | RFC-AAAA |
1130 | g | gram* | float | RFC-AAAA |
1131 | s | second | float | RFC-AAAA |
1132 | A | ampere | float | RFC-AAAA |
1133 | K | kelvin | float | RFC-AAAA |
1134 | cd | candela | float | RFC-AAAA |
1135 | mol | mole | float | RFC-AAAA |
1136 | Hz | hertz | float | RFC-AAAA |
1137 | rad | radian | float | RFC-AAAA |
1138 | sr | steradian | float | RFC-AAAA |
1139 | N | newton | float | RFC-AAAA |
1140 | Pa | pascal | float | RFC-AAAA |
1141 | J | joule | float | RFC-AAAA |
1142 | W | watt | float | RFC-AAAA |
1143 | C | coulomb | float | RFC-AAAA |
1144 | V | volt | float | RFC-AAAA |
1145 | F | farad | float | RFC-AAAA |
1146 | Ohm | ohm | float | RFC-AAAA |
1147 | S | siemens | float | RFC-AAAA |
1148 | Wb | weber | float | RFC-AAAA |
1149 | T | tesla | float | RFC-AAAA |
1150 | H | henry | float | RFC-AAAA |
1151 | Cel | degrees Celsius | float | RFC-AAAA |
1152 | lm | lumen | float | RFC-AAAA |
1153 | lx | lux | float | RFC-AAAA |
1154 | Bq | becquerel | float | RFC-AAAA |
1155 | Gy | gray | float | RFC-AAAA |
1156 | Sv | sievert | float | RFC-AAAA |
1157 | kat | katal | float | RFC-AAAA |
1158 | m2 | square meter (area) | float | RFC-AAAA |
1159 | m3 | cubic meter (volume) | float | RFC-AAAA |
1160 | l | liter (volume)* | float | RFC-AAAA |
1161 | m/s | meter per second (velocity) | float | RFC-AAAA |
1162 | m/s2 | meter per square second | float | RFC-AAAA |
1163 | | (acceleration) | | |
1164 | m3/s | cubic meter per second (flow rate) | float | RFC-AAAA |
1165 | l/s | liter per second (flow rate)* | float | RFC-AAAA |
1166 | W/m2 | watt per square meter (irradiance) | float | RFC-AAAA |
1167 | cd/m2 | candela per square meter | float | RFC-AAAA |
1168 | | (luminance) | | |
1169 | bit | bit (information content) | float | RFC-AAAA |
1170 | bit/s | bit per second (data rate) | float | RFC-AAAA |
1171 | lat | degrees latitude (note 2) | float | RFC-AAAA |
1172 | lon | degrees longitude (note 2) | float | RFC-AAAA |
1173 | pH | pH value (acidity; logarithmic | float | RFC-AAAA |
1174 | | quantity) | | |
1175 | dB | decibel (logarithmic quantity) | float | RFC-AAAA |
1176 | dBW | decibel relative to 1 W (power | float | RFC-AAAA |
1177 | | level) | | |
1178 | Bspl | bel (sound pressure level; | float | RFC-AAAA |
1179 | | logarithmic quantity)* | | |
1180 | count | 1 (counter value) | float | RFC-AAAA |
1181 | / | 1 (Ratio e.g., value of a switch, | float | RFC-AAAA |
1182 | | note 1) | | |
1183 | % | 1 (Ratio e.g., value of a switch, | float | RFC-AAAA |
1184 | | note 1)* | | |
1185 | %RH | Percentage (Relative Humidity) | float | RFC-AAAA |
1186 | %EL | Percentage (remaining battery | float | RFC-AAAA |
1187 | | energy level) | | |
1188 | EL | seconds (remaining battery energy | float | RFC-AAAA |
1189 | | level) | | |
1190 | 1/s | 1 per second (event rate) | float | RFC-AAAA |
1191 | 1/min | 1 per minute (event rate, "rpm")* | float | RFC-AAAA |
1192 | beat/min | 1 per minute (Heart rate in beats | float | RFC-AAAA |
1193 | | per minute)* | | |
1194 | beats | 1 (Cumulative number of heart | float | RFC-AAAA |
1195 | | beats)* | | |
1196 | S/m | Siemens per meter (conductivity) | float | RFC-AAAA |
1197 +----------+------------------------------------+-------+-----------+
1199 Table 5
1201 o Note 1: A value of 0.0 indicates the switch is off while 1.0
1202 indicates on and 0.5 would be half on. The preferred name of this
1203 unit is "/". For historical reasons, the name "%" is also
1204 provided for the same unit - but note that while that name
1205 strongly suggests a percentage (0..100) -- it is however NOT a
1206 percentage, but the absolute ratio!
1208 o Note 2: Assumed to be in WGS84 unless another reference frame is
1209 known for the sensor.
1211 New entries can be added to the registration by either Expert Review
1212 or IESG Approval as defined in [RFC5226]. Experts should exercise
1213 their own good judgment but need to consider the following
1214 guidelines:
1216 1. There needs to be a real and compelling use for any new unit to
1217 be added.
1219 2. Units should define the semantic information and be chosen
1220 carefully. Implementors need to remember that the same word may
1221 be used in different real-life contexts. For example, degrees
1222 when measuring latitude have no semantic relation to degrees
1223 when measuring temperature; thus two different units are needed.
1225 3. These measurements are produced by computers for consumption by
1226 computers. The principle is that conversion has to be easily be
1227 done when both reading and writing the media type. The value of
1228 a single canonical representation outweighs the convenience of
1229 easy human representations or loss of precision in a conversion.
1231 4. Use of SI prefixes such as "k" before the unit is not
1232 recommended. Instead one can represent the value using
1233 scientific notation such a 1.2e3. The "kg" unit is exception to
1234 this rule since it is an SI base unit; the "g" unit is provided
1235 for legacy compatibility.
1237 5. For a given type of measurement, there will only be one unit
1238 type defined. So for length, meters are defined and other
1239 lengths such as mile, foot, light year are not allowed. For
1240 most cases, the SI unit is preferred.
1242 6. Symbol names that could be easily confused with existing common
1243 units or units combined with prefixes should be avoided. For
1244 example, selecting a unit name of "mph" to indicate something
1245 that had nothing to do with velocity would be a bad choice, as
1246 "mph" is commonly used to mean miles per hour.
1248 7. The following should not be used because the are common SI
1249 prefixes: Y, Z, E, P, T, G, M, k, h, da, d, c, n, u, p, f, a, z,
1250 y, Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi.
1252 8. The following units should not be used as they are commonly used
1253 to represent other measurements Ky, Gal, dyn, etg, P, St, Mx, G,
1254 Oe, Gb, sb, Lmb, mph, Ci, R, RAD, REM, gal, bbl, qt, degF, Cal,
1255 BTU, HP, pH, B/s, psi, Torr, atm, at, bar, kWh.
1257 9. The unit names are case sensitive and the correct case needs to
1258 be used, but symbols that differ only in case should not be
1259 allocated.
1261 10. A number after a unit typically indicates the previous unit
1262 raised to that power, and the / indicates that the units that
1263 follow are the reciprocal. A unit should have only one / in the
1264 name.
1266 11. A good list of common units can be found in the Unified Code for
1267 Units of Measure [UCUM].
1269 12.2. SenML Label Registry
1271 IANA will create a new registry for SenML labels. The initial
1272 content of the registry is:
1274 +---------------+-------+------+----------+----+---------+
1275 | Name | Label | CBOR | XML Type | ID | Note |
1276 +---------------+-------+------+----------+----+---------+
1277 | Base Name | bn | -2 | string | a | RFCXXXX |
1278 | Base Sum | bs | -6 | double | a | RFCXXXX |
1279 | Base Time | bt | -3 | double | a | RFCXXXX |
1280 | Base Unit | bu | -4 | string | a | RFCXXXX |
1281 | Base Value | bv | -5 | double | a | RFCXXXX |
1282 | Base Version | bver | -1 | int | a | RFCXXXX |
1283 | Boolean Value | vb | 4 | boolean | a | RFCXXXX |
1284 | Data Value | vd | 8 | string | a | RFCXXXX |
1285 | Name | n | 0 | string | a | RFCXXXX |
1286 | String Value | vs | 3 | string | a | RFCXXXX |
1287 | Time | t | 6 | double | a | RFCXXXX |
1288 | Unit | u | 1 | string | a | RFCXXXX |
1289 | Update Time | ut | 7 | double | a | RFCXXXX |
1290 | Value | v | 2 | double | a | RFCXXXX |
1291 | Value Sum | s | 5 | double | a | RFCXXXX |
1292 | Link | l | 9 | string | a | RFCXXXX |
1293 +---------------+-------+------+----------+----+---------+
1295 Table 6: SenML Labels
1297 Note to RFC Editor. Please replace RFCXXXX with the number for this
1298 RFC.
1300 All new entries must define the Label Name, Label, and XML Type but
1301 the CBOR labels SHOULD be left empty as CBOR will use the string
1302 encoding for any new labels. The ID fields contains the EXI schemaId
1303 value of the first Schema which includes this label or is empty if
1304 this label was not intended for use with EXI. The Note field SHOULD
1305 contain information about where to find out more information about
1306 this label.
1308 The JSON, CBOR, and EXI types are derived from the XML type. All XML
1309 numeric types such as double, float, integer and int become a JSON
1310 Number. XML boolean and string become a JSON Boolean and String
1311 respectively. CBOR represents numeric values with a CBOR type that
1312 does not loose any information from the JSON value. EXI uses the XML
1313 types.
1315 New entries can be added to the registration by either Expert Review
1316 or IESG Approval as defined in [RFC5226]. Experts should exercise
1317 their own good judgment but need to consider that shorter labels
1318 should have more strict review.
1320 All new SenML labels that have "base" semantics (see Section 4.1)
1321 MUST start with character 'b'. Regular labels MUST NOT start with
1322 that character.
1324 Extensions that add a label that is intended for use with XML need to
1325 create a new RelaxNG scheme that includes all the labels in the IANA
1326 registry.
1328 Extensions that add a label that is intended for use with EXI need to
1329 create a new XSD Schema that includes all the labels in the IANA
1330 registry and then allocate a new EXI schemaId value. Moving to the
1331 next letter in the alphabet is the suggested way to create the new
1332 value for the EXI schemaId. Any labels with previously blank ID
1333 values SHOULD be updated in the IANA table to have their ID set to
1334 this new schemaId value.
1336 Extensions that are mandatory to understand to correctly process the
1337 Pack MUST have a label name that ends with the '_' character.
1339 12.3. Media Type Registration
1341 The following registrations are done following the procedure
1342 specified in [RFC6838] and [RFC7303]. Clipboard formats are defined
1343 for the JSON and XML form of lists but do not make sense for streams
1344 or other formats.
1346 Note to RFC Editor - please remove this paragraph. Note that a
1347 request for media type review for senml+json was sent to the media-
1348 types@iana.org on Sept 21, 2010. A second request for all the types
1349 was sent on October 31, 2016.
1351 12.3.1. senml+json Media Type Registration
1353 Type name: application
1355 Subtype name: senml+json
1357 Required parameters: none
1359 Optional parameters: none
1361 Encoding considerations: Must be encoded as using a subset of the
1362 encoding allowed in [RFC7159]. See RFC-AAAA for details. This
1363 simplifies implementation of very simple system and does not impose
1364 any significant limitations as all this data is meant for machine to
1365 machine communications and is not meant to be human readable.
1367 Security considerations: Sensor data can contain a wide range of
1368 information ranging from information that is very public, such the
1369 outside temperature in a given city, to very private information that
1370 requires integrity and confidentiality protection, such as patient
1371 health information. This format does not provide any security and
1372 instead relies on the transport protocol that carries it to provide
1373 security. Given applications need to look at the overall context of
1374 how this media type will be used to decide if the security is
1375 adequate.
1377 Interoperability considerations: Applications should ignore any JSON
1378 key value pairs that they do not understand. This allows backwards
1379 compatibility extensions to this specification. The "bver" field can
1380 be used to ensure the receiver supports a minimal level of
1381 functionality needed by the creator of the JSON object.
1383 Published specification: RFC-AAAA
1385 Applications that use this media type: The type is used by systems
1386 that report e.g., electrical power usage and environmental
1387 information such as temperature and humidity. It can be used for a
1388 wide range of sensor reporting systems.
1390 Fragment identifier considerations: Fragment identification for
1391 application/senml+json is supported by using fragment identifiers as
1392 specified by RFC-AAAA.
1394 Additional information:
1396 Magic number(s): none
1398 File extension(s): senml
1400 Windows Clipboard Name: "JSON Sensor Measurement List"
1402 Macintosh file type code(s): none
1404 Macintosh Universal Type Identifier code: org.ietf.senml-json
1405 conforms to public.text
1407 Person & email address to contact for further information: Cullen
1408 Jennings
1410 Intended usage: COMMON
1412 Restrictions on usage: None
1414 Author: Cullen Jennings
1415 Change controller: IESG
1417 12.3.2. sensml+json Media Type Registration
1419 Type name: application
1421 Subtype name: sensml+json
1423 Required parameters: none
1425 Optional parameters: none
1427 Encoding considerations: Must be encoded as using a subset of the
1428 encoding allowed in [RFC7159]. See RFC-AAAA for details. This
1429 simplifies implementation of very simple system and does not impose
1430 any significant limitations as all this data is meant for machine to
1431 machine communications and is not meant to be human readable.
1433 Security considerations: Sensor data can contain a wide range of
1434 information ranging from information that is very public, such the
1435 outside temperature in a given city, to very private information that
1436 requires integrity and confidentiality protection, such as patient
1437 health information. This format does not provide any security and
1438 instead relies on the transport protocol that carries it to provide
1439 security. Given applications need to look at the overall context of
1440 how this media type will be used to decide if the security is
1441 adequate.
1443 Interoperability considerations: Applications should ignore any JSON
1444 key value pairs that they do not understand. This allows backwards
1445 compatibility extensions to this specification. The "bver" field can
1446 be used to ensure the receiver supports a minimal level of
1447 functionality needed by the creator of the JSON object.
1449 Published specification: RFC-AAAA
1451 Applications that use this media type: The type is used by systems
1452 that report e.g., electrical power usage and environmental
1453 information such as temperature and humidity. It can be used for a
1454 wide range of sensor reporting systems.
1456 Fragment identifier considerations: Fragment identification for
1457 application/senml+json is supported by using fragment identifiers as
1458 specified by RFC-AAAA.
1460 Additional information:
1462 Magic number(s): none
1463 File extension(s): sensml
1465 Macintosh file type code(s): none
1467 Person & email address to contact for further information: Cullen
1468 Jennings
1470 Intended usage: COMMON
1472 Restrictions on usage: None
1474 Author: Cullen Jennings
1476 Change controller: IESG
1478 12.3.3. senml+cbor Media Type Registration
1480 Type name: application
1482 Subtype name: senml+cbor
1484 Required parameters: none
1486 Optional parameters: none
1488 Encoding considerations: Must be encoded as using [RFC7049]. See
1489 RFC-AAAA for details.
1491 Security considerations: Sensor data can contain a wide range of
1492 information ranging from information that is very public, such the
1493 outside temperature in a given city, to very private information that
1494 requires integrity and confidentiality protection, such as patient
1495 health information. This format does not provide any security and
1496 instead relies on the transport protocol that carries it to provide
1497 security. Given applications need to look at the overall context of
1498 how this media type will be used to decide if the security is
1499 adequate.
1501 Interoperability considerations: Applications should ignore any key
1502 value pairs that they do not understand. This allows backwards
1503 compatibility extensions to this specification. The "bver" field can
1504 be used to ensure the receiver supports a minimal level of
1505 functionality needed by the creator of the CBOR object.
1507 Published specification: RFC-AAAA
1509 Applications that use this media type: The type is used by systems
1510 that report e.g., electrical power usage and environmental
1511 information such as temperature and humidity. It can be used for a
1512 wide range of sensor reporting systems.
1514 Fragment identifier considerations: Fragment identification for
1515 application/senml+cbor is supported by using fragment identifiers as
1516 specified by RFC-AAAA.
1518 Additional information:
1520 Magic number(s): none
1522 File extension(s): senmlc
1524 Macintosh file type code(s): none
1526 Macintosh Universal Type Identifier code: org.ietf.senml-cbor
1527 conforms to public.data
1529 Person & email address to contact for further information: Cullen
1530 Jennings
1532 Intended usage: COMMON
1534 Restrictions on usage: None
1536 Author: Cullen Jennings
1538 Change controller: IESG
1540 12.3.4. sensml+cbor Media Type Registration
1542 Type name: application
1544 Subtype name: sensml+cbor
1546 Required parameters: none
1548 Optional parameters: none
1550 Encoding considerations: Must be encoded as using [RFC7049]. See
1551 RFC-AAAA for details.
1553 Security considerations: Sensor data can contain a wide range of
1554 information ranging from information that is very public, such the
1555 outside temperature in a given city, to very private information that
1556 requires integrity and confidentiality protection, such as patient
1557 health information. This format does not provide any security and
1558 instead relies on the transport protocol that carries it to provide
1559 security. Given applications need to look at the overall context of
1560 how this media type will be used to decide if the security is
1561 adequate.
1563 Interoperability considerations: Applications should ignore any key
1564 value pairs that they do not understand. This allows backwards
1565 compatibility extensions to this specification. The "bver" field can
1566 be used to ensure the receiver supports a minimal level of
1567 functionality needed by the creator of the CBOR object.
1569 Published specification: RFC-AAAA
1571 Applications that use this media type: The type is used by systems
1572 that report e.g., electrical power usage and environmental
1573 information such as temperature and humidity. It can be used for a
1574 wide range of sensor reporting systems.
1576 Fragment identifier considerations: Fragment identification for
1577 application/senml+cbor is supported by using fragment identifiers as
1578 specified by RFC-AAAA.
1580 Additional information:
1582 Magic number(s): none
1584 File extension(s): sensmlc
1586 Macintosh file type code(s): none
1588 Person & email address to contact for further information: Cullen
1589 Jennings
1591 Intended usage: COMMON
1593 Restrictions on usage: None
1595 Author: Cullen Jennings
1597 Change controller: IESG
1599 12.3.5. senml+xml Media Type Registration
1601 Type name: application
1603 Subtype name: senml+xml
1605 Required parameters: none
1606 Optional parameters: none
1608 Encoding considerations: Must be encoded as using
1609 [W3C.REC-xml-20081126]. See RFC-AAAA for details.
1611 Security considerations: Sensor data can contain a wide range of
1612 information ranging from information that is very public, such the
1613 outside temperature in a given city, to very private information that
1614 requires integrity and confidentiality protection, such as patient
1615 health information. This format does not provide any security and
1616 instead relies on the transport protocol that carries it to provide
1617 security. Given applications need to look at the overall context of
1618 how this media type will be used to decide if the security is
1619 adequate.
1621 Interoperability considerations: Applications should ignore any XML
1622 tags or attributes that they do not understand. This allows
1623 backwards compatibility extensions to this specification. The "bver"
1624 attribute in the senml XML tag can be used to ensure the receiver
1625 supports a minimal level of functionality needed by the creator of
1626 the XML.
1628 Published specification: RFC-AAAA
1630 Applications that use this media type: The type is used by systems
1631 that report e.g., electrical power usage and environmental
1632 information such as temperature and humidity. It can be used for a
1633 wide range of sensor reporting systems.
1635 Fragment identifier considerations: Fragment identification for
1636 application/senml+xml is supported by using fragment identifiers as
1637 specified by RFC-AAAA.
1639 Additional information:
1641 Magic number(s): none
1643 File extension(s): senmlx
1645 Windows Clipboard Name: "XML Sensor Measurement List"
1647 Macintosh file type code(s): none
1649 Macintosh Universal Type Identifier code: org.ietf.senml-xml conforms
1650 to public.xml
1652 Person & email address to contact for further information: Cullen
1653 Jennings
1654 Intended usage: COMMON
1656 Restrictions on usage: None
1658 Author: Cullen Jennings
1660 Change controller: IESG
1662 12.3.6. sensml+xml Media Type Registration
1664 Type name: application
1666 Subtype name: sensml+xml
1668 Required parameters: none
1670 Optional parameters: none
1672 Encoding considerations: Must be encoded as using
1673 [W3C.REC-xml-20081126]. See RFC-AAAA for details.
1675 Security considerations: Sensor data can contain a wide range of
1676 information ranging from information that is very public, such the
1677 outside temperature in a given city, to very private information that
1678 requires integrity and confidentiality protection, such as patient
1679 health information. This format does not provide any security and
1680 instead relies on the transport protocol that carries it to provide
1681 security. Given applications need to look at the overall context of
1682 how this media type will be used to decide if the security is
1683 adequate.
1685 Interoperability considerations: Applications should ignore any XML
1686 tags or attributes that they do not understand. This allows
1687 backwards compatibility extensions to this specification. The "bver"
1688 attribute in the senml XML tag can be used to ensure the receiver
1689 supports a minimal level of functionality needed by the creator of
1690 the XML.
1692 Published specification: RFC-AAAA
1694 Applications that use this media type: The type is used by systems
1695 that report e.g., electrical power usage and environmental
1696 information such as temperature and humidity. It can be used for a
1697 wide range of sensor reporting systems.
1699 Fragment identifier considerations: Fragment identification for
1700 application/senml+xml is supported by using fragment identifiers as
1701 specified by RFC-AAAA.
1703 Additional information:
1705 Magic number(s): none
1707 File extension(s): sensmlx
1709 Macintosh file type code(s): none
1711 Person & email address to contact for further information: Cullen
1712 Jennings
1714 Intended usage: COMMON
1716 Restrictions on usage: None
1718 Author: Cullen Jennings
1720 Change controller: IESG
1722 12.3.7. senml+exi Media Type Registration
1724 Type name: application
1726 Subtype name: senml+exi
1728 Required parameters: none
1730 Optional parameters: none
1732 Encoding considerations: Must be encoded as using
1733 [W3C.REC-exi-20140211]. See RFC-AAAA for details.
1735 Security considerations: Sensor data can contain a wide range of
1736 information ranging from information that is very public, such the
1737 outside temperature in a given city, to very private information that
1738 requires integrity and confidentiality protection, such as patient
1739 health information. This format does not provide any security and
1740 instead relies on the transport protocol that carries it to provide
1741 security. Given applications need to look at the overall context of
1742 how this media type will be used to decide if the security is
1743 adequate.
1745 Interoperability considerations: Applications should ignore any XML
1746 tags or attributes that they do not understand. This allows
1747 backwards compatibility extensions to this specification. The "bver"
1748 attribute in the senml XML tag can be used to ensure the receiver
1749 supports a minimal level of functionality needed by the creator of
1750 the XML. Further information on using schemas to guide the EXI can
1751 be found in RFC-AAAA.
1753 Published specification: RFC-AAAA
1755 Applications that use this media type: The type is used by systems
1756 that report e.g., electrical power usage and environmental
1757 information such as temperature and humidity. It can be used for a
1758 wide range of sensor reporting systems.
1760 Fragment identifier considerations: Fragment identification for
1761 application/senml+exi is supported by using fragment identifiers as
1762 specified by RFC-AAAA.
1764 Additional information:
1766 Magic number(s): none
1768 File extension(s): senmle
1770 Macintosh file type code(s): none
1772 Macintosh Universal Type Identifier code: org.ietf.senml-exi conforms
1773 to public.data
1775 Person & email address to contact for further information: Cullen
1776 Jennings
1778 Intended usage: COMMON
1780 Restrictions on usage: None
1782 Author: Cullen Jennings
1784 Change controller: IESG
1786 12.3.8. sensml+exi Media Type Registration
1788 Type name: application
1790 Subtype name: sensml+exi
1792 Required parameters: none
1794 Optional parameters: none
1796 Encoding considerations: Must be encoded as using
1797 [W3C.REC-exi-20140211]. See RFC-AAAA for details.
1799 Security considerations: Sensor data can contain a wide range of
1800 information ranging from information that is very public, such the
1801 outside temperature in a given city, to very private information that
1802 requires integrity and confidentiality protection, such as patient
1803 health information. This format does not provide any security and
1804 instead relies on the transport protocol that carries it to provide
1805 security. Given applications need to look at the overall context of
1806 how this media type will be used to decide if the security is
1807 adequate.
1809 Interoperability considerations: Applications should ignore any XML
1810 tags or attributes that they do not understand. This allows
1811 backwards compatibility extensions to this specification. The "bver"
1812 attribute in the senml XML tag can be used to ensure the receiver
1813 supports a minimal level of functionality needed by the creator of
1814 the XML. Further information on using schemas to guide the EXI can
1815 be found in RFC-AAAA.
1817 Published specification: RFC-AAAA
1819 Applications that use this media type: The type is used by systems
1820 that report e.g., electrical power usage and environmental
1821 information such as temperature and humidity. It can be used for a
1822 wide range of sensor reporting systems.
1824 Fragment identifier considerations: Fragment identification for
1825 application/senml+exi is supported by using fragment identifiers as
1826 specified by RFC-AAAA.
1828 Additional information:
1830 Magic number(s): none
1832 File extension(s): sensmle
1834 Macintosh file type code(s): none
1836 Person & email address to contact for further information: Cullen
1837 Jennings
1839 Intended usage: COMMON
1841 Restrictions on usage: None
1843 Author: Cullen Jennings
1845 Change controller: IESG
1847 12.4. XML Namespace Registration
1849 This document registers the following XML namespaces in the IETF XML
1850 registry defined in [RFC3688].
1852 URI: urn:ietf:params:xml:ns:senml
1854 Registrant Contact: The IESG.
1856 XML: N/A, the requested URIs are XML namespaces
1858 12.5. CoAP Content-Format Registration
1860 IANA is requested to assign CoAP Content-Format IDs for the SenML
1861 media types in the "CoAP Content-Formats" sub-registry, within the
1862 "CoRE Parameters" registry [RFC7252]. All IDs are assigned from the
1863 "Expert Review" (0-255) range. The assigned IDs are show in Table 7.
1865 +-------------------------+-----+
1866 | Media type | ID |
1867 +-------------------------+-----+
1868 | application/senml+json | TBD |
1869 | application/sensml+json | TBD |
1870 | application/senml+cbor | TBD |
1871 | application/sensml+cbor | TBD |
1872 | application/senml+xml | TBD |
1873 | application/sensml+xml | TBD |
1874 | application/senml+exi | TBD |
1875 | application/sensml+exi | TBD |
1876 +-------------------------+-----+
1878 Table 7: CoAP Content-Format IDs
1880 13. Security Considerations
1882 See Section 14. Further discussion of security properties can be
1883 found in Section 12.3.
1885 14. Privacy Considerations
1887 Sensor data can range from information with almost no security
1888 considerations, such as the current temperature in a given city, to
1889 highly sensitive medical or location data. This specification
1890 provides no security protection for the data but is meant to be used
1891 inside another container or transport protocol such as S/MIME or HTTP
1892 with TLS that can provide integrity, confidentiality, and
1893 authentication information about the source of the data.
1895 15. Acknowledgement
1897 We would like to thank Alexander Pelov, Andrew McClure, Andrew
1898 Mcgregor, Bjoern Hoehrmann, Christian Amsuess, Christian Groves,
1899 Daniel Peintner, Jan-Piet Mens, Joe Hildebrand, John Klensin, Karl
1900 Palsson, Lennart Duhrsen, Lisa Dusseault, Lyndsay Campbell, Martin
1901 Thomson, Michael Koster, and Stephen Farrell, for their review
1902 comments.
1904 16. References
1906 16.1. Normative References
1908 [BIPM] Bureau International des Poids et Mesures, "The
1909 International System of Units (SI)", 8th edition, 2006.
1911 [IEEE.754.1985]
1912 Institute of Electrical and Electronics Engineers,
1913 "Standard for Binary Floating-Point Arithmetic",
1914 IEEE Standard 754, August 1985.
1916 [NIST811] Thompson, A. and B. Taylor, "Guide for the Use of the
1917 International System of Units (SI)", NIST Special
1918 Publication 811, 2008.
1920 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1921 Requirement Levels", BCP 14, RFC 2119,
1922 DOI 10.17487/RFC2119, March 1997,
1923 .
1925 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
1926 DOI 10.17487/RFC3688, January 2004,
1927 .
1929 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
1930 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
1931 .
1933 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
1934 IANA Considerations Section in RFCs", RFC 5226,
1935 DOI 10.17487/RFC5226, May 2008,
1936 .
1938 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
1939 Specifications and Registration Procedures", BCP 13,
1940 RFC 6838, DOI 10.17487/RFC6838, January 2013,
1941 .
1943 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
1944 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
1945 October 2013, .
1947 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
1948 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
1949 2014, .
1951 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
1952 Application Protocol (CoAP)", RFC 7252,
1953 DOI 10.17487/RFC7252, June 2014,
1954 .
1956 [RFC7303] Thompson, H. and C. Lilley, "XML Media Types", RFC 7303,
1957 DOI 10.17487/RFC7303, July 2014,
1958 .
1960 [W3C.REC-exi-20140211]
1961 Schneider, J., Kamiya, T., Peintner, D., and R. Kyusakov,
1962 "Efficient XML Interchange (EXI) Format 1.0 (Second
1963 Edition)", World Wide Web Consortium Recommendation REC-
1964 exi-20140211, February 2014,
1965 .
1967 [W3C.REC-xml-20081126]
1968 Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
1969 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
1970 Edition)", World Wide Web Consortium Recommendation REC-
1971 xml-20081126, November 2008,
1972 .
1974 16.2. Informative References
1976 [I-D.arkko-core-dev-urn]
1977 Arkko, J., Jennings, C., and Z. Shelby, "Uniform Resource
1978 Names for Device Identifiers", draft-arkko-core-dev-urn-03
1979 (work in progress), July 2012.
1981 [I-D.greevenbosch-appsawg-cbor-cddl]
1982 Birkholz, H., Vigano, C., and C. Bormann, "CBOR data
1983 definition language (CDDL): a notational convention to
1984 express CBOR data structures", draft-greevenbosch-appsawg-
1985 cbor-cddl-10 (work in progress), March 2017.
1987 [I-D.ietf-core-links-json]
1988 Li, K., Rahman, A., and C. Bormann, "Representing
1989 Constrained RESTful Environments (CoRE) Link Format in
1990 JSON and CBOR", draft-ietf-core-links-json-08 (work in
1991 progress), April 2017.
1993 [IEEE802.1as-2011]
1994 IEEE, "IEEE Standard for Local and Metropolitan Area
1995 Networks - Timing and Synchronization for Time-Sensitive
1996 Applications in Bridged Local Area Networks", 2011.
1998 [IEEE802.1ba-2011]
1999 IEEE, "IEEE Standard for Local and metropolitan area
2000 networks--Audio Video Bridging (AVB) Systems", 2011.
2002 [RFC2141] Moats, R., "URN Syntax", RFC 2141, DOI 10.17487/RFC2141,
2003 May 1997, .
2005 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
2006 Resource Identifier (URI): Generic Syntax", STD 66,
2007 RFC 3986, DOI 10.17487/RFC3986, January 2005,
2008 .
2010 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
2011 Unique IDentifier (UUID) URN Namespace", RFC 4122,
2012 DOI 10.17487/RFC4122, July 2005,
2013 .
2015 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
2016 Address Text Representation", RFC 5952,
2017 DOI 10.17487/RFC5952, August 2010,
2018 .
2020 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link
2021 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
2022 .
2024 [RFC7111] Hausenblas, M., Wilde, E., and J. Tennison, "URI Fragment
2025 Identifiers for the text/csv Media Type", RFC 7111,
2026 DOI 10.17487/RFC7111, January 2014,
2027 .
2029 [RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy
2030 Considerations for IPv6 Address Generation Mechanisms",
2031 RFC 7721, DOI 10.17487/RFC7721, March 2016,
2032 .
2034 [UCUM] Schadow, G. and C. McDonald, "The Unified Code for Units
2035 of Measure (UCUM)", Regenstrief Institute and Indiana
2036 University School of Informatics, 2013,
2037 .
2039 Appendix A. Links Extension
2041 A field to support a link extension for SenML is defined as a string
2042 field by this specification. The link extension can be used for
2043 additional information about a SenML Record. The definition and
2044 usage of the contents of this value are specified in
2045 [I-D.ietf-core-links-json].
2047 For JSON and XML the field has a label of "l" and a value that is a
2048 string.
2050 The following shows an example of the links extension.
2052 [
2053 {"bn":"urn:dev:ow:10e2073a01080063:","bt":1.320078429e+09,
2054 "l":"[{\"href\":\"humidity\",\"foo\":\"bar\"}]",
2055 "n":"temperature","u":"Cel","v":27.2},
2056 {"n":"humidity","u":"%RH","v":80}
2057 ]
2059 Authors' Addresses
2061 Cullen Jennings
2062 Cisco
2063 400 3rd Avenue SW
2064 Calgary, AB T2P 4H2
2065 Canada
2067 Email: fluffy@iii.ca
2069 Zach Shelby
2070 ARM
2071 150 Rose Orchard
2072 San Jose 95134
2073 USA
2075 Phone: +1-408-203-9434
2076 Email: zach.shelby@arm.com
2077 Jari Arkko
2078 Ericsson
2079 Jorvas 02420
2080 Finland
2082 Email: jari.arkko@piuha.net
2084 Ari Keranen
2085 Ericsson
2086 Jorvas 02420
2087 Finland
2089 Email: ari.keranen@ericsson.com
2091 Carsten Bormann
2092 Universitaet Bremen TZI
2093 Postfach 330440
2094 Bremen D-28359
2095 Germany
2097 Phone: +49-421-218-63921
2098 Email: cabo@tzi.org