From 853d4c9d1fbe9ddddb724c0a252885b4d4b97e0d Mon Sep 17 00:00:00 2001
From: Ernst Klamer Sensor data
see below
-
-
- 540C48656c6c6f20576f726c6421
+ 540C48656C6C6F20576F726C6421
"48656c6c6f20576f726c6421"
+ 48656c6c6f20576f726c6421
@@ -740,7 +740,7 @@
Sensor data
- 530C48656C6C6F20576F726C6421
"Hello World!"
+ Hello World!
@@ -910,15 +910,15 @@
Timestamp
datetime(2023, 5, 14, 19, 41, 17, tzinfo=timezone.utc)
- The Text and Raw sensors have a variable length. You therefore have to specify
- the length in the first byte after the `object id`. In the text sensor example
+ The text and raw sensor have a variable length. You therefore have to specify
+ the length in the first byte after the `object id`. In the example of the text sensor
0x530C48656C6C6F20576F726C6421
, the 2nd byte (0x0C
)
- gives the length of the text string (12 bytes). The text has to be encoded in
- UTF-8. The byte string 0x48656C6C6F20576F726C6421
in text is
- Hello World!
. In Raw format 0x54
, the bytes are
- reported in hex format, as 48656C6C6F20576F726C6421
.
+ gives the length of the text string (12 bytes). Text has to be encoded in
+ UTF-8, while the raw sensor is reported back as hexadecimal string. The byte string
+ 0x48656C6C6F20576F726C6421
in text is Hello World!
, while
+ in raw sensor will give 48656c6c6f20576f726c6421
as result.
Make sure the length is specified correct in the second byte.
°/s
+ 0x53
+ 0D5348656C6C6F20576F726C6421
+
+ 0x54
+ 0D5448656C6C6F20576F726C6421
+
+ datetime(2023, 5, 14, 19, 41, 17, tzinfo=timezone.utc)
+
+ Text has to be encoded in UTF-8, while the raw sensor is reported back as
+ hexadecimal string. The byte string 0x48656C6C6F20576F726C6421
+ in text is Hello World!
, while in raw sensor will give
+ 48656c6c6f20576f726c6421
as result.
+
If you want to send multiple measurements of the same type, e.g. three