Skip to content

Commit

Permalink
SD_ProtocolData.pm
Browse files Browse the repository at this point in the history
- Updated length min, max
- Added new RF Mode
- Updated Testdata
- Updated version
  • Loading branch information
sidey79 committed Apr 2, 2023
1 parent 9a7d108 commit 26c8f20
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
10 changes: 5 additions & 5 deletions FHEM/14_SD_WS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1478,11 +1478,11 @@ sub SD_WS_Parse {
125 => {
# Temperature and humidiry sensor Fine Offset WH31, aka Ambient Weather, aka ecowitt
# ------------------------------------------------------------------------------------------
# Byte: 00 01 02 03 04 05 06 07 08 09 10 11 12 13
# Nibble: 01 23 45 67 89 01 23 45 67 89 01 23 45 67
# aa aa aa 2d d4 30 02 82 62 37 04 51 6C 00 02 00 00 1B 85
# MN;D= 30 02 82 62 37 04 51 6C 00 02 00 00 1B 85;R=63; Temp: 21.0 C Hum: 55%, Battery: ok, ID: 0x02
# FF II CT TT HH XX SS ?? ?? ?? ?? ?? ?? ??
# Byte: 00 01 02 03 04 05 06 07 08 09 10
# Nibble: 01 23 45 67 89 01 23 45 67 89 01
# aa aa aa 2d d4 30 02 82 62 37 04 51 6C 00 02 00
# MN;D= 30 02 82 62 37 04 51 6C 00 02 00 ;R=63; Temp: 21.0 C Hum: 55%, Battery: ok, ID: 0x02
# FF II CT TT HH XX SS ?? ?? ?? ??
# FF: Family code 0x31 = WH31e 0x37 = wh31b
# II: ID (1 byte)
# C : 3bit Channel Number Bit 17-19, 1 Bit Battery bit 20
Expand Down
14 changes: 9 additions & 5 deletions FHEM/lib/SD_ProtocolData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ package lib::SD_ProtocolData;
use strict;
use warnings;

our $VERSION = '1.49';
our $VERSION = '1.50';

our %protocols = (
"0" => ## various weather sensors (500 | 9100)
Expand Down Expand Up @@ -3297,7 +3297,10 @@ package lib::SD_ProtocolData;
clientmodule => 'SD_WS',
length_min => '36',
},
"125" => ## Humidity and Temperaturesensor Ecowitt WH31, MN;D=3002826E3681D96C000200000043;R=56;
"125" => ## Humidity and Temperaturesensor Ecowitt WH31, froggit DP50 / WH31A
# Nordamerika: 915MHz; Europa: 868MHz, andere Regionen: 433MHz
# https://github.com/RFD-FHEM/RFFHEM/pull/1161 @ sidey79 2023-04-01
# MN;D=300282623704516C000200;R=56;
{
name => 'WH31',
comment => 'Fine Offset | Ambient Weather WH31E Thermo-Hygrometer Sensor',
Expand All @@ -3308,10 +3311,11 @@ package lib::SD_ProtocolData;
modulation => '2-FSK',
regexMatch => qr/^(30|37)/,
preamble => 'W125#',
register => ['0001','022E','0343','042D','05D4','0609','0780','0800','0D21','0E65','0FE8','10A9','115C','1202','1322','14F8','1543','1916','1B43','1C68'],
rfmode => 'Fine_Offset_WH57_868',
register => ['0001','022E','0343','042D','05D4','060b','0780','0800','0D21','0E65','0FE8','10A9','115C','1202','1322','14F8','1543','1916','1B43','1C68'],
rfmode => 'Fine_Offset_WH31_868',
clientmodule => 'SD_WS',
length_min => '28',
length_min => '22',
length_max => '22',
},
########################################################################
#### ### register informations from other hardware protocols #### ####
Expand Down
14 changes: 7 additions & 7 deletions t/FHEM/14_SD_WS/testData.json
Original file line number Diff line number Diff line change
Expand Up @@ -2216,27 +2216,27 @@
"data" : [
{
"comment" : "Ecowitt WH31 Temp Hum sensor",
"dmsg" : "W125#300282623704516C000200001B85",
"rmsg" : "MN;D=300282623704516C000200001B85;R=63;",
"dmsg" : "W125#300282623704516C000200",
"rmsg" : "MN;D=300282623704516C000200;R=63;",
"tests" : [
{
"internals" : {
"DEF" : "SD_WS_125_1",
"NAME" : "SD_WS_125_1"
"DEF" : "SD_WS_125_TH_1",
"NAME" : "SD_WS_125_TH_1"
},
"readings" : {
"humidity" : 55,
"state" : "T: 21.0 H: 55",
"temperature" : "21.0",
"type" : "WH31e, WH31b"
"type" : "WH31e, WH31b, DP50"
},
"comment" : "#0"
}
]
},
{
"comment" : "Ecowitt WH31 Temp Hum sensor - wrong checksum ",
"dmsg" : "W125#300282623704526C000200001B85",
"dmsg" : "W125#300282623704526C000200",
"tests" : [
{
"returns" : {
Expand All @@ -2249,7 +2249,7 @@
},
{
"comment" : "Ecowitt WH31 Temp Hum sensor - wrong CRC ",
"dmsg" : "W125#302282623705616C000200001B85",
"dmsg" : "W125#302282623705616C000200",
"tests" : [
{
"returns" : {
Expand Down

0 comments on commit 26c8f20

Please sign in to comment.