16
16
/**
17
17
Fuzhou Emax Electronic W6 Professional Weather Station.
18
18
Rebrand and devices decoded :
19
- - Emax W6 / WEC-W6 / 3390TX W6 / EM3390W6
19
+ - Emax W6 / WEC-W6 / 3390TX W6 / EM3390W6 / EM3551H
20
20
- Altronics x7063/4
21
21
- Optex 990040 / 990050 / 990051 / SM-040
22
22
- Infactory FWS-1200
@@ -26,7 +26,7 @@ Rebrand and devices decoded :
26
26
- Protmex PT3390A
27
27
- Jula Marquant 014331 weather station /014332 temp hum sensor
28
28
29
- S.a. issue #2000 #2299 #2326 PR #2300
29
+ S.a. issue #2000 #2299 #2326 #2373 PR #2300 #2346 #2374
30
30
31
31
- Likely a rebranded device, sold by Altronics
32
32
- Data length is 32 bytes with a preamble of 10 bytes (33 bytes for Rain/Wind Station)
@@ -64,10 +64,14 @@ Decoded example:
64
64
aaa CH:1 ID:6e9 FLAGS:0101 TEMP:6b5 HUM:059 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa CHKSUM:d4 000
65
65
66
66
67
- Emax EM3390W6 Rain / Wind speed / Wind Direction / Temp / Hum / UV / Lux
67
+ Emax Rain / Wind speed / Wind Direction / Temp / Hum / UV / Lux
68
+
69
+ Weather Rain/Wind station : humidity not at same byte position as temp/hum sensor.
70
+ - With UV Lux without Wind Gust
71
+ AA 04 II IB 0T TT HH 0W WW 0D DD RR RR UU LL LL 04 05 06 07 08 09 10 11 12 13 14 15 16 17 xx SS yy
72
+ - Without UV / Lux , with Wind Gust
73
+ AA 04 II IB 0T TT HH 0W WW 0D DD RR RR ?0 01 01 GG 04 05 06 07 08 09 10 11 12 13 14 15 16 xx SS yy
68
74
69
- Weather Rain/Wind station : hummidity not at same byte position.
70
- AA 04 II IB 0T TT HH 0W WW 0D DD RR RR 0U LL LL 04 05 06 07 08 09 10 11 12 13 14 15 16 17 xx SS yy
71
75
72
76
default empty/null = 0x01 => value = 0
73
77
@@ -82,6 +86,8 @@ default empty/null = 0x01 => value = 0
82
86
- D: (9 bit) Wind Direction
83
87
- U: (5 bit) UV index
84
88
- L: (1 + 15 bit) Lux value, if first bit = 1 , then x 10 the rest.
89
+ - G: (8 bit) Wind Gust
90
+ - ?: unknown
85
91
- A: (4 bit) fixed values of 0xA
86
92
- 0: (4 bit) fixed values of 0x0
87
93
- xx: incremental value each tx
@@ -184,36 +190,60 @@ static int emax_decode(r_device *decoder, bitbuffer_t *bitbuffer)
184
190
int direction_deg = (((b [9 ] - 1 ) & 0x0f ) << 8 ) | (b [10 ] - 1 );
185
191
int rain_raw = ((b [11 ] - 1 ) << 8 ) | (b [12 ] - 1 );
186
192
float rain_mm = rain_raw * 0.2f ;
187
- int uv_index = (b [13 ] - 1 ) & 0x1f ;
188
- int lux_14 = (b [14 ] - 1 ) & 0xFF ;
189
- int lux_15 = (b [15 ] - 1 ) & 0xFF ;
190
- int lux_multi = ((lux_14 & 0x80 ) >> 7 );
191
- int light_lux = ((lux_14 & 0x7f ) << 8 ) | (lux_15 );
192
- if (lux_multi == 1 ) {
193
- light_lux = light_lux * 10 ;
194
- }
195
-
196
- /* clang-format off */
197
- data_t * data = data_make (
198
- "model" , "" , DATA_STRING , "Emax-W6" ,
199
- "id" , "" , DATA_FORMAT , "%03x" , DATA_INT , id ,
200
- "channel" , "Channel" , DATA_INT , channel ,
201
- "battery_ok" , "Battery_OK" , DATA_INT , !battery_low ,
202
- "temperature_F" , "Temperature" , DATA_FORMAT , "%.1f F" , DATA_DOUBLE , temp_f ,
203
- "humidity" , "Humidity" , DATA_FORMAT , "%u %%" , DATA_INT , humidity ,
204
- "wind_avg_km_h" , "Wind avg speed" , DATA_FORMAT , "%.1f km/h" , DATA_DOUBLE , speed_kmh ,
205
- "wind_dir_deg" , "Wind Direction" , DATA_INT , direction_deg ,
206
- "rain_mm" , "Total rainfall" , DATA_FORMAT , "%.1f mm" , DATA_DOUBLE , rain_mm ,
207
- "uv" , "UV Index" , DATA_FORMAT , "%u" , DATA_INT , uv_index ,
208
- "light_lux" , "Lux" , DATA_FORMAT , "%u" , DATA_INT , light_lux ,
209
- "pairing" , "Pairing?" , DATA_COND , pairing , DATA_INT , !!pairing ,
210
- "mic" , "Integrity" , DATA_STRING , "CHECKSUM" ,
211
- NULL );
212
- /* clang-format on */
213
-
214
- decoder_output_data (decoder , data );
215
- return 1 ;
216
193
194
+ if (b [29 ] == 0x17 ) { // with UV/Lux, without Wind Gust
195
+ int uv_index = (b [13 ] - 1 ) & 0x1f ;
196
+ int lux_14 = (b [14 ] - 1 ) & 0xFF ;
197
+ int lux_15 = (b [15 ] - 1 ) & 0xFF ;
198
+ int lux_multi = ((lux_14 & 0x80 ) >> 7 );
199
+ int light_lux = ((lux_14 & 0x7f ) << 8 ) | (lux_15 );
200
+ if (lux_multi == 1 ) {
201
+ light_lux = light_lux * 10 ;
202
+ }
203
+
204
+ /* clang-format off */
205
+ data_t * data = data_make (
206
+ "model" , "" , DATA_STRING , "Emax-W6" ,
207
+ "id" , "" , DATA_FORMAT , "%03x" , DATA_INT , id ,
208
+ "channel" , "Channel" , DATA_INT , channel ,
209
+ "battery_ok" , "Battery_OK" , DATA_INT , !battery_low ,
210
+ "temperature_F" , "Temperature" , DATA_FORMAT , "%.1f F" , DATA_DOUBLE , temp_f ,
211
+ "humidity" , "Humidity" , DATA_FORMAT , "%u %%" , DATA_INT , humidity ,
212
+ "wind_avg_km_h" , "Wind avg speed" , DATA_FORMAT , "%.1f km/h" , DATA_DOUBLE , speed_kmh ,
213
+ "wind_dir_deg" , "Wind Direction" , DATA_INT , direction_deg ,
214
+ "rain_mm" , "Total rainfall" , DATA_FORMAT , "%.1f mm" , DATA_DOUBLE , rain_mm ,
215
+ "uv" , "UV Index" , DATA_FORMAT , "%u" , DATA_INT , uv_index ,
216
+ "light_lux" , "Lux" , DATA_FORMAT , "%u" , DATA_INT , light_lux ,
217
+ "pairing" , "Pairing?" , DATA_COND , pairing , DATA_INT , !!pairing ,
218
+ "mic" , "Integrity" , DATA_STRING , "CHECKSUM" ,
219
+ NULL );
220
+ /* clang-format on */
221
+
222
+ decoder_output_data (decoder , data );
223
+ return 1 ;
224
+ }
225
+ if (b [29 ] == 0x16 ) { //without UV/Lux with Wind Gust
226
+ float gust_kmh = b [16 ] / 1.5f ;
227
+ /* clang-format off */
228
+ data_t * data = data_make (
229
+ "model" , "" , DATA_STRING , "Emax-EM3551H" ,
230
+ "id" , "" , DATA_FORMAT , "%03x" , DATA_INT , id ,
231
+ "channel" , "Channel" , DATA_INT , channel ,
232
+ "battery_ok" , "Battery_OK" , DATA_INT , !battery_low ,
233
+ "temperature_F" , "Temperature" , DATA_FORMAT , "%.1f F" , DATA_DOUBLE , temp_f ,
234
+ "humidity" , "Humidity" , DATA_FORMAT , "%u %%" , DATA_INT , humidity ,
235
+ "wind_avg_km_h" , "Wind avg speed" , DATA_FORMAT , "%.1f km/h" , DATA_DOUBLE , speed_kmh ,
236
+ "wind_max_km_h" , "Wind max speed" , DATA_FORMAT , "%.1f km/h" , DATA_DOUBLE , gust_kmh ,
237
+ "wind_dir_deg" , "Wind Direction" , DATA_INT , direction_deg ,
238
+ "rain_mm" , "Total rainfall" , DATA_FORMAT , "%.1f mm" , DATA_DOUBLE , rain_mm ,
239
+ "pairing" , "Pairing?" , DATA_COND , pairing , DATA_INT , !!pairing ,
240
+ "mic" , "Integrity" , DATA_STRING , "CHECKSUM" ,
241
+ NULL );
242
+ /* clang-format on */
243
+
244
+ decoder_output_data (decoder , data );
245
+ return 1 ;
246
+ }
217
247
}
218
248
pos += EMAX_MESSAGE_BITLEN ;
219
249
}
@@ -228,6 +258,7 @@ static char const *output_fields[] = {
228
258
"temperature_F" ,
229
259
"humidity" ,
230
260
"wind_avg_km_h" ,
261
+ "wind_max_km_h" ,
231
262
"rain_mm" ,
232
263
"wind_dir_deg" ,
233
264
"uv" ,
0 commit comments