Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new sensor for weather station Auriol AFW 2 A1, IAN: 297514 #605

Merged
merged 7 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGED
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
22.06.2019
14_SD_WS07.pm: new weather station Auriol AFW 2 A1, IAN: 297514
16.06.2019
00_SIGNALDuino.pm: Support MS signals with multiple syncs as
like Firmware 3.3.1-experimental
Expand Down
2 changes: 1 addition & 1 deletion FHEM/00_SIGNALduino.pm
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ my %matchListSIGNALduino = (
"4:OREGON" => "^(3[8-9A-F]|[4-6][0-9A-F]|7[0-8]).*",
"7:Hideki" => "^P12#75[A-F0-9]+",
"9:CUL_FHTTK" => "^T[A-F0-9]{8}",
"10:SD_WS07" => "^P7#[A-Fa-f0-9]{6}F[A-Fa-f0-9]{2}(#R[A-F0-9][A-F0-9]){0,1}\$",
"10:SD_WS07" => "^P7#[A-Fa-f0-9]{6}[AFaf][A-Fa-f0-9]{2}+",
sidey79 marked this conversation as resolved.
Show resolved Hide resolved
"11:SD_WS09" => "^P9#F[A-Fa-f0-9]+",
"12:SD_WS" => '^W\d+x{0,1}#.*',
"13:RFXX10REC" => '^(20|29)[A-Fa-f0-9]+',
Expand Down
30 changes: 17 additions & 13 deletions FHEM/14_SD_WS07.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# flags are 4 bits B 0 C C, where B is the battery status: 1=OK, 0=LOW
# and CC is the channel: 0=CH1, 1=CH2, 2=CH3
# temp is 12 bit signed scaled by 10
# const is always 1111 (0x0F)
# const is always 1111 (0xF) or 1010 (0xA)
# humiditiy is 8 bits

package main;
Expand All @@ -37,8 +37,7 @@ sub
SD_WS07_Initialize($)
{
my ($hash) = @_;

$hash->{Match} = "^P7#[A-Fa-f0-9]{6}F[A-Fa-f0-9]{2}"; ## pos 7 ist aktuell immer 0xF
$hash->{Match} = "^P7#[A-Fa-f0-9]{6}[AFaf][A-Fa-f0-9]{2}"; ## pos 7 ist aktuell immer 0xF oder 0xA
$hash->{DefFn} = "SD_WS07_Define";
$hash->{UndefFn} = "SD_WS07_Undef";
$hash->{ParseFn} = "SD_WS07_Parse";
Expand Down Expand Up @@ -104,15 +103,16 @@ SD_WS07_Parse($$)

Log3 $iohash, 4, "$iohash->{NAME}: SD_WS07_Parse $model ($msg) length: $hlen";

# 0 4 8 9 12 24 28 36
# 0011 0110 1 010 000100000010 1111 00111000 0000 eas8007
# 0111 0010 1 010 000010111100 1111 00000000 0000 other device from anfichtn
# 1101 0010 0 000 000000010001 1111 00101000 other device from elektron-bbs
# 0110 0011 1 000 000011101010 1111 00001010 other device from HomeAuto_User SD_WS07_TH_631
# 1110 1011 1 000 000010111000 1111 00000000 other device from HomeAuto_User SD_WS07_T_EB1
# 1100 0100 1 000 000100100010 1111 00000000 other device from HomeAuto_User SD_WS07_T_C41
# 0110 0100 0 000 000100001110 1111 00101010 hama TS36E from HomeAuto_User - Bat bit identified
# ID Bat CHN TMP ?? HUM
# 0 4 8 12 24 28 36
# 00110110 1010 000100000010 1111 00111000 0000 eas8007
# 01110010 1010 000010111100 1111 00000000 0000 other device from anfichtn
# 11010010 0000 000000010001 1111 00101000 other device from elektron-bbs
# 01100011 1000 000011101010 1111 00001010 other device from HomeAuto_User SD_WS07_TH_631
# 11101011 1000 000010111000 1111 00000000 other device from HomeAuto_User SD_WS07_T_EB1
# 11000100 1000 000100100010 1111 00000000 other device from HomeAuto_User SD_WS07_T_C41
# 01100100 0000 000100001110 1111 00101010 hama TS36E from HomeAuto_User - Bat bit identified
# 10110001 1000 000100011010 1010 00101100 Auriol AFW 2 A1, IAN: 297514
# Long-ID BSCC TEMPERATURE ?? HUMIDITY B=Battery, S=Sendmode, C=Channel

# Modelliste
my %models = (
Expand All @@ -125,7 +125,8 @@ SD_WS07_Parse($$)

my $id = substr($rawData,0,2);
my $bat = substr($bitData,8,1) eq "1" ? "ok" : "low"; # 1 = ok | 0 = low --> identified on hama TS36E
my $channel = oct("0b" . substr($bitData,9,3)) + 1;
my $sendmode = substr($bitData,9,1) eq "1" ? "manual" : "auto"; # 1 = manual | 0 = auto --> identified on Auriol AFW 2 A1
my $channel = oct("0b" . substr($bitData,10,2)) + 1;
sidey79 marked this conversation as resolved.
Show resolved Hide resolved
my $temp = oct("0b" . substr($bitData,12,12));
my $bit24bis27 = oct("0b".substr($bitData,24,4));
my $hum = oct("0b" . substr($bitData,28,8));
Expand Down Expand Up @@ -265,6 +266,7 @@ SD_WS07_Parse($$)
readingsBulkUpdate($hash, "temperature", $temp) if ($temp ne"");
readingsBulkUpdate($hash, "humidity", $hum) if ($models{$modelkey} eq "TH");
readingsBulkUpdate($hash, "batteryState", $bat);
readingsBulkUpdate($hash, "sendmode", $sendmode);
readingsBulkUpdate($hash, "channel", $channel) if ($channel ne "");
readingsEndUpdate($hash, 1); # Notify is done by Dispatch

Expand Down Expand Up @@ -306,6 +308,7 @@ sub SD_WS07_Attr(@)
<br>
<b>Known models:</b>
<ul>
<li>Auriol AFW 2 A1, IAN: 297514</li>
<li>Eurochon EAS800z</li>
<li>Technoline WS6750/TX70DTH</li>
</ul>
Expand Down Expand Up @@ -387,6 +390,7 @@ sub SD_WS07_Attr(@)
<br>
<b>Unterst&uumltzte Modelle:</b>
<ul>
<li>Auriol AFW 2 A1, IAN: 297514</li>
<li>Eurochon EAS800z</li>
<li>Technoline WS6750/TX70DTH</li>
<li>TFA 30320902</li>
Expand Down
11 changes: 7 additions & 4 deletions FHEM/lib/SD_ProtocolData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ package lib::SD_ProtocolData;
use strict;
use warnings;

our $VERSION = '1.04';
our $VERSION = '1.05';
our %protocols = (
"0" => ## various weather sensors (500 | 9100)
# ABS700 | Id:79 T: 3.3 Bat:low MS;P1=-7949;P2=492;P3=-1978;P4=-3970;D=21232423232424242423232323232324242423232323232424;CP=2;SP=1;R=245;O;
Expand Down Expand Up @@ -328,9 +328,12 @@ package lib::SD_ProtocolData;
},
"7" => ## weather sensors like EAS800z
# Ch:1 T: 19.8 H: 11 Bat:low MS;P1=-3882;P2=504;P3=-957;P4=-1949;D=21232424232323242423232323232323232424232323242423242424242323232324232424;CP=2;SP=1;R=249;m=2;
# https://forum.fhem.de/index.php/topic,101682.0.html (Auriol AFW 2 A1, IAN: 297514)
# Ch:1 T: 28.2 H: 44 Bat:ok MS;P0=494;P1=-1949;P2=-967;P3=-3901;D=03010201010202020101020202020202010202020101020102010201020202010201010202;CP=0;SP=3;R=37;m0;
# Ch:1 T: 24.4 H: 56 Bat:ok MS;P1=-1940;P2=495;P3=-957;P4=-3878;D=24212321212323232121232323232323232121212123212323212321232323212121232323;CP=2;SP=4;R=20;O;m1;
{
name => 'weather',
comment => 'EAS800z, FreeTec NC-7344, HAMA TS34A',
name => 'Weather',
comment => 'EAS800z, FreeTec NC-7344, HAMA TS34A, Auriol AFW 2 A1',
id => '7',
knownFreqs => '433.92',
one => [1,-4],
Expand All @@ -340,7 +343,7 @@ package lib::SD_ProtocolData;
format => 'twostate',
preamble => 'P7#', # prepend to converted message
clientmodule => 'SD_WS07',
modulematch => '^P7#.{6}F.{2}',
modulematch => '^P7#.{6}[AFaf].{2}',
length_min => '35',
length_max => '40',
},
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Supported Devices / Protocols
|Somfy RTS | Shutters from Somfy|
|Opus XT300 | Soil moisture sensor |
|Oregon NR868 | Motion sensor |
|Auriol IAN 60107, 114324, 275901, 283582 (Lidl) | Weatherstation |
|Auriol IAN 60107, 114324, 275901, 283582, 297514 (Lidl) | Weatherstation |
|FreeTec PE-6946 | wireless bell |
|Elro DB200, KANGTAI, unitec | wireless bell |
|m-e VTX and BASIC | wireless bell |
Expand Down