diff --git a/_weather_sensor_8h_source.html b/_weather_sensor_8h_source.html
index e2fc1e86..aa2bab74 100644
--- a/_weather_sensor_8h_source.html
+++ b/_weather_sensor_8h_source.html
@@ -170,268 +170,269 @@
-
-
-
- 90 #define SENSOR_TYPE_WEATHER0 0
- 91 #define SENSOR_TYPE_WEATHER1 1
- 92 #define SENSOR_TYPE_THERMO_HYGRO 2
- 93 #define SENSOR_TYPE_LIGHTNING 3
- 94 #define SENSOR_TYPE_SOIL 4
- 95 #define SENSOR_TYPE_LEAKAGE 5
- 96 #define SENSOR_TYPE_RAIN 9
- 97 #define SENSOR_TYPE_WEATHER_7IN1 11
-
+
+
+
+
+ 91 #define SENSOR_TYPE_WEATHER0 0
+ 92 #define SENSOR_TYPE_WEATHER1 1
+ 93 #define SENSOR_TYPE_THERMO_HYGRO 2
+ 94 #define SENSOR_TYPE_LIGHTNING 3
+ 95 #define SENSOR_TYPE_SOIL 4
+ 96 #define SENSOR_TYPE_LEAKAGE 5
+ 97 #define SENSOR_TYPE_RAIN 9
+ 98 #define SENSOR_TYPE_WEATHER_7IN1 11
-
- 101 #define WEATHER0_RAIN_OV 1000
- 102 #define WEATHER1_RAIN_OV 100000
-
+
+
+ 102 #define WEATHER0_RAIN_OV 1000
+ 103 #define WEATHER1_RAIN_OV 100000
-
- 106 #define DATA_COMPLETE 0x1
- 107 #define DATA_TYPE 0x2
- 108 #define DATA_ALL_SLOTS 0x8
-
-
- 111 #define MSG_BUF_SIZE 27
-
-
- 114 typedef enum DecodeStatus {
- 115 DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
-
-
+
+
+ 107 #define DATA_COMPLETE 0x1
+ 108 #define DATA_TYPE 0x2
+ 109 #define DATA_ALL_SLOTS 0x8
+
+
+ 112 #define MSG_BUF_SIZE 27
+
+
+ 115 typedef enum DecodeStatus {
+ 116 DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
+
- 119 #if !defined(ARDUINO_ARCH_AVR)
-
-
-
-
-
-
-
-
+
+ 120 #if !defined(ARDUINO_ARCH_AVR)
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
- 175 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
-
+
+ 176 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 221 #ifdef WIND_DATA_FLOATINGPOINT
- 222 float wind_direction_deg;
- 223 float wind_gust_meter_sec;
- 224 float wind_avg_meter_sec;
-
- 226 #ifdef WIND_DATA_FIXEDPOINT
-
-
-
- 230 uint16_t wind_direction_deg_fp1;
- 231 uint16_t wind_gust_meter_sec_fp1;
- 232 uint16_t wind_avg_meter_sec_fp1;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 222 #ifdef WIND_DATA_FLOATINGPOINT
+ 223 float wind_direction_deg;
+ 224 float wind_gust_meter_sec;
+ 225 float wind_avg_meter_sec;
+
+ 227 #ifdef WIND_DATA_FIXEDPOINT
+
+
+
+ 231 uint16_t wind_direction_deg_fp1;
+ 232 uint16_t wind_gust_meter_sec_fp1;
+ 233 uint16_t wind_avg_meter_sec_fp1;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 254 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t type = 1, uint8_t channel = 0);
-
+
+ 255 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t type = 1, uint8_t channel = 0);
-
-
- 267 for (
int i=0; i< NUM_SENSORS; i++) {
- 268 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 268 for (
int i=0; i< NUM_SENSORS; i++) {
+ 269 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 302 int findType(uint8_t type, uint8_t channel = 0xFF);
-
-
-
-
- 315 struct Sensor *pData;
-
- 334 int findSlot(uint32_t
id, DecodeStatus * status);
-
+
+ 303 int findType(uint8_t type, uint8_t channel = 0xFF);
+
+
+
+
+ 316 struct Sensor *pData;
+
+ 335 int findSlot(uint32_t
id, DecodeStatus * status);
- 337 #ifdef BRESSER_5_IN_1
- 347 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 349 #ifdef BRESSER_6_IN_1
- 361 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 363 #ifdef BRESSER_7_IN_1
- 373 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
-
- 375 #ifdef BRESSER_LIGHTNING
- 385 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
-
- 387 #ifdef BRESSER_LEAKAGE
- 397 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
-
-
-
- 404 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
-
- 414 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
-
- 426 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
-
- 428 #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE
- 440 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
-
- 442 const char txt[] =
"Byte #: ";
-
- 444 int len1 = strlen(txt);
- 445 int len2 = strlen(descr) + 2;
- 446 int prefix_len = max(len1, len2);
-
- 448 memset(buf,
' ', prefix_len);
- 449 buf[prefix_len] =
'\0';
- 450 offs = (len1 < len2) ? (len2 - len1) : 0;
- 451 strcpy(&buf[offs], txt);
-
-
- 454 for (
size_t i = 0 ; i < msgSize; i++) {
- 455 sprintf(&buf[strlen(buf)],
"%02d ", i);
-
-
-
- 459 memset(buf,
' ', prefix_len);
- 460 buf[prefix_len] =
'\0';
- 461 offs = (len1 > len2) ? (len1 - len2) : 0;
- 462 sprintf(&buf[offs],
"%s: ", descr);
-
- 464 for (
size_t i = 0 ; i < msgSize; i++) {
- 465 sprintf(&buf[strlen(buf)],
"%02X ", msg[i]);
-
-
-
-
-
-
- 475 void printRawdata(uint8_t *msg, uint8_t msgSize) {
- 476 DEBUG_PRINT(F(
"Raw Data: "));
- 477 for (uint8_t p = 0 ; p < msgSize ; p++) {
-
-
-
- 481 DEBUG_PRINT(msg[p], HEX);
-
-
-
-
-
-
-
-
-
-Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:140
+
+ 338 #ifdef BRESSER_5_IN_1
+ 348 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 350 #ifdef BRESSER_6_IN_1
+ 362 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 364 #ifdef BRESSER_7_IN_1
+ 374 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 376 #ifdef BRESSER_LIGHTNING
+ 386 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
+
+ 388 #ifdef BRESSER_LEAKAGE
+ 398 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
+
+
+
+ 405 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
+
+ 415 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
+
+ 427 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
+
+ 429 #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE
+ 441 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
+
+ 443 const char txt[] =
"Byte #: ";
+
+ 445 int len1 = strlen(txt);
+ 446 int len2 = strlen(descr) + 2;
+ 447 int prefix_len = max(len1, len2);
+
+ 449 memset(buf,
' ', prefix_len);
+ 450 buf[prefix_len] =
'\0';
+ 451 offs = (len1 < len2) ? (len2 - len1) : 0;
+ 452 strcpy(&buf[offs], txt);
+
+
+ 455 for (
size_t i = 0 ; i < msgSize; i++) {
+ 456 sprintf(&buf[strlen(buf)],
"%02d ", i);
+
+
+
+ 460 memset(buf,
' ', prefix_len);
+ 461 buf[prefix_len] =
'\0';
+ 462 offs = (len1 > len2) ? (len1 - len2) : 0;
+ 463 sprintf(&buf[offs],
"%s: ", descr);
+
+ 465 for (
size_t i = 0 ; i < msgSize; i++) {
+ 466 sprintf(&buf[strlen(buf)],
"%02X ", msg[i]);
+
+
+
+
+
+
+ 476 void printRawdata(uint8_t *msg, uint8_t msgSize) {
+ 477 DEBUG_PRINT(F(
"Raw Data: "));
+ 478 for (uint8_t p = 0 ; p < msgSize ; p++) {
+
+
+
+ 482 DEBUG_PRINT(msg[p], HEX);
+
+
+
+
+
+
+
+
+
+Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:141
DecodeStatus getMessage(void)
Tries to receive radio message (non-blocking) and to decode it. Timeout occurs after a multitude of e...
Definition: WeatherSensor.cpp:212
int findId(uint32_t id)
Definition: WeatherSensor.cpp:404
bool is_decode3in1(uint32_t id)
Definition: WeatherSensor.cpp:430
-float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:246
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:247
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:155
bool genMessage(int i, uint32_t id=0xff, uint8_t type=1, uint8_t channel=0)
Generates data otherwise received and decoded from a radio message.
Definition: WeatherSensor.cpp:298
int16_t begin(void)
Presence check and initialization of radio module.
Definition: WeatherSensor.cpp:97
-WeatherSensor()
Constructor.
Definition: WeatherSensor.h:146
+WeatherSensor()
Constructor.
Definition: WeatherSensor.h:147
int findType(uint8_t type, uint8_t channel=0xFF)
Definition: WeatherSensor.cpp:417
-sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:245
-void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:265
+sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:246
+void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:266
DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize)
Decode message Tries the available decoders until a decoding was successful.
Definition: WeatherSensor.cpp:254
-Mapping of sensor IDs to names.
Definition: WeatherSensor.h:127
-std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:129
-uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:128
-sensor data and status flags
Definition: WeatherSensor.h:199
-uint16_t lightning_unknown1
unknown part 1
Definition: WeatherSensor.h:238
-bool battery_ok
battery o.k.
Definition: WeatherSensor.h:212
-bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:206
-bool lightning_ok
lightning o.k. (only lightning)
Definition: WeatherSensor.h:214
-uint8_t humidity
humidity in %
Definition: WeatherSensor.h:234
-bool water_leakage_alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:240
-float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:241
-bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:207
-uint8_t lightning_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:237
-uint8_t lightning_distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:236
-uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:235
-bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:205
-bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:208
-uint8_t s_type
sensor type (only 6-in-1)
Definition: WeatherSensor.h:201
-float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:218
-bool startup
startup after reset / battery change
Definition: WeatherSensor.h:203
-uint16_t lightning_unknown2
unknown part 2
Definition: WeatherSensor.h:239
-bool leakage_ok
water leakage o.k. (only water leackage)
Definition: WeatherSensor.h:215
-uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:200
-uint8_t chan
channel (only 6-in-1)
Definition: WeatherSensor.h:202
-bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:209
-bool moisture_ok
moisture o.k. (only 6-in-1)
Definition: WeatherSensor.h:213
-float temp_c
temperature in degC
Definition: WeatherSensor.h:216
-bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:204
-bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:211
-float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:217
-float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:220
-float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:219
-bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:210
+Mapping of sensor IDs to names.
Definition: WeatherSensor.h:128
+std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:130
+uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:129
+sensor data and status flags
Definition: WeatherSensor.h:200
+uint16_t lightning_unknown1
unknown part 1
Definition: WeatherSensor.h:239
+bool battery_ok
battery o.k.
Definition: WeatherSensor.h:213
+bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:207
+bool lightning_ok
lightning o.k. (only lightning)
Definition: WeatherSensor.h:215
+uint8_t humidity
humidity in %
Definition: WeatherSensor.h:235
+bool water_leakage_alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:241
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:242
+bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:208
+uint8_t lightning_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:238
+uint8_t lightning_distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:237
+uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:236
+bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:206
+bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:209
+uint8_t s_type
sensor type (only 6-in-1)
Definition: WeatherSensor.h:202
+float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:219
+bool startup
startup after reset / battery change
Definition: WeatherSensor.h:204
+uint16_t lightning_unknown2
unknown part 2
Definition: WeatherSensor.h:240
+bool leakage_ok
water leakage o.k. (only water leackage)
Definition: WeatherSensor.h:216
+uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:201
+uint8_t chan
channel (only 6-in-1)
Definition: WeatherSensor.h:203
+bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:210
+bool moisture_ok
moisture o.k. (only 6-in-1)
Definition: WeatherSensor.h:214
+float temp_c
temperature in degC
Definition: WeatherSensor.h:217
+bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:205
+bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:212
+float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:218
+float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:221
+float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:220
+bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:211