From a1222b948d750ccdf275ff8e7585d364f6ed45d6 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 12 Oct 2008 15:07:46 +0000 Subject: [PATCH] CUL_WS / CUL changes git-svn-id: https://svn.fhem.de/fhem/trunk@255 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 +- fhem/FHEM/00_CUL.pm | 11 ++++++----- fhem/FHEM/14_CUL_WS.pm | 4 ++-- fhem/docs/faq.html | 10 +++++++--- fhem/webfrontend/pgm2/style.css | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 2bb5cdb13..6dd1ffc0d 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -433,4 +433,4 @@ - feature: FHT internal modifications (better protocol understanding) - feature: add timestamp to inform - feature: The strange stty settings in 00_FHEM.pm are optional - + - bugfix: webpgm2 iPhone fix diff --git a/fhem/FHEM/00_CUL.pm b/fhem/FHEM/00_CUL.pm index ff2e199cc..1acff6165 100755 --- a/fhem/FHEM/00_CUL.pm +++ b/fhem/FHEM/00_CUL.pm @@ -39,13 +39,13 @@ my %gets = ( "eeprom" => "R", "version" => "V", "time" => "t", + "raw" => "", "ccconf" => "=", ); my %sets = ( "eeprom" => "W", - "rawFS20" => "F", - "rawFHT" => "T", + "raw" => "", "verbose" => "X", "freq" => "=", "bandwidth" => "=", @@ -200,7 +200,8 @@ GOTBW: } else { - return "Expecting a 0-padded hex number" if((length($arg)&1) == 1); + return "Expecting a 0-padded hex number" + if((length($arg)&1) == 1 && $type ne "raw"); $initstr = "X$arg" if($type eq "verbose"); Log GetLogLevel($name,4), "set $name $type $arg"; CUL_Write($hash, $sets{$type}, $arg); @@ -383,7 +384,7 @@ CUL_Write($$$) ################### # Rewrite message from FHZ -> CUL - if(length($fn) == 1) { # CUL Native + if(length($fn) <= 1) { # CUL Native } elsif($fn eq "04" && substr($msg,0,6) eq "010101") { # FS20 $fn = "F"; $msg = substr($msg,6); @@ -558,7 +559,7 @@ CUL_Read($) } elsif($fn eq "K") { - if($len == 15) { # Reformat for 13_KS300.pm + if($len == 99) { # Reformat for 13_KS300.pm my @a = split("", $dmsg); $dmsg = sprintf("81%02x04xx4027a001", $len/2+6); for(my $i = 0; $i < 14; $i+=2) { # Swap nibbles. diff --git a/fhem/FHEM/14_CUL_WS.pm b/fhem/FHEM/14_CUL_WS.pm index 7e5563169..532b70a32 100755 --- a/fhem/FHEM/14_CUL_WS.pm +++ b/fhem/FHEM/14_CUL_WS.pm @@ -23,7 +23,7 @@ CUL_WS_Initialize($) # Message is like # K41350270 - $hash->{Match} = "^K.....\$"; + $hash->{Match} = "^K....."; $hash->{DefFn} = "CUL_WS_Define"; $hash->{UndefFn} = "CUL_WS_Undef"; $hash->{ParseFn} = "CUL_WS_Parse"; @@ -58,7 +58,7 @@ sub CUL_WS_Undef($$) { my ($hash, $name) = @_; - delete($defptr{$hash->{CODE}}); + delete($defptr{$hash->{CODE}}) if($hash && $hash->{CODE}); return undef; } diff --git a/fhem/docs/faq.html b/fhem/docs/faq.html index 15589b28b..898745232 100644 --- a/fhem/docs/faq.html +++ b/fhem/docs/faq.html @@ -330,7 +330,7 @@ messages from my FHT80b. How to switch back to the actuator:0% messages? localhost 7072) and issue the command "inform on". If there is an FS20/HMS/etc event, then you'll see a line of the form "TYPE DEVICENAME EVENT". Some devicetypes generate more than one trigger - message for one event, (E.g. HMS or KS300.
+ message for one event, e.g. HMS or KS300.
Example: you have an FS20 device named piri, which sends a command "on-for-timer 60". In this case you'll see: FS20 piri on-for-timer 60

@@ -338,11 +338,15 @@ messages from my FHT80b. How to switch back to the actuator:0% messages? Now define your notify/filelog. The regexp specified will be tested against the DEVICENAME and against the DEVICENAME:EVENT strings. If they match, then the action will be executed. For our example this would be: - define piri_ntfy piri:on.* some_command

+ define piri_ntfy notify piri:on.* some_command

You can test the notify/filelog with the trigger command: issue "trigger DEVICENAME EVENT" in the telnet prompt, and check if your notify/filelog - works as designed. Example: trigger piri on-for-timer 60

+ works as designed. Example: trigger piri on-for-timer 60
+ Tip: you can test a new setup without a connected FHZ1x00. Create a new + config file, set the FHZ1x00 device to none, and generate events via + trigger. +

diff --git a/fhem/webfrontend/pgm2/style.css b/fhem/webfrontend/pgm2/style.css index a4b29edb2..35240b9a5 100644 --- a/fhem/webfrontend/pgm2/style.css +++ b/fhem/webfrontend/pgm2/style.css @@ -48,4 +48,4 @@ table.FHEMWEB tr.odd { background: #F0F0F0; } #hdr { position:absolute; top:10px; left:10px; } #left { position:absolute; top:50px; left:10px; width:130px; } #right { position:absolute; top:50px; left:160px; - right:10px; bottom:10px; overflow:auto; } + right:10px; overflow:auto; }