diff --git a/_weather_sensor_8h_source.html b/_weather_sensor_8h_source.html
index aa2bab74..59fac116 100644
--- a/_weather_sensor_8h_source.html
+++ b/_weather_sensor_8h_source.html
@@ -148,291 +148,294 @@
-
-
-
-
-
- 70 #ifndef WeatherSensor_h
- 71 #define WeatherSensor_h
-
-
-
-
+
+
+
+
+
+
+ 71 #ifndef WeatherSensor_h
+ 72 #define WeatherSensor_h
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
-
- 102 #define WEATHER0_RAIN_OV 1000
- 103 #define WEATHER1_RAIN_OV 100000
-
-
-
- 107 #define DATA_COMPLETE 0x1
- 108 #define DATA_TYPE 0x2
- 109 #define DATA_ALL_SLOTS 0x8
-
-
- 112 #define MSG_BUF_SIZE 27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 93 #define SENSOR_TYPE_WEATHER0 0
+ 94 #define SENSOR_TYPE_WEATHER1 1
+ 95 #define SENSOR_TYPE_THERMO_HYGRO 2
+ 96 #define SENSOR_TYPE_LIGHTNING 3
+ 97 #define SENSOR_TYPE_POOL_THERMO 3
+ 98 #define SENSOR_TYPE_SOIL 4
+ 99 #define SENSOR_TYPE_LEAKAGE 5
+ 100 #define SENSOR_TYPE_RAIN 9
+ 101 #define SENSOR_TYPE_WEATHER_7IN1 11
+
+
+
+ 105 #define WEATHER0_RAIN_OV 1000
+ 106 #define WEATHER1_RAIN_OV 100000
+
+
+
+ 110 #define DATA_COMPLETE 0x1
+ 111 #define DATA_TYPE 0x2
+ 112 #define DATA_ALL_SLOTS 0x8
-
- 115 typedef enum DecodeStatus {
- 116 DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
-
-
-
- 120 #if !defined(ARDUINO_ARCH_AVR)
-
+
+ 115 #define MSG_BUF_SIZE 27
+
+
+ 118 typedef enum DecodeStatus {
+ 119 DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 176 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 255 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t type = 1, uint8_t channel = 0);
-
-
-
-
- 268 for (
int i=0; i< NUM_SENSORS; i++) {
- 269 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 303 int findType(uint8_t type, uint8_t channel = 0xFF);
-
-
-
-
- 316 struct Sensor *pData;
-
- 335 int findSlot(uint32_t
id, DecodeStatus * status);
-
-
- 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: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: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: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: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
+ 123 #if !defined(ARDUINO_ARCH_AVR)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 179 bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0,
void (*func)() = NULL);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 225 #ifdef WIND_DATA_FLOATINGPOINT
+ 226 float wind_direction_deg;
+ 227 float wind_gust_meter_sec;
+ 228 float wind_avg_meter_sec;
+
+ 230 #ifdef WIND_DATA_FIXEDPOINT
+
+
+
+ 234 uint16_t wind_direction_deg_fp1;
+ 235 uint16_t wind_gust_meter_sec_fp1;
+ 236 uint16_t wind_avg_meter_sec_fp1;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 258 bool genMessage(
int i, uint32_t
id = 0xff, uint8_t type = 1, uint8_t channel = 0);
+
+
+
+
+ 271 for (
int i=0; i< NUM_SENSORS; i++) {
+ 272 if ((type == 0xFF) || (
sensor[i].s_type == type)) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 306 int findType(uint8_t type, uint8_t channel = 0xFF);
+
+
+
+
+ 319 struct Sensor *pData;
+
+ 338 int findSlot(uint32_t
id, DecodeStatus * status);
+
+
+ 341 #ifdef BRESSER_5_IN_1
+ 351 DecodeStatus decodeBresser5In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 353 #ifdef BRESSER_6_IN_1
+ 365 DecodeStatus decodeBresser6In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 367 #ifdef BRESSER_7_IN_1
+ 377 DecodeStatus decodeBresser7In1Payload(
const uint8_t *msg, uint8_t msgSize);
+
+ 379 #ifdef BRESSER_LIGHTNING
+ 389 DecodeStatus decodeBresserLightningPayload(
const uint8_t *msg, uint8_t msgSize);
+
+ 391 #ifdef BRESSER_LEAKAGE
+ 401 DecodeStatus decodeBresserLeakagePayload(
const uint8_t *msg, uint8_t msgSize);
+
+
+
+ 408 uint16_t lfsr_digest16(uint8_t
const message[],
unsigned bytes, uint16_t gen, uint16_t key);
+
+ 418 int add_bytes(uint8_t
const message[],
unsigned num_bytes);
+
+ 430 uint16_t crc16(uint8_t
const message[],
unsigned nBytes, uint16_t polynomial, uint16_t init);
+
+ 432 #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE
+ 444 void log_message(
const char *descr,
const uint8_t *msg, uint8_t msgSize) {
+
+ 446 const char txt[] =
"Byte #: ";
+
+ 448 int len1 = strlen(txt);
+ 449 int len2 = strlen(descr) + 2;
+ 450 int prefix_len = max(len1, len2);
+
+ 452 memset(buf,
' ', prefix_len);
+ 453 buf[prefix_len] =
'\0';
+ 454 offs = (len1 < len2) ? (len2 - len1) : 0;
+ 455 strcpy(&buf[offs], txt);
+
+
+ 458 for (
size_t i = 0 ; i < msgSize; i++) {
+ 459 sprintf(&buf[strlen(buf)],
"%02d ", i);
+
+
+
+ 463 memset(buf,
' ', prefix_len);
+ 464 buf[prefix_len] =
'\0';
+ 465 offs = (len1 > len2) ? (len1 - len2) : 0;
+ 466 sprintf(&buf[offs],
"%s: ", descr);
+
+ 468 for (
size_t i = 0 ; i < msgSize; i++) {
+ 469 sprintf(&buf[strlen(buf)],
"%02X ", msg[i]);
+
+
+
+
+
+
+ 479 void printRawdata(uint8_t *msg, uint8_t msgSize) {
+ 480 DEBUG_PRINT(F(
"Raw Data: "));
+ 481 for (uint8_t p = 0 ; p < msgSize ; p++) {
+
+
+
+ 485 DEBUG_PRINT(msg[p], HEX);
+
+
+
+
+
+
+
+
+
+Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:144
+DecodeStatus getMessage(void)
Tries to receive radio message (non-blocking) and to decode it. Timeout occurs after a multitude of e...
Definition: WeatherSensor.cpp:213
+int findId(uint32_t id)
Definition: WeatherSensor.cpp:405
+bool is_decode3in1(uint32_t id)
Definition: WeatherSensor.cpp:431
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:250
+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:156
+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:299
+int16_t begin(void)
Presence check and initialization of radio module.
Definition: WeatherSensor.cpp:98
+WeatherSensor()
Constructor.
Definition: WeatherSensor.h:150
+int findType(uint8_t type, uint8_t channel=0xFF)
Definition: WeatherSensor.cpp:418
+sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:249
+void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:269
+DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize)
Decode message Tries the available decoders until a decoding was successful.
Definition: WeatherSensor.cpp:255
+Mapping of sensor IDs to names.
Definition: WeatherSensor.h:131
+std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:133
+uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:132
+sensor data and status flags
Definition: WeatherSensor.h:203
+uint16_t lightning_unknown1
unknown part 1
Definition: WeatherSensor.h:242
+bool battery_ok
battery o.k.
Definition: WeatherSensor.h:216
+bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:210
+bool lightning_ok
lightning o.k. (only lightning)
Definition: WeatherSensor.h:218
+uint8_t humidity
humidity in %
Definition: WeatherSensor.h:238
+bool water_leakage_alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:244
+float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:245
+bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:211
+uint8_t lightning_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:241
+uint8_t lightning_distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:240
+uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:239
+bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:209
+bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:212
+uint8_t s_type
sensor type (only 6-in-1)
Definition: WeatherSensor.h:205
+float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:222
+bool startup
startup after reset / battery change
Definition: WeatherSensor.h:207
+uint16_t lightning_unknown2
unknown part 2
Definition: WeatherSensor.h:243
+bool leakage_ok
water leakage o.k. (only water leackage)
Definition: WeatherSensor.h:219
+uint32_t sensor_id
sensor ID (5-in-1: 1 byte / 6-in-1: 4 bytes / 7-in-1: 2 bytes)
Definition: WeatherSensor.h:204
+uint8_t chan
channel (only 6-in-1)
Definition: WeatherSensor.h:206
+bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:213
+bool moisture_ok
moisture o.k. (only 6-in-1)
Definition: WeatherSensor.h:217
+float temp_c
temperature in degC
Definition: WeatherSensor.h:220
+bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:208
+bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:215
+float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:221
+float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:224
+float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:223
+bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:214