mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 05:57:08 +00:00
70_PylonLowVoltage: new attr waitTimeBetweenRS485Cmd
git-svn-id: https://svn.fhem.de/fhem/trunk@29107 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
68cbb3fa91
commit
a0ca5efab9
@ -472,6 +472,7 @@ sub Attr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cmd eq 'set') {
|
||||||
if ($aName eq 'interval') {
|
if ($aName eq 'interval') {
|
||||||
if (!looks_like_number($aVal)) {
|
if (!looks_like_number($aVal)) {
|
||||||
return qq{The value for $aName is invalid, it must be numeric!};
|
return qq{The value for $aName is invalid, it must be numeric!};
|
||||||
@ -480,16 +481,17 @@ sub Attr {
|
|||||||
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aName eq 'userBatterytype') {
|
|
||||||
$hash->{HELPER}{AGE1} = 0;
|
|
||||||
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($aName =~ /timeout|waitTimeBetweenRS485Cmd/xs) {
|
if ($aName =~ /timeout|waitTimeBetweenRS485Cmd/xs) {
|
||||||
if (!looks_like_number($aVal)) {
|
if (!looks_like_number($aVal)) {
|
||||||
return qq{The value for $aName is invalid, it must be numeric!};
|
return qq{The value for $aName is invalid, it must be numeric!};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($aName eq 'userBatterytype') {
|
||||||
|
$hash->{HELPER}{AGE1} = 0;
|
||||||
|
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ my %halm = ( #
|
|||||||
# 7E 32 30 31 30 34 36 39 33 45 30 30 32 31 30 = 02D1H -> bitweise invert = 1111 1101 0010 1110 -> +1 = 1111 1101 0010 1111 -> FD2FH
|
# 7E 32 30 31 30 34 36 39 33 45 30 30 32 31 30 = 02D1H -> bitweise invert = 1111 1101 0010 1110 -> +1 = 1111 1101 0010 1111 -> FD2FH
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrsnb = (
|
my %hrsnb = (
|
||||||
1 => { cmd => '20--4693E002--', fnclsnr => 1, fn => 'serialNumber', mlen => 52 },
|
1 => { cmd => '20--4693E002--', fnclsnr => 1, fname => 'serialNumber', mlen => 52 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -238,7 +238,7 @@ my %hrsnb = (
|
|||||||
# 7E 32 20 31 30 34 36 35 31 30 30 30 30 - - FD BD = 0243H -> bitweise invert = 1111 1101 1011 1100 -> +1 = 1111 1101 1011 1101 = FDBDH
|
# 7E 32 20 31 30 34 36 35 31 30 30 30 30 - - FD BD = 0243H -> bitweise invert = 1111 1101 1011 1100 -> +1 = 1111 1101 1011 1101 = FDBDH
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrmfi = (
|
my %hrmfi = (
|
||||||
1 => { cmd => '20--46510000', fnclsnr => 2, fn => 'manufacturerInfo', mlen => 82 },
|
1 => { cmd => '20--46510000', fnclsnr => 2, fname => 'manufacturerInfo', mlen => 82 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -255,7 +255,7 @@ my %hrmfi = (
|
|||||||
# ~ 00 0A 46 4F 00 00 empty
|
# ~ 00 0A 46 4F 00 00 empty
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrprt = (
|
my %hrprt = (
|
||||||
1 => { cmd => '00--464F0000', fnclsnr => 3, fn => 'protocolVersion', mlen => 18 },
|
1 => { cmd => '00--464F0000', fnclsnr => 3, fname => 'protocolVersion', mlen => 18 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -267,7 +267,7 @@ my %hrprt = (
|
|||||||
# 7E 32 30 31 31 34 36 39 36 45 30 30 32 31 31
|
# 7E 32 30 31 31 34 36 39 36 45 30 30 32 31 31
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrswv = (
|
my %hrswv = (
|
||||||
1 => { cmd => '20--4696E002--', fnclsnr => 4, fn => 'softwareVersion', mlen => 30 },
|
1 => { cmd => '20--4696E002--', fnclsnr => 4, fname => 'softwareVersion', mlen => 30 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -279,7 +279,7 @@ my %hrswv = (
|
|||||||
# 7E 32 30 30 41 34 36 34 37 45 30 30 32 30 41
|
# 7E 32 30 30 41 34 36 34 37 45 30 30 32 30 41
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrspm = (
|
my %hrspm = (
|
||||||
1 => { cmd => '20--4647E002--', fnclsnr => 5, fn => 'systemParameter', mlen => 68 },
|
1 => { cmd => '20--4647E002--', fnclsnr => 5, fname => 'systemParameter', mlen => 68 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -297,7 +297,7 @@ my %hrspm = (
|
|||||||
# 7E 32 30 31 30 34 36 34 32 45 30 30 32 31 30
|
# 7E 32 30 31 30 34 36 34 32 45 30 30 32 31 30
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrcmn = (
|
my %hrcmn = (
|
||||||
1 => { cmd => '20--4642E002--', fnclsnr => 6, fn => 'analogValue', mlen => 128 },
|
1 => { cmd => '20--4642E002--', fnclsnr => 6, fname => 'analogValue', mlen => 128 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -309,7 +309,7 @@ my %hrcmn = (
|
|||||||
# 7E 32 30 31 30 34 36 34 34 45 30 30 32 31 30 1111 1101 0011 0010
|
# 7E 32 30 31 30 34 36 34 34 45 30 30 32 31 30 1111 1101 0011 0010
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hralm = (
|
my %hralm = (
|
||||||
1 => { cmd => '20--4644E002--', fnclsnr => 7, fn => 'alarmInfo', mlen => 82 },
|
1 => { cmd => '20--4644E002--', fnclsnr => 7, fname => 'alarmInfo', mlen => 82 },
|
||||||
);
|
);
|
||||||
|
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
@ -321,7 +321,7 @@ my %hralm = (
|
|||||||
# 7E 32 30 30 41 34 36 39 32 45 30 30 32 30 41
|
# 7E 32 30 30 41 34 36 39 32 45 30 30 32 30 41
|
||||||
##################################################################################################################################################################
|
##################################################################################################################################################################
|
||||||
my %hrcmi = (
|
my %hrcmi = (
|
||||||
1 => { cmd => '20--4692E002--', fnclsnr => 8, fn => 'chargeManagmentInfo', mlen => 38 },
|
1 => { cmd => '20--4692E002--', fnclsnr => 8, fname => 'chargeManagmentInfo', mlen => 38 },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -472,6 +472,7 @@ sub Attr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cmd eq 'set') {
|
||||||
if ($aName eq 'interval') {
|
if ($aName eq 'interval') {
|
||||||
if (!looks_like_number($aVal)) {
|
if (!looks_like_number($aVal)) {
|
||||||
return qq{The value for $aName is invalid, it must be numeric!};
|
return qq{The value for $aName is invalid, it must be numeric!};
|
||||||
@ -480,16 +481,17 @@ sub Attr {
|
|||||||
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aName eq 'userBatterytype') {
|
|
||||||
$hash->{HELPER}{AGE1} = 0;
|
|
||||||
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($aName =~ /timeout|waitTimeBetweenRS485Cmd/xs) {
|
if ($aName =~ /timeout|waitTimeBetweenRS485Cmd/xs) {
|
||||||
if (!looks_like_number($aVal)) {
|
if (!looks_like_number($aVal)) {
|
||||||
return qq{The value for $aName is invalid, it must be numeric!};
|
return qq{The value for $aName is invalid, it must be numeric!};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($aName eq 'userBatterytype') {
|
||||||
|
$hash->{HELPER}{AGE1} = 0;
|
||||||
|
InternalTimer(gettimeofday()+1.0, "FHEM::PylonLowVoltage::manageUpdate", $hash, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user