mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
30_pilight_temp: added support for pressure, windavg, winddir, windgust
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9179 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
606d53fc2a
commit
24aa1a55ba
1
CHANGED
1
CHANGED
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 30_pilight_temp: - Added support for pressure, windavg, winddir, windgust from weather stations
|
||||||
- feature: 98_Text2Speech.pm:
|
- feature: 98_Text2Speech.pm:
|
||||||
- Quality and Speed as new Parameter
|
- Quality and Speed as new Parameter
|
||||||
- Bugfixing with Google Download
|
- Bugfixing with Google Download
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id: 10_pilight_ctrl.pm 1.09 2015-07-21 Risiko $
|
# $Id: 10_pilight_ctrl.pm 1.10 2015-08-30 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -34,6 +34,7 @@
|
|||||||
# V 1.08 2015-06-23 - FIX: clear send queue by reset
|
# V 1.08 2015-06-23 - FIX: clear send queue by reset
|
||||||
# V 1.08 2015-06-23 - NEW: attribute SendTimeout for abort sending command non blocking
|
# V 1.08 2015-06-23 - NEW: attribute SendTimeout for abort sending command non blocking
|
||||||
# V 1.09 2015-07-21 - NEW: support submodule pilight_raw to send raw codes
|
# V 1.09 2015-07-21 - NEW: support submodule pilight_raw to send raw codes
|
||||||
|
# V 1.10 2015-08-30 - NEW: support pressure, windavg, winddir, windgust from weather stations and GPIO sensors
|
||||||
##############################################
|
##############################################
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
@ -844,7 +845,13 @@ sub pilight_ctrl_Parse($$)
|
|||||||
my $humidity = (defined($data->{$s}{humidity})) ? $data->{$s}{humidity} : "";
|
my $humidity = (defined($data->{$s}{humidity})) ? $data->{$s}{humidity} : "";
|
||||||
my $battery = (defined($data->{$s}{battery})) ? $data->{$s}{battery} : "";
|
my $battery = (defined($data->{$s}{battery})) ? $data->{$s}{battery} : "";
|
||||||
|
|
||||||
my $msg = "PITEMP,$proto,$id,$temp,$humidity,$battery";
|
my $more = "";
|
||||||
|
$more .= ",pressure:$data->{$s}{pressure}" if (defined($data->{$s}{pressure}));
|
||||||
|
$more .= ",windavg:$data->{$s}{windavg}" if (defined($data->{$s}{windavg}));
|
||||||
|
$more .= ",winddir:$data->{$s}{winddir}" if (defined($data->{$s}{winddir}));
|
||||||
|
$more .= ",windgust:$data->{$s}{windgust}" if (defined($data->{$s}{windgust}));
|
||||||
|
|
||||||
|
my $msg = "PITEMP,$proto,$id,$temp,$humidity,$battery$more";
|
||||||
return Dispatch($hash, $msg,undef);
|
return Dispatch($hash, $msg,undef);
|
||||||
}
|
}
|
||||||
case 5 { return Dispatch($hash, "PISCREEN,$proto,$id,$unit,$state",undef); }
|
case 5 { return Dispatch($hash, "PISCREEN,$proto,$id,$unit,$state",undef); }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id: 30_pilight_temp.pm 0.14 2015-05-30 Risiko $
|
# $Id: 30_pilight_temp.pm 0.15 2015-08-30 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -13,6 +13,7 @@
|
|||||||
# V 0.12 2015-05-16 - NEW: attribut corrTemp, a factor to modify temperatur
|
# V 0.12 2015-05-16 - NEW: attribut corrTemp, a factor to modify temperatur
|
||||||
# V 0.13 2015-05-17 - NEW: attribut corrHumidity, a factor to modify humidity
|
# V 0.13 2015-05-17 - NEW: attribut corrHumidity, a factor to modify humidity
|
||||||
# V 0.14 2015-05-30 - FIX: StateFn
|
# V 0.14 2015-05-30 - FIX: StateFn
|
||||||
|
# V 0.15 2015-08-30 - NEW: support pressure, windavg, winddir, windgust
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
@ -112,6 +113,12 @@ sub pilight_temp_Parse($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
readingsBulkUpdate($chash,"battery",$battery) if (defined($battery) && $battery ne "");
|
readingsBulkUpdate($chash,"battery",$battery) if (defined($battery) && $battery ne "");
|
||||||
|
|
||||||
|
foreach my $arg (@args){
|
||||||
|
#pressure, windavg, winddir, windgust
|
||||||
|
my($feature,$value) = split(":",$arg);
|
||||||
|
readingsBulkUpdate($chash,$feature,$value);
|
||||||
|
}
|
||||||
readingsEndUpdate($chash, 1);
|
readingsEndUpdate($chash, 1);
|
||||||
|
|
||||||
return $chash->{NAME};
|
return $chash->{NAME};
|
||||||
@ -127,7 +134,7 @@ sub pilight_temp_Parse($$)
|
|||||||
<h3>pilight_temp</h3>
|
<h3>pilight_temp</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
pilight_temp represents a temperature and humidity sensor receiving dat from pilight<br>
|
pilight_temp represents a temperature and humidity sensor receiving data from pilight<br>
|
||||||
You have to define the base device pilight_ctrl first.<br>
|
You have to define the base device pilight_ctrl first.<br>
|
||||||
Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
|
Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
|
||||||
Supported Sensors: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#weather_stations</a><br>
|
Supported Sensors: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#weather_stations</a><br>
|
||||||
@ -163,6 +170,22 @@ sub pilight_temp_Parse($$)
|
|||||||
battery<br>
|
battery<br>
|
||||||
present the battery state of the senor (if sensor support it)
|
present the battery state of the senor (if sensor support it)
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
pressure<br>
|
||||||
|
present the pressure state of the senor (if sensor support it)
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
windavg<br>
|
||||||
|
present the average wind speed state of the senor (if sensor support it)
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
winddir<br>
|
||||||
|
present the wind direction state of the senor (if sensor support it)
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
windgust<br>
|
||||||
|
present the wind gust state of the senor (if sensor support it)
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<a name="pilight_temp_attr"></a>
|
<a name="pilight_temp_attr"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user