diff --git a/fhem/CHANGED b/fhem/CHANGED index 4f885d11b..31af1e45a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -6,6 +6,7 @@ - bugfix: CUL get should not digest foreign events (fhtsoftbuffer) - bugfix: S300TH sanity check won't allow negative temperatures. - feature: decode CUL uptime + - feature: USB doc changes, FHZ initFS20_02/stopHMS parameters by Andreas. - 2010-08-15 (5.0) - **NOTE*: The default installation path is changed to satisfy lintian diff --git a/fhem/FHEM/00_FHZ.pm b/fhem/FHEM/00_FHZ.pm index 08e1f63d3..0f7e94a84 100755 --- a/fhem/FHEM/00_FHZ.pm +++ b/fhem/FHEM/00_FHZ.pm @@ -14,20 +14,36 @@ sub FHZ_CheckCrc($); sub FHZ_XmitLimitCheck($$); sub FHZ_DoInit($$$); -my $msgstart = pack('H*', "81");# Every msg starts wit this +my $msgstart = pack('H*', "81");# Every msg starts with this + +# See also "FHZ1000 Protocol" http://fhz4linux.info/tiki-index.php?page=FHZ1000%20Protocol + +# NOTE: for protocol analysis, especially the "serial" vs. "FHTcode" case +# is interestingly different yet similar: +# - code 0x84 (FHZ area) vs. 0x83 (FHT area), +# - register 0x57, _read_ vs. 0x9e, _write_ (hmm, or is this "house code" 0x9e01?) +# - _read_ 8 nibbles (4 bytes serial), _write_ 1 (1 byte FHTcode - align-corrected to two nibbles, right?) +# I did some few tests already (also scripted tests), no interesting findings so far, +# but despite that torture my 1300PC still works fine ;) my %gets = ( "init1" => "c9 02011f64", "init2" => "c9 02011f60", "init3" => "c9 02011f0a", "serial" => "04 c90184570208", - "fhtbuf" => "04 c90185", + "fhtbuf" => "04 c90185", # get free FHZ memory (e.g. 23 bytes free) + # NOTE: there probably is another command to return the number of pending + # FHT msg submissions in FHZ (including last one), IOW: 1 == "empty"; + # see thread "Kommunikation FHZ1000PC zum FHT80b" for clues; + # TODO: please analyze in case you use homeputer!! ); my %sets = ( "time" => "c9 020161", "initHMS" => "04 c90186", + "stopHMS" => "04 c90197", "initFS20" => "04 c90196", - "FHTcode" => "04 c901839e0101", + "initFS20_02" => "04 c9019602", # some alternate variant + "FHTcode" => "04 c901839e0101", # (parameter range 1-99, "Zentralencode" in contronics speak; randomly chosen - and forgotten!! - by FHZ, thus better manually hardcode it in fhem.cfg) "raw" => "xx xx", "initfull" => "xx xx", @@ -36,7 +52,9 @@ my %sets = ( my %setnrparam = ( "time" => 0, "initHMS" => 0, + "stopHMS" => 0, "initFS20" => 0, + "initFS20_02" => 0, "FHTcode" => 1, "raw" => 2, "initfull" => 0, diff --git a/fhem/FHEM/11_FHT.pm b/fhem/FHEM/11_FHT.pm index 5e2f57ba6..26b68acd5 100755 --- a/fhem/FHEM/11_FHT.pm +++ b/fhem/FHEM/11_FHT.pm @@ -595,7 +595,7 @@ doSoftBuffer($) } } - # Check if it is still in th CUL buffer. + # Check if it is still in the CUL buffer. if($io->{TYPE} eq "CUL") { my $cul = CallFn($io->{NAME}, "GetFn", $io, (" ", "raw", "T02")); my $arg = uc($h->{ARG}); diff --git a/fhem/docs/USB.html b/fhem/docs/USB.html index f5e36f9a8..4584b6840 100644 --- a/fhem/docs/USB.html +++ b/fhem/docs/USB.html @@ -1,6 +1,6 @@ - USB compendium + USB / interference compendium @@ -11,7 +11,7 @@ devices. This is not an issue of fhem but a problem of hardware and/or USB drivers.

