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 @@
84 // 5 - Water Leakage Sensor 6-in-1; PN 7009975
85 // 9 - Professional Rain Gauge (5-in-1 decoder)
86 // 11 - Weather Sensor 7-in-1 7-in-1; PN 7003300
-
87 // ? - Air Quality Sensor
-
88 // ? - Water Leakage Sensor
-
89 // ? - Pool Thermometer
-
90 #define SENSOR_TYPE_WEATHER0 0 // Weather Station
-
91 #define SENSOR_TYPE_WEATHER1 1 // Weather Station
-
92 #define SENSOR_TYPE_THERMO_HYGRO 2 // Thermo-/Hygro-Sensor
-
93 #define SENSOR_TYPE_LIGHTNING 3 // Lightning Sensor
-
94 #define SENSOR_TYPE_SOIL 4 // Soil Temperature and Moisture (from 6-in-1 decoder)
-
95 #define SENSOR_TYPE_LEAKAGE 5 // Water Leakage
-
96 #define SENSOR_TYPE_RAIN 9 // Professional Rain Gauge (from 5-in-1 decoder)
-
97 #define SENSOR_TYPE_WEATHER_7IN1 11 // Weather Sensor 7-in-1
-
98 
+
87 // ? - Air Quality Sensor PM2.5/PM10
+
88 // ? - CO2 Sensor
+
89 // ? - HCHO/VCO Sensor
+
90 // ? - Pool Thermometer
+
91 #define SENSOR_TYPE_WEATHER0 0 // Weather Station
+
92 #define SENSOR_TYPE_WEATHER1 1 // Weather Station
+
93 #define SENSOR_TYPE_THERMO_HYGRO 2 // Thermo-/Hygro-Sensor
+
94 #define SENSOR_TYPE_LIGHTNING 3 // Lightning Sensor
+
95 #define SENSOR_TYPE_SOIL 4 // Soil Temperature and Moisture (from 6-in-1 decoder)
+
96 #define SENSOR_TYPE_LEAKAGE 5 // Water Leakage
+
97 #define SENSOR_TYPE_RAIN 9 // Professional Rain Gauge (from 5-in-1 decoder)
+
98 #define SENSOR_TYPE_WEATHER_7IN1 11 // Weather Sensor 7-in-1
99 
-
100 // Sensor specific rain gauge overflow threshold (mm)
-
101 #define WEATHER0_RAIN_OV 1000
-
102 #define WEATHER1_RAIN_OV 100000
-
103 
+
100 
+
101 // Sensor specific rain gauge overflow threshold (mm)
+
102 #define WEATHER0_RAIN_OV 1000
+
103 #define WEATHER1_RAIN_OV 100000
104 
-
105 // Flags for controlling completion of reception in getData()
-
106 #define DATA_COMPLETE 0x1 // only completed slots (as opposed to partially filled)
-
107 #define DATA_TYPE 0x2 // at least one slot with specific sensor type
-
108 #define DATA_ALL_SLOTS 0x8 // all slots completed
-
109 
-
110 // Message buffer size
-
111 #define MSG_BUF_SIZE 27
-
112 
-
113 // Radio message decoding status
-
114 typedef enum DecodeStatus {
-
115  DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
-
116 } DecodeStatus;
-
117 
+
105 
+
106 // Flags for controlling completion of reception in getData()
+
107 #define DATA_COMPLETE 0x1 // only completed slots (as opposed to partially filled)
+
108 #define DATA_TYPE 0x2 // at least one slot with specific sensor type
+
109 #define DATA_ALL_SLOTS 0x8 // all slots completed
+
110 
+
111 // Message buffer size
+
112 #define MSG_BUF_SIZE 27
+
113 
+
114 // Radio message decoding status
+
115 typedef enum DecodeStatus {
+
116  DECODE_INVALID, DECODE_OK, DECODE_PAR_ERR, DECODE_CHK_ERR, DECODE_DIG_ERR, DECODE_SKIP, DECODE_FULL
+
117 } DecodeStatus;
118 
-
119 #if !defined(ARDUINO_ARCH_AVR)
-
120 #include <string>
-
121 
-
127 typedef struct SensorMap {
-
128  uint32_t id;
-
129  std::string name;
-
130 } SensorMap;
-
131 #endif
-
132 
+
119 
+
120 #if !defined(ARDUINO_ARCH_AVR)
+
121 #include <string>
+
122 
+
128 typedef struct SensorMap {
+
129  uint32_t id;
+
130  std::string name;
+
131 } SensorMap;
+
132 #endif
133 
-
140 class WeatherSensor {
-
141  public:
-
146  WeatherSensor()
-
147  {
-
148  };
-
149 
+
134 
+
141 class WeatherSensor {
+
142  public:
+
147  WeatherSensor()
+
148  {
+
149  };
150 
-
156  int16_t begin(void);
-
157 
+
151 
+
157  int16_t begin(void);
158 
-
175  bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0, void (*func)() = NULL);
-
176 
+
159 
+
176  bool getData(uint32_t timeout, uint8_t flags = 0, uint8_t type = 0, void (*func)() = NULL);
177 
-
184  DecodeStatus getMessage(void);
-
185 
-
192  DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize);
-
193 
-
199  struct Sensor {
-
200  uint32_t sensor_id;
-
201  uint8_t s_type;
-
202  uint8_t chan;
-
203  bool startup = false;
-
204  bool valid;
-
205  bool complete;
-
206  bool temp_ok = false;
-
207  bool humidity_ok = false;
-
208  bool light_ok = false;
-
209  bool uv_ok = false;
-
210  bool wind_ok = false;
-
211  bool rain_ok = false;
-
212  bool battery_ok = false;
-
213  bool moisture_ok = false;
-
214  bool lightning_ok = false;
-
215  bool leakage_ok = false;
-
216  float temp_c;
-
217  float light_klx;
-
218  float light_lux;
-
219  float uv;
-
220  float rain_mm;
-
221  #ifdef WIND_DATA_FLOATINGPOINT
-
222  float wind_direction_deg;
-
223  float wind_gust_meter_sec;
-
224  float wind_avg_meter_sec;
-
225  #endif
-
226  #ifdef WIND_DATA_FIXEDPOINT
-
227  // For LoRa_Serialization:
-
228  // fixed point integer with 1 decimal -
-
229  // saves two bytes compared to "RawFloat"
-
230  uint16_t wind_direction_deg_fp1;
-
231  uint16_t wind_gust_meter_sec_fp1;
-
232  uint16_t wind_avg_meter_sec_fp1;
-
233  #endif
-
234  uint8_t humidity;
-
235  uint8_t moisture;
-
236  uint8_t lightning_distance_km;
-
237  uint8_t lightning_count;
-
238  uint16_t lightning_unknown1;
-
239  uint16_t lightning_unknown2;
-
240  bool water_leakage_alarm;
-
241  float rssi;
-
242  };
-
243 
-
244  typedef struct Sensor sensor_t;
-
245  sensor_t sensor[NUM_SENSORS];
-
246  float rssi;
-
247 
+
178 
+
185  DecodeStatus getMessage(void);
+
186 
+
193  DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize);
+
194 
+
200  struct Sensor {
+
201  uint32_t sensor_id;
+
202  uint8_t s_type;
+
203  uint8_t chan;
+
204  bool startup = false;
+
205  bool valid;
+
206  bool complete;
+
207  bool temp_ok = false;
+
208  bool humidity_ok = false;
+
209  bool light_ok = false;
+
210  bool uv_ok = false;
+
211  bool wind_ok = false;
+
212  bool rain_ok = false;
+
213  bool battery_ok = false;
+
214  bool moisture_ok = false;
+
215  bool lightning_ok = false;
+
216  bool leakage_ok = false;
+
217  float temp_c;
+
218  float light_klx;
+
219  float light_lux;
+
220  float uv;
+
221  float rain_mm;
+
222  #ifdef WIND_DATA_FLOATINGPOINT
+
223  float wind_direction_deg;
+
224  float wind_gust_meter_sec;
+
225  float wind_avg_meter_sec;
+
226  #endif
+
227  #ifdef WIND_DATA_FIXEDPOINT
+
228  // For LoRa_Serialization:
+
229  // fixed point integer with 1 decimal -
+
230  // saves two bytes compared to "RawFloat"
+
231  uint16_t wind_direction_deg_fp1;
+
232  uint16_t wind_gust_meter_sec_fp1;
+
233  uint16_t wind_avg_meter_sec_fp1;
+
234  #endif
+
235  uint8_t humidity;
+
236  uint8_t moisture;
+
237  uint8_t lightning_distance_km;
+
238  uint8_t lightning_count;
+
239  uint16_t lightning_unknown1;
+
240  uint16_t lightning_unknown2;
+
241  bool water_leakage_alarm;
+
242  float rssi;
+
243  };
+
244 
+
245  typedef struct Sensor sensor_t;
+
246  sensor_t sensor[NUM_SENSORS];
+
247  float rssi;
248 
-
254  bool genMessage(int i, uint32_t id = 0xff, uint8_t type = 1, uint8_t channel = 0);
-
255 
+
249 
+
255  bool genMessage(int i, uint32_t id = 0xff, uint8_t type = 1, uint8_t channel = 0);
256 
-
265  void clearSlots(uint8_t type = 0xFF)
-
266  {
-
267  for (int i=0; i< NUM_SENSORS; i++) {
-
268  if ((type == 0xFF) || (sensor[i].s_type == type)) {
-
269  sensor[i].valid = false;
-
270  sensor[i].complete = false;
-
271  sensor[i].temp_ok = false;
-
272  sensor[i].humidity_ok = false;
-
273  sensor[i].light_ok = false;
-
274  sensor[i].uv_ok = false;
-
275  sensor[i].wind_ok = false;
-
276  sensor[i].rain_ok = false;
-
277  sensor[i].moisture_ok = false;
-
278  sensor[i].lightning_ok = false;
-
279  sensor[i].leakage_ok = false;
-
280  }
-
281  }
-
282  };
-
283 
-
291  int findId(uint32_t id);
-
292 
+
257 
+
266  void clearSlots(uint8_t type = 0xFF)
+
267  {
+
268  for (int i=0; i< NUM_SENSORS; i++) {
+
269  if ((type == 0xFF) || (sensor[i].s_type == type)) {
+
270  sensor[i].valid = false;
+
271  sensor[i].complete = false;
+
272  sensor[i].temp_ok = false;
+
273  sensor[i].humidity_ok = false;
+
274  sensor[i].light_ok = false;
+
275  sensor[i].uv_ok = false;
+
276  sensor[i].wind_ok = false;
+
277  sensor[i].rain_ok = false;
+
278  sensor[i].moisture_ok = false;
+
279  sensor[i].lightning_ok = false;
+
280  sensor[i].leakage_ok = false;
+
281  }
+
282  }
+
283  };
+
284 
+
292  int findId(uint32_t id);
293 
-
302  int findType(uint8_t type, uint8_t channel = 0xFF);
-
303 
-
312  bool is_decode3in1(uint32_t id);
-
313 
-
314  private:
-
315  struct Sensor *pData;
-
316 
-
334  int findSlot(uint32_t id, DecodeStatus * status);
-
335 
+
294 
+
303  int findType(uint8_t type, uint8_t channel = 0xFF);
+
304 
+
313  bool is_decode3in1(uint32_t id);
+
314 
+
315  private:
+
316  struct Sensor *pData;
+
317 
+
335  int findSlot(uint32_t id, DecodeStatus * status);
336 
-
337  #ifdef BRESSER_5_IN_1
-
347  DecodeStatus decodeBresser5In1Payload(const uint8_t *msg, uint8_t msgSize);
-
348  #endif
-
349  #ifdef BRESSER_6_IN_1
-
361  DecodeStatus decodeBresser6In1Payload(const uint8_t *msg, uint8_t msgSize);
-
362  #endif
-
363  #ifdef BRESSER_7_IN_1
-
373  DecodeStatus decodeBresser7In1Payload(const uint8_t *msg, uint8_t msgSize);
-
374  #endif
-
375  #ifdef BRESSER_LIGHTNING
-
385  DecodeStatus decodeBresserLightningPayload(const uint8_t *msg, uint8_t msgSize);
-
386  #endif
-
387  #ifdef BRESSER_LEAKAGE
-
397  DecodeStatus decodeBresserLeakagePayload(const uint8_t *msg, uint8_t msgSize);
-
398  #endif
-
399 
-
400  protected:
-
404  uint16_t lfsr_digest16(uint8_t const message[], unsigned bytes, uint16_t gen, uint16_t key);
-
405 
-
414  int add_bytes(uint8_t const message[], unsigned num_bytes);
-
415 
-
426  uint16_t crc16(uint8_t const message[], unsigned nBytes, uint16_t polynomial, uint16_t init);
-
427 
-
428  #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE
-
440  void log_message(const char *descr, const uint8_t *msg, uint8_t msgSize) {
-
441  char buf[128];
-
442  const char txt[] = "Byte #: ";
-
443  int offs;
-
444  int len1 = strlen(txt);
-
445  int len2 = strlen(descr) + 2; // add colon and space
-
446  int prefix_len = max(len1, len2);
-
447 
-
448  memset(buf, ' ', prefix_len);
-
449  buf[prefix_len] = '\0';
-
450  offs = (len1 < len2) ? (len2 - len1) : 0;
-
451  strcpy(&buf[offs], txt);
-
452 
-
453  // Print byte index
-
454  for (size_t i = 0 ; i < msgSize; i++) {
-
455  sprintf(&buf[strlen(buf)], "%02d ", i);
-
456  }
-
457  log_v("%s", buf);
-
458 
-
459  memset(buf, ' ', prefix_len);
-
460  buf[prefix_len] ='\0';
-
461  offs = (len1 > len2) ? (len1 - len2) : 0;
-
462  sprintf(&buf[offs], "%s: ", descr);
-
463 
-
464  for (size_t i = 0 ; i < msgSize; i++) {
-
465  sprintf(&buf[strlen(buf)], "%02X ", msg[i]);
-
466  }
-
467  log_v("%s", buf);
-
468  }
-
469  #endif
-
470 
-
471  #ifdef _DEBUG_MODE_
-
475  void printRawdata(uint8_t *msg, uint8_t msgSize) {
-
476  DEBUG_PRINT(F("Raw Data: "));
-
477  for (uint8_t p = 0 ; p < msgSize ; p++) {
-
478  if (msg[p] < 16) {
-
479  DEBUG_PRINT("0");
-
480  }
-
481  DEBUG_PRINT(msg[p], HEX);
-
482  DEBUG_PRINT(" ");
-
483  }
-
484  DEBUG_PRINTLN();
-
485  };
-
486  #endif
-
487 
-
488 };
-
489 
-
490 #endif
-
WeatherSensor
Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:140
+
337 
+
338  #ifdef BRESSER_5_IN_1
+
348  DecodeStatus decodeBresser5In1Payload(const uint8_t *msg, uint8_t msgSize);
+
349  #endif
+
350  #ifdef BRESSER_6_IN_1
+
362  DecodeStatus decodeBresser6In1Payload(const uint8_t *msg, uint8_t msgSize);
+
363  #endif
+
364  #ifdef BRESSER_7_IN_1
+
374  DecodeStatus decodeBresser7In1Payload(const uint8_t *msg, uint8_t msgSize);
+
375  #endif
+
376  #ifdef BRESSER_LIGHTNING
+
386  DecodeStatus decodeBresserLightningPayload(const uint8_t *msg, uint8_t msgSize);
+
387  #endif
+
388  #ifdef BRESSER_LEAKAGE
+
398  DecodeStatus decodeBresserLeakagePayload(const uint8_t *msg, uint8_t msgSize);
+
399  #endif
+
400 
+
401  protected:
+
405  uint16_t lfsr_digest16(uint8_t const message[], unsigned bytes, uint16_t gen, uint16_t key);
+
406 
+
415  int add_bytes(uint8_t const message[], unsigned num_bytes);
+
416 
+
427  uint16_t crc16(uint8_t const message[], unsigned nBytes, uint16_t polynomial, uint16_t init);
+
428 
+
429  #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE
+
441  void log_message(const char *descr, const uint8_t *msg, uint8_t msgSize) {
+
442  char buf[128];
+
443  const char txt[] = "Byte #: ";
+
444  int offs;
+
445  int len1 = strlen(txt);
+
446  int len2 = strlen(descr) + 2; // add colon and space
+
447  int prefix_len = max(len1, len2);
+
448 
+
449  memset(buf, ' ', prefix_len);
+
450  buf[prefix_len] = '\0';
+
451  offs = (len1 < len2) ? (len2 - len1) : 0;
+
452  strcpy(&buf[offs], txt);
+
453 
+
454  // Print byte index
+
455  for (size_t i = 0 ; i < msgSize; i++) {
+
456  sprintf(&buf[strlen(buf)], "%02d ", i);
+
457  }
+
458  log_v("%s", buf);
+
459 
+
460  memset(buf, ' ', prefix_len);
+
461  buf[prefix_len] ='\0';
+
462  offs = (len1 > len2) ? (len1 - len2) : 0;
+
463  sprintf(&buf[offs], "%s: ", descr);
+
464 
+
465  for (size_t i = 0 ; i < msgSize; i++) {
+
466  sprintf(&buf[strlen(buf)], "%02X ", msg[i]);
+
467  }
+
468  log_v("%s", buf);
+
469  }
+
470  #endif
+
471 
+
472  #ifdef _DEBUG_MODE_
+
476  void printRawdata(uint8_t *msg, uint8_t msgSize) {
+
477  DEBUG_PRINT(F("Raw Data: "));
+
478  for (uint8_t p = 0 ; p < msgSize ; p++) {
+
479  if (msg[p] < 16) {
+
480  DEBUG_PRINT("0");
+
481  }
+
482  DEBUG_PRINT(msg[p], HEX);
+
483  DEBUG_PRINT(" ");
+
484  }
+
485  DEBUG_PRINTLN();
+
486  };
+
487  #endif
+
488 
+
489 };
+
490 
+
491 #endif
+
WeatherSensor
Receive, decode and store Bresser Weather Sensor Data Uses CC1101 or SX1276 radio module for receivin...
Definition: WeatherSensor.h:141
WeatherSensor::getMessage
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
WeatherSensor::findId
int findId(uint32_t id)
Definition: WeatherSensor.cpp:404
WeatherSensor::is_decode3in1
bool is_decode3in1(uint32_t id)
Definition: WeatherSensor.cpp:430
-
WeatherSensor::rssi
float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:246
+
WeatherSensor::rssi
float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:247
WeatherSensor::getData
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
WeatherSensor::genMessage
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
WeatherSensor::begin
int16_t begin(void)
Presence check and initialization of radio module.
Definition: WeatherSensor.cpp:97
-
WeatherSensor::WeatherSensor
WeatherSensor()
Constructor.
Definition: WeatherSensor.h:146
+
WeatherSensor::WeatherSensor
WeatherSensor()
Constructor.
Definition: WeatherSensor.h:147
WeatherSensor::findType
int findType(uint8_t type, uint8_t channel=0xFF)
Definition: WeatherSensor.cpp:417
-
WeatherSensor::sensor
sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:245
-
WeatherSensor::clearSlots
void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:265
+
WeatherSensor::sensor
sensor_t sensor[NUM_SENSORS]
sensor data array
Definition: WeatherSensor.h:246
+
WeatherSensor::clearSlots
void clearSlots(uint8_t type=0xFF)
Clear sensor data.
Definition: WeatherSensor.h:266
WeatherSensor::decodeMessage
DecodeStatus decodeMessage(const uint8_t *msg, uint8_t msgSize)
Decode message Tries the available decoders until a decoding was successful.
Definition: WeatherSensor.cpp:254
-
SensorMap
Mapping of sensor IDs to names.
Definition: WeatherSensor.h:127
-
SensorMap::name
std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:129
-
SensorMap::id
uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:128
-
WeatherSensor::Sensor
sensor data and status flags
Definition: WeatherSensor.h:199
-
WeatherSensor::Sensor::lightning_unknown1
uint16_t lightning_unknown1
unknown part 1
Definition: WeatherSensor.h:238
-
WeatherSensor::Sensor::battery_ok
bool battery_ok
battery o.k.
Definition: WeatherSensor.h:212
-
WeatherSensor::Sensor::temp_ok
bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:206
-
WeatherSensor::Sensor::lightning_ok
bool lightning_ok
lightning o.k. (only lightning)
Definition: WeatherSensor.h:214
-
WeatherSensor::Sensor::humidity
uint8_t humidity
humidity in %
Definition: WeatherSensor.h:234
-
WeatherSensor::Sensor::water_leakage_alarm
bool water_leakage_alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:240
-
WeatherSensor::Sensor::rssi
float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:241
-
WeatherSensor::Sensor::humidity_ok
bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:207
-
WeatherSensor::Sensor::lightning_count
uint8_t lightning_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:237
-
WeatherSensor::Sensor::lightning_distance_km
uint8_t lightning_distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:236
-
WeatherSensor::Sensor::moisture
uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:235
-
WeatherSensor::Sensor::complete
bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:205
-
WeatherSensor::Sensor::light_ok
bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:208
-
WeatherSensor::Sensor::s_type
uint8_t s_type
sensor type (only 6-in-1)
Definition: WeatherSensor.h:201
-
WeatherSensor::Sensor::light_lux
float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:218
-
WeatherSensor::Sensor::startup
bool startup
startup after reset / battery change
Definition: WeatherSensor.h:203
-
WeatherSensor::Sensor::lightning_unknown2
uint16_t lightning_unknown2
unknown part 2
Definition: WeatherSensor.h:239
-
WeatherSensor::Sensor::leakage_ok
bool leakage_ok
water leakage o.k. (only water leackage)
Definition: WeatherSensor.h:215
-
WeatherSensor::Sensor::sensor_id
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
-
WeatherSensor::Sensor::chan
uint8_t chan
channel (only 6-in-1)
Definition: WeatherSensor.h:202
-
WeatherSensor::Sensor::uv_ok
bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:209
-
WeatherSensor::Sensor::moisture_ok
bool moisture_ok
moisture o.k. (only 6-in-1)
Definition: WeatherSensor.h:213
-
WeatherSensor::Sensor::temp_c
float temp_c
temperature in degC
Definition: WeatherSensor.h:216
-
WeatherSensor::Sensor::valid
bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:204
-
WeatherSensor::Sensor::rain_ok
bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:211
-
WeatherSensor::Sensor::light_klx
float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:217
-
WeatherSensor::Sensor::rain_mm
float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:220
-
WeatherSensor::Sensor::uv
float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:219
-
WeatherSensor::Sensor::wind_ok
bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:210
+
SensorMap
Mapping of sensor IDs to names.
Definition: WeatherSensor.h:128
+
SensorMap::name
std::string name
Name of sensor (e.g. for MQTT topic)
Definition: WeatherSensor.h:130
+
SensorMap::id
uint32_t id
ID if sensor (as transmitted in radio message)
Definition: WeatherSensor.h:129
+
WeatherSensor::Sensor
sensor data and status flags
Definition: WeatherSensor.h:200
+
WeatherSensor::Sensor::lightning_unknown1
uint16_t lightning_unknown1
unknown part 1
Definition: WeatherSensor.h:239
+
WeatherSensor::Sensor::battery_ok
bool battery_ok
battery o.k.
Definition: WeatherSensor.h:213
+
WeatherSensor::Sensor::temp_ok
bool temp_ok
temperature o.k. (only 6-in-1)
Definition: WeatherSensor.h:207
+
WeatherSensor::Sensor::lightning_ok
bool lightning_ok
lightning o.k. (only lightning)
Definition: WeatherSensor.h:215
+
WeatherSensor::Sensor::humidity
uint8_t humidity
humidity in %
Definition: WeatherSensor.h:235
+
WeatherSensor::Sensor::water_leakage_alarm
bool water_leakage_alarm
water leakage alarm (only water leakage)
Definition: WeatherSensor.h:241
+
WeatherSensor::Sensor::rssi
float rssi
received signal strength indicator in dBm
Definition: WeatherSensor.h:242
+
WeatherSensor::Sensor::humidity_ok
bool humidity_ok
humidity o.k.
Definition: WeatherSensor.h:208
+
WeatherSensor::Sensor::lightning_count
uint8_t lightning_count
lightning strike counter (only lightning)
Definition: WeatherSensor.h:238
+
WeatherSensor::Sensor::lightning_distance_km
uint8_t lightning_distance_km
lightning distance in km (only lightning)
Definition: WeatherSensor.h:237
+
WeatherSensor::Sensor::moisture
uint8_t moisture
moisture in % (only 6-in-1)
Definition: WeatherSensor.h:236
+
WeatherSensor::Sensor::complete
bool complete
data is split into two separate messages is complete (only 6-in-1 WS)
Definition: WeatherSensor.h:206
+
WeatherSensor::Sensor::light_ok
bool light_ok
light o.k. (only 7-in-1)
Definition: WeatherSensor.h:209
+
WeatherSensor::Sensor::s_type
uint8_t s_type
sensor type (only 6-in-1)
Definition: WeatherSensor.h:202
+
WeatherSensor::Sensor::light_lux
float light_lux
Light lux (only 7-in-1)
Definition: WeatherSensor.h:219
+
WeatherSensor::Sensor::startup
bool startup
startup after reset / battery change
Definition: WeatherSensor.h:204
+
WeatherSensor::Sensor::lightning_unknown2
uint16_t lightning_unknown2
unknown part 2
Definition: WeatherSensor.h:240
+
WeatherSensor::Sensor::leakage_ok
bool leakage_ok
water leakage o.k. (only water leackage)
Definition: WeatherSensor.h:216
+
WeatherSensor::Sensor::sensor_id
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
+
WeatherSensor::Sensor::chan
uint8_t chan
channel (only 6-in-1)
Definition: WeatherSensor.h:203
+
WeatherSensor::Sensor::uv_ok
bool uv_ok
uv radiation o.k. (only 6-in-1)
Definition: WeatherSensor.h:210
+
WeatherSensor::Sensor::moisture_ok
bool moisture_ok
moisture o.k. (only 6-in-1)
Definition: WeatherSensor.h:214
+
WeatherSensor::Sensor::temp_c
float temp_c
temperature in degC
Definition: WeatherSensor.h:217
+
WeatherSensor::Sensor::valid
bool valid
data valid (but not necessarily complete)
Definition: WeatherSensor.h:205
+
WeatherSensor::Sensor::rain_ok
bool rain_ok
rain gauge level o.k.
Definition: WeatherSensor.h:212
+
WeatherSensor::Sensor::light_klx
float light_klx
Light KLux (only 7-in-1)
Definition: WeatherSensor.h:218
+
WeatherSensor::Sensor::rain_mm
float rain_mm
rain gauge level in mm
Definition: WeatherSensor.h:221
+
WeatherSensor::Sensor::uv
float uv
uv radiation (only 6-in-1)
Definition: WeatherSensor.h:220
+
WeatherSensor::Sensor::wind_ok
bool wind_ok
wind speed/direction o.k. (only 6-in-1)
Definition: WeatherSensor.h:211