mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
30_pilight_xyz: possibility to change IO-Device (IODEV)
git-svn-id: https://svn.fhem.de/fhem/trunk@10196 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
12373cd62a
commit
6e262a1ac5
@ -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_xyz: possibility to change IO-Device (IODEV)
|
||||||
- bugfix: YAMAHA_AVR: fixing not correctly volume smoothing
|
- bugfix: YAMAHA_AVR: fixing not correctly volume smoothing
|
||||||
- change: 49_SSCam: turned completly to HttpUtils_NonblockingGet for
|
- change: 49_SSCam: turned completly to HttpUtils_NonblockingGet for
|
||||||
calling websites nonblocking,
|
calling websites nonblocking,
|
||||||
|
@ -838,11 +838,16 @@ sub pilight_ctrl_Parse($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch($protoID){
|
switch($protoID){
|
||||||
case 1 { return Dispatch($hash, "PISWITCH,$proto,$id,$unit,$state",undef ); }
|
case 1 {
|
||||||
|
my $msg = "PISWITCH,$proto,$id,$unit,$state";
|
||||||
|
Log3 $me, 4, "$me(Dispatch): $msg";
|
||||||
|
return Dispatch($hash, $msg,undef );
|
||||||
|
}
|
||||||
case 2 {
|
case 2 {
|
||||||
my $dimlevel = (defined($data->{$s}{dimlevel})) ? $data->{$s}{dimlevel} : "";
|
my $dimlevel = (defined($data->{$s}{dimlevel})) ? $data->{$s}{dimlevel} : "";
|
||||||
my $msg = "PIDIMMER,$proto,$id,$unit,$state";
|
my $msg = "PIDIMMER,$proto,$id,$unit,$state";
|
||||||
$msg.= ",$dimlevel" if ($dimlevel ne "");
|
$msg.= ",$dimlevel" if ($dimlevel ne "");
|
||||||
|
Log3 $me, 4, "$me(Dispatch): $msg";
|
||||||
return Dispatch($hash, $msg ,undef);
|
return Dispatch($hash, $msg ,undef);
|
||||||
}
|
}
|
||||||
case 3 {return;}
|
case 3 {return;}
|
||||||
@ -857,6 +862,7 @@ sub pilight_ctrl_Parse($$)
|
|||||||
$piTempData .= ",windgust:$data->{$s}{windgust}" if (defined($data->{$s}{windgust}));
|
$piTempData .= ",windgust:$data->{$s}{windgust}" if (defined($data->{$s}{windgust}));
|
||||||
|
|
||||||
my $msg = "PITEMP,$proto,$id$piTempData";
|
my $msg = "PITEMP,$proto,$id$piTempData";
|
||||||
|
Log3 $me, 4, "$me(Dispatch): $msg";
|
||||||
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_dimmer.pm 0.55 2015-07-27 Risiko $
|
# $Id: 30_pilight_dimmer.pm 0.56 2015-12-17 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -15,6 +15,7 @@
|
|||||||
# V 0.53 2015-05-30 - FIX: set dimlevel 0
|
# V 0.53 2015-05-30 - FIX: set dimlevel 0
|
||||||
# V 0.54 2015-05-30 - FIX: StateFn
|
# V 0.54 2015-05-30 - FIX: StateFn
|
||||||
# V 0.55 2015-07-27 - NEW: SetExtensions on-for-timer
|
# V 0.55 2015-07-27 - NEW: SetExtensions on-for-timer
|
||||||
|
# V 0.56 2015-12-17 - NEW: Attribut IODev to switch IO-Device
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
@ -36,7 +37,7 @@ sub pilight_dimmer_Initialize($)
|
|||||||
$hash->{ParseFn} = "pilight_dimmer_Parse";
|
$hash->{ParseFn} = "pilight_dimmer_Parse";
|
||||||
$hash->{SetFn} = "pilight_dimmer_Set";
|
$hash->{SetFn} = "pilight_dimmer_Set";
|
||||||
$hash->{StateFn} = "pilight_dimmer_State";
|
$hash->{StateFn} = "pilight_dimmer_State";
|
||||||
$hash->{AttrList} = "dimlevel_max dimlevel_step dimlevel_max_device dimlevel_on dimlevel_off ".$readingFnAttributes;
|
$hash->{AttrList} = "dimlevel_max dimlevel_step dimlevel_max_device dimlevel_on dimlevel_off IODev ".$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id: 30_pilight_raw.pm 0.11 2015-07-27 Risiko $
|
# $Id: 30_pilight_raw.pm 0.12 2015-12-17 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -9,6 +9,7 @@
|
|||||||
#
|
#
|
||||||
# V 0.10 2015-07-21 - initial beta version
|
# V 0.10 2015-07-21 - initial beta version
|
||||||
# V 0.11 2015-07-27 - SetExtensions on-for-timer
|
# V 0.11 2015-07-27 - SetExtensions on-for-timer
|
||||||
|
# V 0.12 2015-12-17 - NEW: Attribut IODev to switch IO-Device
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
@ -31,7 +32,7 @@ sub pilight_raw_Initialize($)
|
|||||||
$hash->{DefFn} = "pilight_raw_Define";
|
$hash->{DefFn} = "pilight_raw_Define";
|
||||||
$hash->{Match} = "^PIRAW";
|
$hash->{Match} = "^PIRAW";
|
||||||
$hash->{SetFn} = "pilight_raw_Set";
|
$hash->{SetFn} = "pilight_raw_Set";
|
||||||
$hash->{AttrList} = "onCode:textField-long offCode:textField-long ".$readingFnAttributes;
|
$hash->{AttrList} = "onCode:textField-long offCode:textField-long IODev ".$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id: 30_pilight_switch.pm 0.14 2015-07-27 Risiko $
|
# $Id: 30_pilight_switch.pm 0.15 2015-12-17 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -12,6 +12,7 @@
|
|||||||
# V 0.12 2015-05-18 - FIX: add version information
|
# V 0.12 2015-05-18 - FIX: add version information
|
||||||
# V 0.13 2015-05-30 - FIX: StateFn, noArg
|
# V 0.13 2015-05-30 - FIX: StateFn, noArg
|
||||||
# V 0.14 2015-07-27 - NEW: SetExtensions on-for-timer
|
# V 0.14 2015-07-27 - NEW: SetExtensions on-for-timer
|
||||||
|
# V 0.15 2015-12-17 - NEW: Attribut IODev to switch IO-Device
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
@ -38,7 +39,7 @@ sub pilight_switch_Initialize($)
|
|||||||
$hash->{ParseFn} = "pilight_switch_Parse";
|
$hash->{ParseFn} = "pilight_switch_Parse";
|
||||||
$hash->{SetFn} = "pilight_switch_Set";
|
$hash->{SetFn} = "pilight_switch_Set";
|
||||||
$hash->{StateFn} = "pilight_switch_State";
|
$hash->{StateFn} = "pilight_switch_State";
|
||||||
$hash->{AttrList} = $readingFnAttributes;
|
$hash->{AttrList} = "IODev ".$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id: 30_pilight_temp.pm 0.17 2015-11-29 Risiko $
|
# $Id: 30_pilight_temp.pm 0.18 2015-12-17 Risiko $
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
@ -15,7 +15,8 @@
|
|||||||
# 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
|
# V 0.15 2015-08-30 - NEW: support pressure, windavg, winddir, windgust
|
||||||
# V 0.16 2015-09-06 - FIX: pressure, windavg, winddir, windgust from weather stations without temperature
|
# V 0.16 2015-09-06 - FIX: pressure, windavg, winddir, windgust from weather stations without temperature
|
||||||
# V 0.17 2015-11-29 - NEW: offsetTemp and offsetHumidity to correct temperature and humidity
|
# V 0.17 2015-11-29 - NEW: offsetTemp and offsetHumidity to correct temperature and humidity
|
||||||
|
# V 0.18 2015-12-17 - NEW: Attribut IODev to switch IO-Device
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
@ -37,7 +38,7 @@ sub pilight_temp_Initialize($)
|
|||||||
$hash->{Match} = "^PITEMP";
|
$hash->{Match} = "^PITEMP";
|
||||||
$hash->{ParseFn} = "pilight_temp_Parse";
|
$hash->{ParseFn} = "pilight_temp_Parse";
|
||||||
$hash->{StateFn} = "pilight_temp_State";
|
$hash->{StateFn} = "pilight_temp_State";
|
||||||
$hash->{AttrList} = "corrTemp corrHumidity offsetTemp offsetHumidity ".$readingFnAttributes;
|
$hash->{AttrList} = "corrTemp corrHumidity offsetTemp offsetHumidity IODev ".$readingFnAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -85,7 +86,7 @@ sub pilight_temp_Parse($$)
|
|||||||
my ($mhash, $rmsg, $rawdata) = @_;
|
my ($mhash, $rmsg, $rawdata) = @_;
|
||||||
my $backend = $mhash->{NAME};
|
my $backend = $mhash->{NAME};
|
||||||
|
|
||||||
Log3 $backend, 4, "pilight_temp_Parse: RCV -> $rmsg";
|
Log3 $backend, 4, "pilight_temp_Parse ($backend): RCV -> $rmsg";
|
||||||
|
|
||||||
my ($dev,$protocol,$id,@args) = split(",",$rmsg);
|
my ($dev,$protocol,$id,@args) = split(",",$rmsg);
|
||||||
return () if($dev ne "PITEMP");
|
return () if($dev ne "PITEMP");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user