mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
09_CUL_FHTTK.pm: modified set option for sync, open and closed with beta CUL firmware based on FW 1.61
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
55ed4471a8
commit
5edba63b65
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.
|
||||||
|
- change: 09_CUL_FHTTK.pm: modified set option for sync, open and closed
|
||||||
- feature: SYSMON: HTML/Text output for SYSMON-CloneDummies
|
- feature: SYSMON: HTML/Text output for SYSMON-CloneDummies
|
||||||
- feature: SYSMON: Method for titled HTML/Text output
|
- feature: SYSMON: Method for titled HTML/Text output
|
||||||
- added: 34_NUT.pm (maintainer: creideiki)
|
- added: 34_NUT.pm (maintainer: creideiki)
|
||||||
|
@ -168,16 +168,24 @@ CUL_FHTTK_Set($@)
|
|||||||
return "Unknown argument $opt ($value), choose one of " . join(" ", @cList);
|
return "Unknown argument $opt ($value), choose one of " . join(" ", @cList);
|
||||||
}
|
}
|
||||||
|
|
||||||
# add T as prefix, because of protocol like TCCCCCXX
|
if($opt eq "Syncing" ) {
|
||||||
my $arg = "T" . $hash->{CODE};
|
Log3 $name, 3, "CUL_FHTTK ($name) syncing with FHT80b.";
|
||||||
|
|
||||||
# fhttfk_c2b
|
IOWrite($hash, "", sprintf("T%s0c", $hash->{CODE})); # 0x0c - sync
|
||||||
$arg .= $fhttfk_c2b{$opt};
|
# window state switch to closed
|
||||||
Log3 $name, 5, "$name $opt message with option code: $arg";
|
|
||||||
|
|
||||||
# write msg to CUL/CUNO
|
} elsif ($opt eq "Open" ) {
|
||||||
CUL_SimpleWrite($hash, $arg);
|
Log3 $name, 3, "CUL_FHTTK ($name) send open window state. ($opt)";
|
||||||
Log3 $name, 2, "CUL_FHTTK set $name $opt";
|
IOWrite($hash, "", sprintf("T%s01", $hash->{CODE})); # 0x01 - open or 0x81
|
||||||
|
|
||||||
|
} elsif ($opt eq "Closed" ) {
|
||||||
|
Log3 $name, 3, "CUL_FHTTK ($name) send closed window state. ($opt)";
|
||||||
|
|
||||||
|
IOWrite($hash, "", sprintf("T%s02", $hash->{CODE})); # 0x02 - closed or 0x82
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return "Unknown argument $a[1], choose one of Syncing Open Closed"
|
||||||
|
}
|
||||||
|
|
||||||
# update new state
|
# update new state
|
||||||
readingsSingleUpdate($hash, "state", $opt, 1);
|
readingsSingleUpdate($hash, "state", $opt, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user