diff --git a/_weather_sensor_8h_source.html b/_weather_sensor_8h_source.html
index 4f3c6a51..f0266050 100644
--- a/_weather_sensor_8h_source.html
+++ b/_weather_sensor_8h_source.html
@@ -220,231 +220,229 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
- 182 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
+ 181 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 213 #ifdef WIND_DATA_FLOATINGPOINT
- 214 float wind_direction_deg = 0.0;
- 215 float wind_gust_meter_sec = 0.0;
- 216 float wind_avg_meter_sec = 0.0;
-
- 218 #ifdef WIND_DATA_FIXEDPOINT
-
-
-
- 222 uint16_t wind_direction_deg_fp1 = 0;
- 223 uint16_t wind_gust_meter_sec_fp1 = 0;
- 224 uint16_t wind_avg_meter_sec_fp1 = 0;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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);
-
-
-
-
- 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);
-
- 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)],
"%02X ", msg[i]);
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 212 #ifdef WIND_DATA_FLOATINGPOINT
+ 213 float wind_direction_deg = 0.0;
+ 214 float wind_gust_meter_sec = 0.0;
+ 215 float wind_avg_meter_sec = 0.0;
+
+ 217 #ifdef WIND_DATA_FIXEDPOINT
+
+
+
+ 221 uint16_t wind_direction_deg_fp1 = 0;
+ 222 uint16_t wind_gust_meter_sec_fp1 = 0;
+ 223 uint16_t wind_avg_meter_sec_fp1 = 0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 283 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t s_type = 1, uint8_t channel = 0, uint8_t startup = 0);
+
+
+
+
+ 296 for (
int i=0; i< NUM_SENSORS; i++) {
+ 297 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
+
+
+
+
+
+
+
+
+
+ 322 int findType(uint8_t type, uint8_t channel = 0xFF);
+
+
+
+
+ 335 struct Sensor *pData;
+
+ 354 int findSlot(uint32_t
id, DecodeStatus * status);
+
+
+ 357 #ifdef BRESSER_5_IN_1
+ 367 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 369 #ifdef BRESSER_6_IN_1
+ 381 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 383 #ifdef BRESSER_7_IN_1
+ 393 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 395 #ifdef BRESSER_LIGHTNING
+ 405 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
+
+ 407 #ifdef BRESSER_LEAKAGE
+ 417 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
+
+
+
+ 424 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
+
+ 434 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
+
+ 446 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
+
+ 448 #if CORE_DEBUG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
+ 460 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
+
+ 462 const char txt[] =
"Byte #: ";
+
+ 464 int len1 = strlen(txt);
+ 465 int len2 = strlen(descr) + 2;
+ 466 int prefix_len = max(len1, len2);
+
+ 468 memset(buf,
' ', prefix_len);
+ 469 buf[prefix_len] =
'\0';
+ 470 offs = (len1 < len2) ? (len2 - len1) : 0;
+ 471 strcpy(&buf[offs], txt);
+
+
+ 474 for (
size_t i = 0 ; i < msgSize; i++) {
+ 475 sprintf(&buf[strlen(buf)],
"%02d ", i);
+
+
+
+ 479 memset(buf,
' ', prefix_len);
+ 480 buf[prefix_len] =
'\0';
+ 481 offs = (len1 > len2) ? (len1 - len2) : 0;
+ 482 sprintf(&buf[offs],
"%s: ", descr);
+
+ 484 for (
size_t i = 0 ; i < msgSize; i++) {
+ 485 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:277
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:275
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
+int16_t begin(void)
Presence check and initialization of radio module.
Definition: WeatherSensor.cpp:106
+WeatherSensor()
Constructor.
Definition: WeatherSensor.h:152
int findType(uint8_t type, uint8_t channel=0xFF)
Definition: WeatherSensor.cpp:455
-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:275
-void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:296
+sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:274
+struct Sensor sensor_t
Shortcut for struct Sensor.
Definition: WeatherSensor.h:273
+void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:294
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: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: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
-float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:210
-bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:202
-float temp_c
temperature in degC
Definition: WeatherSensor.h:208
-uint8_t humidity
humidity in %
Definition: WeatherSensor.h:226
-float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:211
-bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:203
-bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:206
-bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:205
-float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:212
-bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:207
+Definition: WeatherSensor.h:245
+uint16_t pm_2_5
air quality PM2.5 in µg/m³
Definition: WeatherSensor.h:246
+uint16_t pm_10
air quality PM10 in µg/m³
Definition: WeatherSensor.h:247
+Definition: WeatherSensor.h:241
+bool alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:242
+Definition: WeatherSensor.h:233
+uint16_t unknown1
unknown part 1
Definition: WeatherSensor.h:236
+uint8_t strike_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:235
+uint8_t distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:234
+uint16_t unknown2
unknown part 2
Definition: WeatherSensor.h:237
+sensor data and status flags
Definition: WeatherSensor.h:255
+bool battery_ok
battery o.k.
Definition: WeatherSensor.h:261
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:257
+bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:263
+uint8_t s_type
sensor type
Definition: WeatherSensor.h:258
+bool startup
startup after reset / battery change
Definition: WeatherSensor.h:260
+uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:256
+uint8_t chan
channel
Definition: WeatherSensor.h:259
+bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:262
+Definition: WeatherSensor.h:228
+float temp_c
temperature in degC
Definition: WeatherSensor.h:229
+uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:230
+Definition: WeatherSensor.h:200
+float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:208
+bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:203
+float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:209
+bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:201
+float temp_c
temperature in degC
Definition: WeatherSensor.h:207
+uint8_t humidity
humidity in %
Definition: WeatherSensor.h:225
+float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:210
+bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:202
+bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:205
+bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:204
+float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:211
+bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:206
diff --git a/class_weather_sensor-members.html b/class_weather_sensor-members.html
index d690d178..278a46ce 100644
--- a/class_weather_sensor-members.html
+++ b/class_weather_sensor-members.html
@@ -94,13 +94,13 @@
decodeMessage(const uint8_t *msg, uint8_t msgSize) | WeatherSensor | |
findId(uint32_t id) | WeatherSensor | |
findType(uint8_t type, uint8_t channel=0xFF) | WeatherSensor | |
- genMessage(int i, uint32_t id=0xff, uint8_t s_type=1, uint8_t channel=0, uint8_t startup=0) | WeatherSensor | |
- getData(uint32_t timeout, uint8_t flags=0, uint8_t type=0, void(*func)()=NULL) | WeatherSensor | |
- getMessage(void) | WeatherSensor | |
- is_decode3in1(uint32_t id) | WeatherSensor | |
- rssi | WeatherSensor | |
- sensor | WeatherSensor | |
- sensor_t typedef | WeatherSensor | |
+ getData(uint32_t timeout, uint8_t flags=0, uint8_t type=0, void(*func)()=NULL) | WeatherSensor | |
+ getMessage(void) | WeatherSensor | |
+ is_decode3in1(uint32_t id) | WeatherSensor | |
+ rssi | WeatherSensor | |
+ sensor | WeatherSensor | |
+ sensor_t typedef | WeatherSensor | |
+ WeatherSensor() | WeatherSensor | inline |
diff --git a/class_weather_sensor.html b/class_weather_sensor.html
index 10a9f594..4c694548 100644
--- a/class_weather_sensor.html
+++ b/class_weather_sensor.html
@@ -123,8 +123,12 @@
|
+
+ | WeatherSensor () |
+ | Constructor.
|
+ |
int16_t | begin (void) |
- | Constructor. More...
|
+ | Presence check and initialization of radio module. More...
|
|
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 two different messages. Reception of entire data is tried if 'complete' is set. More...
|
@@ -135,9 +139,6 @@
DecodeStatus | decodeMessage (const uint8_t *msg, uint8_t msgSize) |
| Decode message Tries the available decoders until a decoding was successful. More...
|
|
-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. More...
|
- |
void | clearSlots (uint8_t type=0xFF) |
| Clear sensor data. More...
|
|
@@ -154,9 +155,8 @@
sensor_t sensor [NUM_SENSORS] |
| sensor data array
|
|
-
-float | rssi |
- | received signal strength indicator in dBm
|
+float | rssi |
+ | received signal strength indicator in dBm More...
|
|
@@ -178,8 +178,7 @@