84
84
// 20240714 Added decoder to struct Sensor
85
85
// 20240716 Added option to skip initialization of filters in begin()
86
86
// 20241113 Added getting/setting of sensor include/exclude list from JSON strings
87
+ // 20250127 Added SENSOR_TYPE_WEATHER2 (8-in-1 Weather Sensor)
87
88
//
88
89
// ToDo:
89
90
// -
100
101
#include < RadioLib.h>
101
102
102
103
103
- // Sensor Types
104
+ // Sensor Types / Decoders / Part Numbers
104
105
// 0 - Weather Station 5-in-1; PN 7002510..12/7902510..12
105
106
// 1 - Weather Station 6-in-1; PN 7002585
106
107
// - Professional Wind Gauge 6-in-1; PN 7002531
114
115
// 9 - Lightning Sensor PN 7009976
115
116
// 10 - CO2 Sensor 7-in-1; PN 7009977
116
117
// 11 - HCHO/VCO Sensor 7-in-1; PN 7009978
118
+ // 13 - Weather Station (8-in-1) 7-in-1; PN 7003150
117
119
#define SENSOR_TYPE_WEATHER0 0 // Weather Station
118
120
#define SENSOR_TYPE_WEATHER1 1 // Weather Station
119
121
#define SENSOR_TYPE_THERMO_HYGRO 2 // Thermo-/Hygro-Sensor
125
127
#define SENSOR_TYPE_LIGHTNING 9 // Lightning Sensor
126
128
#define SENSOR_TYPE_CO2 10 // CO2 Sensor
127
129
#define SENSOR_TYPE_HCHO_VOC 11 // Air Quality Sensor (HCHO and VOC)
130
+ #define SENSOR_TYPE_WEATHER2 13 // Weather Station (8-in-1)
128
131
129
132
130
133
// Sensor specific rain gauge overflow threshold (mm)
@@ -159,7 +162,7 @@ typedef enum DecodeStatus {
159
162
* \brief Mapping of sensor IDs to names
160
163
*/
161
164
typedef struct SensorMap {
162
- uint32_t id; // !< ID if sensor (as transmitted in radio message)
165
+ uint32_t id; // !< ID of sensor (as transmitted in radio message)
163
166
std::string name; // !< Name of sensor (e.g. for MQTT topic)
164
167
} SensorMap;
165
168
@@ -196,7 +199,7 @@ class WeatherSensor {
196
199
void sleep (void );
197
200
198
201
/* !
199
- \brief Wait for reception of data or occurrance of timeout.
202
+ \brief Wait for reception of data or occurrence of timeout.
200
203
With BRESSER_6_IN_1, data is distributed across two different messages. Reception of entire
201
204
data is tried if 'complete' is set.
202
205
@@ -209,7 +212,7 @@ class WeatherSensor {
209
212
\param func Callback function for each loop iteration. (default: NULL)
210
213
211
214
\returns false: Timeout occurred.
212
- true: Reception (according to parammeter 'complete') successful.
215
+ true: Reception (according to parameter 'complete') successful.
213
216
*/
214
217
bool getData (uint32_t timeout, uint8_t flags = 0 , uint8_t type = 0 , void (*func)() = NULL);
215
218
@@ -232,12 +235,14 @@ class WeatherSensor {
232
235
233
236
struct Weather {
234
237
bool temp_ok = false ; // !< temperature o.k. (only 6-in-1)
238
+ bool tglobe_ok = false ; // !< globe temperature o.k. (only 8-in-1)
235
239
bool humidity_ok = false ; // !< humidity o.k.
236
240
bool light_ok = false ; // !< light o.k. (only 7-in-1)
237
241
bool uv_ok = false ; // !< uv radiation o.k. (only 6-in-1)
238
242
bool wind_ok = false ; // !< wind speed/direction o.k. (only 6-in-1)
239
243
bool rain_ok = false ; // !< rain gauge level o.k.
240
244
float temp_c = 0.0 ; // !< temperature in degC
245
+ float tglobe_c = 0.0 ; // !< globe temperature in degC (only 8-in-1)
241
246
float light_klx = 0.0 ; // !< Light KLux (only 7-in-1)
242
247
float light_lux = 0.0 ; // !< Light lux (only 7-in-1)
243
248
float uv = 0.0 ; // !< uv radiation (only 6-in-1 & 7-in-1)
@@ -291,7 +296,7 @@ class WeatherSensor {
291
296
292
297
struct AirVOC {
293
298
uint16_t hcho_ppb; // !< formaldehyde concentration in ppb
294
- uint8_t voc_level; // !< volatile organic oompounds ; 1 - bad air quality .. 5 - very good air quality
299
+ uint8_t voc_level; // !< volatile organic compounds ; 1 - bad air quality .. 5 - very good air quality
295
300
bool hcho_init; // !< measurement value invalid due to initialization
296
301
bool voc_init; // !< measurement value invalid due to initialization
297
302
};
0 commit comments