mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 23:46:35 +00:00
10_EnOcean: EEP A5-3F-7F (Eltako_FRM60) changed
git-svn-id: https://svn.fhem.de/fhem/trunk@25903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8107ae2c93
commit
8c01f827bc
@ -10828,7 +10828,8 @@ sub EnOcean_Parse($$) {
|
|||||||
# Direction exchange (EEP A5-13-05)
|
# Direction exchange (EEP A5-13-05)
|
||||||
my $elevation = $db[3] - 90;
|
my $elevation = $db[3] - 90;
|
||||||
push @event, "3:sunElevation:$elevation";
|
push @event, "3:sunElevation:$elevation";
|
||||||
push @event, "3:sunAzimuth:" . hex(substr($data, 2, 4));
|
#push @event, "3:sunAzimuth:" . hex(substr($data, 2, 4));
|
||||||
|
push @event, "3:sunAzimuth:" . (($db[2] & 1) << 8 | $db[1]);
|
||||||
my $twilight = ($elevation + 12) / 18 * 100;
|
my $twilight = ($elevation + 12) / 18 * 100;
|
||||||
$twilight = 0 if ($twilight < 0);
|
$twilight = 0 if ($twilight < 0);
|
||||||
$twilight = 100 if ($twilight > 100);
|
$twilight = 100 if ($twilight > 100);
|
||||||
@ -11162,7 +11163,7 @@ sub EnOcean_Parse($$) {
|
|||||||
my ($position, $state);
|
my ($position, $state);
|
||||||
# invert position
|
# invert position
|
||||||
$position = $db[3] == 1 ? 1 : int($db[3] / 2);
|
$position = $db[3] == 1 ? 1 : int($db[3] / 2);
|
||||||
$position = 100 - $db[3];
|
$position = 100 - $position;
|
||||||
if ($position == 100) {
|
if ($position == 100) {
|
||||||
push @event, "3:endPosition:closed";
|
push @event, "3:endPosition:closed";
|
||||||
$state = "closed";
|
$state = "closed";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user