mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 05:57:08 +00:00
ESA2000: add battery state
git-svn-id: https://svn.fhem.de/fhem/trunk@7243 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4c7bbea100
commit
95051ad7d2
@ -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.
|
||||||
|
- change: 64_ESA2000.pm: add batterystate
|
||||||
- added: 42_SMARTMON: Frontend to smartctl (maintainer: hexenmeister)
|
- added: 42_SMARTMON: Frontend to smartctl (maintainer: hexenmeister)
|
||||||
- feature: 70_PushNotifier added line break in Messages (xusader)
|
- feature: 70_PushNotifier added line break in Messages (xusader)
|
||||||
- feature: readingsGroup: added valuePrefix and valueSuffix attributes
|
- feature: readingsGroup: added valuePrefix and valueSuffix attributes
|
||||||
|
@ -13,8 +13,8 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my %codes = (
|
my %codes = (
|
||||||
"011e" => "ESAx000WZ",
|
"01.e" => "ESAx000WZ",
|
||||||
"031e" => "ESA1000Z",
|
"03.e" => "ESA1000Z",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ ESA2000_Parse($$)
|
|||||||
# S Sensorkennung
|
# S Sensorkennung
|
||||||
# ss Sequenze und Sequenzwiederhohlung mit gesetzten höchsten Bit
|
# ss Sequenze und Sequenzwiederhohlung mit gesetzten höchsten Bit
|
||||||
# dddd Device
|
# dddd Device
|
||||||
# cccc Code
|
# cccc Code + Batterystate
|
||||||
# vvvvvvvv vvvv vvvvvv vvvv Valves
|
# vvvvvvvv vvvv vvvvvv vvvv Valves
|
||||||
# tttttttt Gesamtimpules
|
# tttttttt Gesamtimpules
|
||||||
# aaaa Impule je Sequenz
|
# aaaa Impule je Sequenz
|
||||||
@ -106,7 +106,7 @@ ESA2000_Parse($$)
|
|||||||
Log3 $hash, 5, "ESA2000 device $dev";
|
Log3 $hash, 5, "ESA2000 device $dev";
|
||||||
Log3 $hash, 5, "ESA2000 code $cde";
|
Log3 $hash, 5, "ESA2000 code $cde";
|
||||||
|
|
||||||
my $type = "";
|
my $type = "$cde";
|
||||||
foreach my $c (keys %codes) {
|
foreach my $c (keys %codes) {
|
||||||
$c = lc($c);
|
$c = lc($c);
|
||||||
if($cde =~ m/$c/) {
|
if($cde =~ m/$c/) {
|
||||||
@ -131,19 +131,21 @@ ESA2000_Parse($$)
|
|||||||
# ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
|
# ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
|
||||||
# $year = $year + 1900;
|
# $year = $year + 1900;
|
||||||
|
|
||||||
# 0- 5 repeat, sequence, total_ticks, actual_ticks, ticks, raw
|
# 0- 4 repeat, sequence, total_ticks, actual_ticks, ticks
|
||||||
# 6-12 total, actual, diff, diff_sec, diff_ticks, last_sec, raw_total
|
# 5-10 raw, total, actual, diff, diff_sec, diff_ticks
|
||||||
# 13-17 max, day, month, year, rate
|
# 11-17 last_sec, raw_total, max, day, month, year, rate
|
||||||
# 18-23 day_hr, day_lr, month_hr, month_lr, year_hr, year_lr
|
# 18-23 day_hr, day_lr, month_hr, month_lr, year_hr, year_lr
|
||||||
# 24-28 day_last, month_last, year_last, hour, hour_last
|
# 24-28 day_last, month_last, year_last, hour, hour_last
|
||||||
|
# 29 battery
|
||||||
|
|
||||||
if(($type eq "ESAx000WZ") || ($type eq "ESA1000Z")) {
|
if(($type eq "ESAx000WZ") || ($type eq "ESA1000Z")) {
|
||||||
|
|
||||||
@txt = ( "repeat", "sequence", "total_ticks", "actual_ticks", "ticks", "raw",
|
@txt = ( "repeat", "sequence", "total_ticks", "actual_ticks", "ticks",
|
||||||
"total", "actual", "diff", "diff_sec", "diff_ticks", "last_sec", "raw_total",
|
"raw", "total", "actual", "diff", "diff_sec", "diff_ticks",
|
||||||
"max", "day", "month", "year", "rate",
|
"last_sec", "raw_total", "max", "day", "month", "year", "rate",
|
||||||
"day_hr", "day_lr", "month_hr", "month_lr", "year_hr", "year_lr",
|
"day_hr", "day_lr", "month_hr", "month_lr", "year_hr", "year_lr",
|
||||||
"day_last", "month_last", "year_last", "hour", "hour_last" );
|
"day_last", "month_last", "year_last", "hour", "hour_last",
|
||||||
|
"battery" );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -153,6 +155,7 @@ ESA2000_Parse($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Codierung Hex
|
# Codierung Hex
|
||||||
|
$v[29]= int(hex(substr($cde,2,2)) / 128) ? "low" : "ok";
|
||||||
$v[0] = int(hex($seq) / 128) ? "+" : "-";
|
$v[0] = int(hex($seq) / 128) ? "+" : "-";
|
||||||
$v[1] = hex($seq) % 128;
|
$v[1] = hex($seq) % 128;
|
||||||
$v[2] = hex(substr($val,0,8));
|
$v[2] = hex(substr($val,0,8));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user