diff --git a/_weather_sensor_8h_source.html b/_weather_sensor_8h_source.html
index 64bd97d9..4f3c6a51 100644
--- a/_weather_sensor_8h_source.html
+++ b/_weather_sensor_8h_source.html
@@ -223,7 +223,7 @@
-
+
@@ -265,183 +265,173 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 281 memset(
this, 0,
sizeof(*
this));
-
-
-
-
-
-
-
-
- 295 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t s_type = 1, uint8_t channel = 0, uint8_t startup = 0);
-
-
-
-
- 308 for (
int i=0; i< NUM_SENSORS; i++) {
- 309 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
-
-
-
-
-
+
+ 285 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t s_type = 1, uint8_t channel = 0, uint8_t startup = 0);
+
+
+
+
+ 298 for (
int i=0; i< NUM_SENSORS; i++) {
+ 299 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
+
+
+
+
+
+
+
+
-
-
+ 324 int findType(uint8_t type, uint8_t channel = 0xFF);
- 334 int findType(uint8_t type, uint8_t channel = 0xFF);
-
-
-
-
- 347 struct Sensor *pData;
-
- 366 int findSlot(uint32_t
id, DecodeStatus * status);
-
-
- 369 #ifdef BRESSER_5_IN_1
- 379 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 381 #ifdef BRESSER_6_IN_1
- 393 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 395 #ifdef BRESSER_7_IN_1
- 405 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 407 #ifdef BRESSER_LIGHTNING
- 417 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
-
- 419 #ifdef BRESSER_LEAKAGE
- 429 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
-
-
-
- 436 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
+
+
+
+ 337 struct Sensor *pData;
+
+ 356 int findSlot(uint32_t
id, DecodeStatus * status);
+
+
+ 359 #ifdef BRESSER_5_IN_1
+ 369 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 371 #ifdef BRESSER_6_IN_1
+ 383 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 385 #ifdef BRESSER_7_IN_1
+ 395 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 397 #ifdef BRESSER_LIGHTNING
+ 407 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
+
+ 409 #ifdef BRESSER_LEAKAGE
+ 419 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
+
+
+
+ 426 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
+
+ 436 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
- 446 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
-
- 458 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
-
- 460 #if CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
- 472 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
-
- 474 const char txt[] =
"Byte #: ";
-
- 476 int len1 = strlen(txt);
- 477 int len2 = strlen(descr) + 2;
- 478 int prefix_len = max(len1, len2);
-
- 480 memset(buf,
' ', prefix_len);
- 481 buf[prefix_len] =
'\0';
- 482 offs = (len1 < len2) ? (len2 - len1) : 0;
- 483 strcpy(&buf[offs], txt);
-
-
+ 448 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
+
+ 450 #if CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
+ 462 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
+
+ 464 const char txt[] =
"Byte #: ";
+
+ 466 int len1 = strlen(txt);
+ 467 int len2 = strlen(descr) + 2;
+ 468 int prefix_len = max(len1, len2);
+
+ 470 memset(buf,
' ', prefix_len);
+ 471 buf[prefix_len] =
'\0';
+ 472 offs = (len1 < len2) ? (len2 - len1) : 0;
+ 473 strcpy(&buf[offs], txt);
+
+
+ 476 for (
size_t i = 0 ; i < msgSize; i++) {
+ 477 sprintf(&buf[strlen(buf)],
"%02d ", i);
+
+
+
+ 481 memset(buf,
' ', prefix_len);
+ 482 buf[prefix_len] =
'\0';
+ 483 offs = (len1 > len2) ? (len1 - len2) : 0;
+ 484 sprintf(&buf[offs],
"%s: ", descr);
+
486 for (
size_t i = 0 ; i < msgSize; i++) {
- 487 sprintf(&buf[strlen(buf)],
"%02d ", i);
+ 487 sprintf(&buf[strlen(buf)],
"%02X ", msg[i]);
-
- 491 memset(buf,
' ', prefix_len);
- 492 buf[prefix_len] =
'\0';
- 493 offs = (len1 > len2) ? (len1 - len2) : 0;
- 494 sprintf(&buf[offs],
"%s: ", descr);
-
- 496 for (
size_t i = 0 ; i < msgSize; i++) {
- 497 sprintf(&buf[strlen(buf)],
"%02X ", msg[i]);
-
-
-
-
-
-
-
-
+
+
+
+
+
+
Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:146
DecodeStatus getMessage(void)
Tries to receive radio message (non-blocking) and to decode it. Timeout occurs after a multitude of e...
Definition: WeatherSensor.cpp:227
int findId(uint32_t id)
Definition: WeatherSensor.cpp:442
bool is_decode3in1(uint32_t id)
Definition: WeatherSensor.cpp:468
-float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:287
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:277
bool getData(uint32_t timeout, uint8_t flags=0, uint8_t type=0, void(*func)()=NULL)
Wait for reception of data or occurrance of timeout. With BRESSER_6_IN_1, data is distributed across ...
Definition: WeatherSensor.cpp:170
int16_t begin(void)
Constructor.
Definition: WeatherSensor.cpp:106
int findType(uint8_t type, uint8_t channel=0xFF)
Definition: WeatherSensor.cpp:455
-sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:286
+sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:276
bool genMessage(int i, uint32_t id=0xff, uint8_t s_type=1, uint8_t channel=0, uint8_t startup=0)
Generates data otherwise received and decoded from a radio message.
Definition: WeatherSensor.cpp:313
-struct Sensor sensor_t
Shortcut for struct Sensor.
Definition: WeatherSensor.h:285
-void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:306
+struct Sensor sensor_t
Shortcut for struct Sensor.
Definition: WeatherSensor.h:275
+void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:296
DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize)
Decode message Tries the available decoders until a decoding was successful.
Definition: WeatherSensor.cpp:269
Mapping of sensor IDs to names.
Definition: WeatherSensor.h:133
std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:135
uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:134
-Definition: WeatherSensor.h:251
-uint16_t pm_2_5
air quality PM2.5 in µg/m³
Definition: WeatherSensor.h:253
-uint16_t pm_10
air quality PM10 in µg/m³
Definition: WeatherSensor.h:254
-Definition: WeatherSensor.h:246
-bool alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:248
-Definition: WeatherSensor.h:237
-uint16_t unknown1
unknown part 1
Definition: WeatherSensor.h:241
-uint8_t strike_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:240
-uint8_t distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:239
-uint16_t unknown2
unknown part 2
Definition: WeatherSensor.h:242
-sensor data and status flags
Definition: WeatherSensor.h:262
-bool battery_ok
battery o.k.
Definition: WeatherSensor.h:268
-float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:264
-bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:270
-uint8_t s_type
sensor type
Definition: WeatherSensor.h:265
-bool startup
startup after reset / battery change
Definition: WeatherSensor.h:267
-uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:263
-uint8_t chan
channel
Definition: WeatherSensor.h:266
-bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:269
+Definition: WeatherSensor.h:246
+uint16_t pm_2_5
air quality PM2.5 in µg/m³
Definition: WeatherSensor.h:248
+uint16_t pm_10
air quality PM10 in µg/m³
Definition: WeatherSensor.h:249
+Definition: WeatherSensor.h:242
+bool alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:243
+Definition: WeatherSensor.h:234
+uint16_t unknown1
unknown part 1
Definition: WeatherSensor.h:237
+uint8_t strike_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:236
+uint8_t distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:235
+uint16_t unknown2
unknown part 2
Definition: WeatherSensor.h:238
+sensor data and status flags
Definition: WeatherSensor.h:257
+bool battery_ok
battery o.k.
Definition: WeatherSensor.h:263
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:259
+bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:265
+uint8_t s_type
sensor type
Definition: WeatherSensor.h:260
+bool startup
startup after reset / battery change
Definition: WeatherSensor.h:262
+uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:258
+uint8_t chan
channel
Definition: WeatherSensor.h:261
+bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:264
Definition: WeatherSensor.h:229
-float temp_c
temperature in degC
Definition: WeatherSensor.h:233
-uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:234
+float temp_c
temperature in degC
Definition: WeatherSensor.h:230
+uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:231
Definition: WeatherSensor.h:201
float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:209
bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:204
diff --git a/navtreeindex0.js b/navtreeindex0.js
index 497a2a81..73a1b1ac 100644
--- a/navtreeindex0.js
+++ b/navtreeindex0.js
@@ -63,20 +63,19 @@ var NAVTREEINDEX0 =
"struct_weather_sensor_1_1_lightning.html#a2b353ea8a3a66402349b26fde4a25008":[1,0,5,2,0],
"struct_weather_sensor_1_1_lightning.html#a57eba8d336a02ade096c8651f3b61d21":[1,0,5,2,3],
"struct_weather_sensor_1_1_sensor.html":[1,0,5,3],
-"struct_weather_sensor_1_1_sensor.html#a179014c02826f68faabbddbc9a57ff90":[1,0,5,3,1],
-"struct_weather_sensor_1_1_sensor.html#a1890b5f983c111175f2702e10cd06627":[1,0,5,3,6],
-"struct_weather_sensor_1_1_sensor.html#a2be0329dff70f431f408e70a57117ecf":[1,0,5,3,4],
-"struct_weather_sensor_1_1_sensor.html#a56ca10defbfb8bb7bab5862a3fa2b7d1":[1,0,5,3,7],
-"struct_weather_sensor_1_1_sensor.html#a70a0e2b3062eb6b3f1f7b9fc57a479bf":[1,0,5,3,5],
-"struct_weather_sensor_1_1_sensor.html#a8d7ac24ffcbb4cbc5ef8005c72046a57":[1,0,5,3,3],
-"struct_weather_sensor_1_1_sensor.html#aabf3f23ee4b7db05580765f7ce392838":[1,0,5,3,8],
-"struct_weather_sensor_1_1_sensor.html#ab1fb3b6988f2a14d8246b1dc239426a4":[1,0,5,3,11],
-"struct_weather_sensor_1_1_sensor.html#abb7429449881d93d8a23b20ad9a9b939":[1,0,5,3,10],
-"struct_weather_sensor_1_1_sensor.html#abbf124d4f3f1792ff596b7dd03b9cd94":[1,0,5,3,9],
-"struct_weather_sensor_1_1_sensor.html#acdcee37faebf4d2f77387d6e649b00c9":[1,0,5,3,2],
-"struct_weather_sensor_1_1_sensor.html#ae28084d05f7e81b1c3a1b2cff859315a":[1,0,5,3,12],
-"struct_weather_sensor_1_1_sensor.html#ae6c6e91d8e3d6d22e38c26ef212a6d69":[1,0,5,3,13],
-"struct_weather_sensor_1_1_sensor.html#afd11d6f1f39345f3466a7e2eebaeb2e9":[1,0,5,3,0],
+"struct_weather_sensor_1_1_sensor.html#a179014c02826f68faabbddbc9a57ff90":[1,0,5,3,0],
+"struct_weather_sensor_1_1_sensor.html#a1890b5f983c111175f2702e10cd06627":[1,0,5,3,5],
+"struct_weather_sensor_1_1_sensor.html#a2be0329dff70f431f408e70a57117ecf":[1,0,5,3,3],
+"struct_weather_sensor_1_1_sensor.html#a56ca10defbfb8bb7bab5862a3fa2b7d1":[1,0,5,3,6],
+"struct_weather_sensor_1_1_sensor.html#a70a0e2b3062eb6b3f1f7b9fc57a479bf":[1,0,5,3,4],
+"struct_weather_sensor_1_1_sensor.html#a8d7ac24ffcbb4cbc5ef8005c72046a57":[1,0,5,3,2],
+"struct_weather_sensor_1_1_sensor.html#aabf3f23ee4b7db05580765f7ce392838":[1,0,5,3,7],
+"struct_weather_sensor_1_1_sensor.html#ab1fb3b6988f2a14d8246b1dc239426a4":[1,0,5,3,10],
+"struct_weather_sensor_1_1_sensor.html#abb7429449881d93d8a23b20ad9a9b939":[1,0,5,3,9],
+"struct_weather_sensor_1_1_sensor.html#abbf124d4f3f1792ff596b7dd03b9cd94":[1,0,5,3,8],
+"struct_weather_sensor_1_1_sensor.html#acdcee37faebf4d2f77387d6e649b00c9":[1,0,5,3,1],
+"struct_weather_sensor_1_1_sensor.html#ae28084d05f7e81b1c3a1b2cff859315a":[1,0,5,3,11],
+"struct_weather_sensor_1_1_sensor.html#ae6c6e91d8e3d6d22e38c26ef212a6d69":[1,0,5,3,12],
"struct_weather_sensor_1_1_soil.html":[1,0,5,4],
"struct_weather_sensor_1_1_soil.html#a593b5edcdee32762132c39a143aaf1ff":[1,0,5,4,1],
"struct_weather_sensor_1_1_soil.html#adb04b7368a78fae492a87b3bd0b734da":[1,0,5,4,0],
diff --git a/struct_weather_sensor_1_1_sensor-members.html b/struct_weather_sensor_1_1_sensor-members.html
index a491c0c1..b7f1e467 100644
--- a/struct_weather_sensor_1_1_sensor-members.html
+++ b/struct_weather_sensor_1_1_sensor-members.html
@@ -97,12 +97,11 @@
pm (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | |
rssi | WeatherSensor::Sensor | |
s_type | WeatherSensor::Sensor | |
- Sensor() (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | inline |
- sensor_id | WeatherSensor::Sensor | |
- soil (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | |
- startup | WeatherSensor::Sensor | |
- valid | WeatherSensor::Sensor | |
- w (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | |
+ sensor_id | WeatherSensor::Sensor | |
+ soil (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | |
+ startup | WeatherSensor::Sensor | |
+ valid | WeatherSensor::Sensor | |
+ w (defined in WeatherSensor::Sensor) | WeatherSensor::Sensor | |
diff --git a/struct_weather_sensor_1_1_sensor.html b/struct_weather_sensor_1_1_sensor.html
index 15806ae5..2b26f000 100644
--- a/struct_weather_sensor_1_1_sensor.html
+++ b/struct_weather_sensor_1_1_sensor.html
@@ -98,19 +98,19 @@
|
-uint32_t | sensor_id |
+uint32_t sensor_id = 0 |
| sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
|
|
-float | rssi |
+float rssi = 0.0 |
| received signal strength indicator in dBm
|
|
-uint8_t | s_type |
+uint8_t s_type = 0 |
| sensor type
|
|
-uint8_t | chan |
+uint8_t chan = 0 |
| channel
|
|
@@ -122,11 +122,11 @@
|
| battery o.k.
|
|
-bool | valid |
+bool valid = false |
| data valid (but not necessarily complete)
|
|
-bool | complete |
+bool complete = true |
| data is split into two separate messages is complete (only 6-in-1 WS)
|
|
diff --git a/struct_weather_sensor_1_1_sensor.js b/struct_weather_sensor_1_1_sensor.js
index b9929958..cdb20376 100644
--- a/struct_weather_sensor_1_1_sensor.js
+++ b/struct_weather_sensor_1_1_sensor.js
@@ -1,6 +1,5 @@
var struct_weather_sensor_1_1_sensor =
[
- [ "Sensor", "struct_weather_sensor_1_1_sensor.html#afd11d6f1f39345f3466a7e2eebaeb2e9", null ],
[ "battery_ok", "struct_weather_sensor_1_1_sensor.html#a179014c02826f68faabbddbc9a57ff90", null ],
[ "chan", "struct_weather_sensor_1_1_sensor.html#acdcee37faebf4d2f77387d6e649b00c9", null ],
[ "complete", "struct_weather_sensor_1_1_sensor.html#a8d7ac24ffcbb4cbc5ef8005c72046a57", null ],
|