This document summarizes some findings on the issue. They are taken from -users' experience and from a web research. This compendium is written for Linux +users' experience and from a web research. This USB compendium is written for Linux users. @@ -89,12 +89,10 @@ might be a cure. It is not known how to achieve this (see [5]).

4. Electromagnetic interferences

-Bad shielding of cables or devices might lead to interferences with electric -devices nearby (fridges, light switches, ...). A computer can cope with this -problem better or worse. Changing the computer's hardware helps (confirmed, -see [7]). If this is not feasible, use a ferrite ring (see [8] for instance) -or two around the ends of the cable (unconfirmed). +EMI appears to be a large issue with FHZ1x00 (for one thing, there are MANY reports +of people mysteriously unable to pair some FHT80b, despite trying very hard). +For many details, see Electro-magnetic interference below.

5. USB Power management

@@ -124,6 +122,51 @@ an USB cable. This drives the USB to its limits and may cause all sorts of problems on the bus. Either do not use USB extenders (confirmed, see [10]) at all or put an active (self-powered) hub in the middle (unconfirmed). +

Electro-magnetic interference (EMI) compendium

+ +Bad shielding of cables or devices might lead to interferences with electric +devices nearby (fridges, light switches, fluorescent lamps, ...). +A computer can cope with this problem better or worse. +Changing the computer's hardware helps (confirmed, see [7]). +If this is not feasible, use a ferrite ring (see [8] for instance) +or two around the ends of the FHZ cable (semi-confirmed). +(or on other interference-inducing cables!) + +Confirmed, AndiM: MANY issues with interference on FHZ1300PC, +which can be observed via drastically increased receiver LED activity +e.g. when a nearby (1m) PC is running - despite some countermeasures.
+ +Symptoms of trouble with interference:
+ + +Swapping the 1m USB cable with a 1.5m cable (but not overly long - this is said to be problematic as well!) +and adding a ferrite ring (currently at the FHZ1300PC-side cable end) did do wonders, +it completely eliminated all problems (although not sure yet which of these measures contributed by how much, +the increase of the distance from interference-causing parts or the ferrite ring). + +Please also note that it is recommended to keep an FHT at least 1.5m from a FHZ, otherwise people experienced pairing problems. + +

Misc. issues / hints

+ + +

C. Suggested reading

[1] http://www.mikrocontroller.net/topic/116263
@@ -138,4 +181,4 @@ or put an active (self-powered) hub in the middle (unconfirmed). [10] Google group FHZ1000 users on Linux, Message-ID: 2aac5192-1966-4939-a8ff-73d1e0b67506@w24g2000prd.googlegroups.com
- \ No newline at end of file + diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 3e7665449..de2217d5b 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -989,13 +989,14 @@ A line ending with \ will be concatenated with the next one, so long lines Set
diff --git a/fhem/docs/faq.html b/fhem/docs/faq.html index de5d738d9..8b1cc13f9 100644 --- a/fhem/docs/faq.html +++ b/fhem/docs/faq.html @@ -70,7 +70,7 @@
- 8. The time specification of the builtin at command is not very flexible. + 8. The time specification of the builtin at command is not very flexible. Please add day/month/weekday to it.
@@ -249,11 +249,13 @@ Help me! with the new one. diff --git a/fhem/examples/03_fht b/fhem/examples/03_fht index 7b3af1f76..744f81219 100644 --- a/fhem/examples/03_fht +++ b/fhem/examples/03_fht @@ -16,6 +16,14 @@ attr global modpath . # where our FHEM directory is define FHZ FHZ /dev/tts/USB0 # the serial port of an FHZ 1000 PC +# Since it is said that FHZ1x00 sometimes forgets its own random-initialized +# FHTcode (Contronics speak: "Zentralencode"; sometimes called "fhtid"), +# it's probably a good idea to manually hard-code it. +# Changing the value (range is 1 to 99) needs re-registration of FHT80b +# via their "cent" menu item (instructions see FAQ). +# set FHZ FHTcode XX + + define wz FHT 3232 # type FHT, transmitter code 3232 (default value) #########################