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

Bresser 5in1 2 - Rename readings windDirection, windDirectionText, windGust and windSpeed #995

Merged
merged 9 commits into from
Aug 1, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions CHANGED
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2021-07-29 - Update update.yml

- Use Admin pat, to allow passing branch protection rules

2021-07-13 - AVANTEK - small fix send data (#991)

* Update 14_SD_BELL.pm
Expand Down
28 changes: 14 additions & 14 deletions FHEM/14_SD_WS.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: 14_SD_WS.pm 21666 2021-06-03 16:00:53Z Sidey $
# $Id: 14_SD_WS.pm 21666 2021-07-29 20:39:27Z elektron-bbs $
#
# The purpose of this module is to support serval
# weather sensors which use various protocol
Expand Down Expand Up @@ -1297,10 +1297,10 @@ sub SD_WS_Parse($$)
readingsBulkUpdate($hash, "state", $state);
readingsBulkUpdate($hash, "temperature", $temp) if (defined($temp) && (($temp > -60 && $temp < 70 ) || $protocol eq '106'));
readingsBulkUpdate($hash, "humidity", $hum) if (defined($hum) && ($hum > 0 && $hum < 100 )) ;
readingsBulkUpdate($hash, 'windspeed', $windspeed) if (defined($windspeed)) ;
readingsBulkUpdate($hash, 'winddir', $winddir) if (defined($winddir)) ;
readingsBulkUpdate($hash, 'winddirtxt', $winddirtxt) if (defined($winddirtxt)) ;
readingsBulkUpdate($hash, 'windgust', $windgust) if (defined($windgust)) ;
readingsBulkUpdate($hash, 'windSpeed', $windspeed) if (defined($windspeed)) ;
readingsBulkUpdate($hash, 'windDirection', $winddir) if (defined($winddir)) ;
readingsBulkUpdate($hash, 'windDirectionText', $winddirtxt) if (defined($winddirtxt)) ;
readingsBulkUpdate($hash, 'windGust', $windgust) if (defined($windgust)) ;
readingsBulkUpdate($hash, "batteryState", $bat) if (defined($bat) && length($bat) > 0) ;
readingsBulkUpdate($hash, "batteryChanged", $batChange) if (defined($batChange) && length($batChange) > 0 && $batChange eq "1") ;
readingsBulkUpdate($hash, "channel", $channel, 0) if (defined($channel)&& length($channel) > 0);
Expand Down Expand Up @@ -1415,7 +1415,7 @@ sub SD_WS_WH2SHIFT($){
<li>Opus XT300</li>
<li>PV-8644 infactory Poolthermometer</li>
<li>Renkforce E0001PA</li>
<li>Regenmesser DROP TFA 47.3005.01 mit Regensensor TFA 30.3233.01</li>
<li>Rain gauge DROP TFA 47.3005.01 with rain sensor TFA 30.3233.01</li>
<li>TECVANCE TV-4848</li>
<li>Thermometer TFA 30.3228.02, TFA 30.3229.02, FT007T, FT007TP, F007T, F007TP</li>
<li>Thermo-Hygrometer TFA 30.3208.02, FT007TH, F007TH</li>
Expand Down Expand Up @@ -1460,10 +1460,10 @@ sub SD_WS_WH2SHIFT($){
<li>temperature (&deg;C)</li>
<li>temperatureTrend (consistent, rising, falling)</li>
<li>type (type of sensor)</li>
<li>winddir (Wind direction, 0-337,5°, in Schritten von 22,5°)</li>
<li>winddirtxt (Wind direction, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)</li>
<li>windgust (Gust of wind, m/s)</li>
<li>windspeed (Wind speed, m/s)</li>
<li>windDirection (Wind direction, 0-337,5°, in Schritten von 22,5°)</li>
<li>windDirectionText (Wind direction, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)</li>
<li>windGust (Gust of wind, m/s)</li>
<li>windSpeed (Wind speed, m/s)</li>
</ul><br><br>

<a name="SD_WS Attribute"></a>
Expand Down Expand Up @@ -1577,10 +1577,10 @@ sub SD_WS_WH2SHIFT($){
<li>temperature (Temperatur &deg;C)</li>
<li>temperatureTrend (Trend Temperatur gleichbleibend, steigend, fallend)</li>
<li>type (Sensortypen)</li>
<li>winddir (Windrichtung, 0-337,5°, in Schritten von 22,5°)</li>
<li>winddirtxt (Windrichtung, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)</li>
<li>windgust (Windboe, m/s)</li>
<li>windspeed (Windgeschwindigkeit, m/s)</li>
<li>windDirection (Windrichtung, 0-337,5°, in Schritten von 22,5°)</li>
<li>windDirectionText (Windrichtung, N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)</li>
<li>windGust (Windboe, m/s)</li>
<li>windSpeed (Windgeschwindigkeit, m/s)</li>
</ul>
<br><br>

Expand Down
4 changes: 2 additions & 2 deletions FHEM/lib/SD_ProtocolData.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###########################################################################################################################################
# $Id: SD_ProtocolData.pm 3.4.4 2020-07-16 20:04:45Z Sidey $
# $Id: SD_ProtocolData.pm 3.4.4 2021-07-29 20:39:27Z elektron-bbs $
#
# The file is part of the SIGNALduino project.
# All protocol definitions are contained in this file.
Expand Down Expand Up @@ -2856,7 +2856,7 @@ package lib::SD_ProtocolData;
sync => '2DD4',
modulation => '2-FSK',
rfmode => 'Bresser_5in1',
register => ['0001','0246','0306','042D','05D4','06FF','07C0','0802','0D21','0E65','0FE8','1088','114C','1202','1322','14F8','1551','1916','1B43','1C68'],
register => ['0001','0246','0346','042D','05D4','06FF','07C0','0802','0D21','0E65','0FE8','1088','114C','1202','1322','14F8','1551','1916','1B43','1C68'],
sidey79 marked this conversation as resolved.
Show resolved Hide resolved
preamble => 'W108#',
clientmodule => 'SD_WS',
length_min => '52',
Expand Down
4 changes: 2 additions & 2 deletions controls_signalduino.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ UPD 2020-10-03_11:48:15 11170 FHEM/14_SD_AS.pm
UPD 2021-07-13_20:29:34 29223 FHEM/14_SD_BELL.pm
UPD 2019-11-16_19:42:18 12593 FHEM/14_SD_RSL.pm
UPD 2021-01-28_20:20:20 163235 FHEM/14_SD_UT.pm
UPD 2021-06-30_20:53:09 88368 FHEM/14_SD_WS.pm
UPD 2021-07-29_20:40:01 88414 FHEM/14_SD_WS.pm
UPD 2020-04-13_23:15:56 18426 FHEM/14_SD_WS07.pm
UPD 2020-04-15_23:37:36 35356 FHEM/14_SD_WS09.pm
UPD 2020-04-13_23:15:56 14325 FHEM/14_SD_WS_Maverick.pm
UPD 2018-07-04_21:56:16 37910 FHEM/41_OREGON.pm
UPD 2020-12-17_23:16:30 15582 FHEM/90_SIGNALduino_un.pm
UPD 2021-07-09_10:32:59 212355 FHEM/lib/SD_ProtocolData.pm
UPD 2021-07-29_20:40:01 212362 FHEM/lib/SD_ProtocolData.pm
UPD 2021-06-02_05:49:05 71700 FHEM/lib/SD_Protocols.pm
7 changes: 6 additions & 1 deletion t/FHEM/14_SD_WS/09_parseDatat.t
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ InternalTimer(time()+1, sub {
plan(3); # one for readings and one for internals and one for defmod
note("device will be defined temporary");
is(CommandDefMod(undef,"-temporary $tData->{internals}{NAME} $testSet->{module} $tData->{internals}{DEF}"),U(),"Verify device defmod",$tData);


if ($tData->{attributes}{model}) {
note("device attribute model $tData->{attributes}{model} set for right result");
CommandAttr(undef,"$tData->{internals}{NAME} model $tData->{attributes}{model}"); # set attribute
}

no strict "refs";
&{$modules{$testSet->{module}}{ParseFn}}($ioHash,$tData->{dmsg});
use strict "refs";
Expand Down