FHEM FAQ
1. I am using fhem.pl with an fhz1000.pl config file and fhem.pl
won't start
2. I get "undefined" messages in the log after upgrading
fhem.pl
3. I switched on a FS20 device directly (without the remote),
but the fhem.pl did not noticed it. Is it a bug?
4. I have some FS20/FHT/HMS devices. How do I know their
housecode?
5. I have the code for my devices in the ELV notation, which
contains 1,2,3 and 4, but you require a hex code. How should I convert
it?
6. I replaced my FHZ1X00PC, now the FHT80b's does not work
anymore. Help me!
7. I can specify an optional ml/raincounter for a KS300. Why
do you think that 255 should be the default?
8. The time specification of the builtin at command is not very
flexible. Please add day/month/weekday to it.
9. I defined my FS20STR as an FHT device, but I do not get
any data from it.
10. How to convert the FHT8b code seen in its display to the
hex code needed by fhem.pl?
11. I'd like to use this sunrise/sunset stuff, can you help
me?
12. I'd like to switch on the ventilator if the FHT tells me its too hot. How to tell fhem to do that?
1. I am using fhem.pl with an fhz1000.pl config file and fhem.pl won't
start
The syntax changed, you have to modify you config file:
- logfile/modpath/pidfile/port/verbose "renamed" to "attr global xx
- change logfile to attr global logfile
- change modpath to attr global modpath
- change pidfile to attr global pidfilename
- change port to attr global port
- change verbose to attr global verbose
- savefile renamed to "attr global statefile" (not savefile)
- at/notify "renamed" to "define at/notify"
This means you have to give a name to each of your at's or
notify commands. E.g.:
at *07:00 set lamp on
becomes
define wake_me at *07:00 set lamp on
notify fire:on "send_sms"
becomes
define fire_alarm notify fire:on "send_sms"
This seems to be tedious at the beginning but you get easy
deletion and attribute specification for these commands.
2. I get "undefined" messages in the log after upgrading fhem.pl
Stop fhem.pl, delete the previous .save file and restart fhem.pl.
If the problem still exists, send a bugreport.
3. I switched on a FS20 device directly (without the remote), but
the fhem.pl did not noticed it.
Is it a bug?
The protocol used by the FS20 family is quite simple: it is not
encrypted in any way, and there is no feedback to the sender. So if you
push any buttons on a pure receiver, no radio waves will be sent out, and
the FHZ1000 won't notice anything. The FHZ1000PC does not even know if
somebody received its message, it simply sends it out 3 times and hopes
for good luck.
To answer the question: it is not a bug :-)
4. I have some FS20/FHT/HMS devices.
How do I know their housecode?
If you already programmed some devices, then just start fhem.pl with one
of the example configuration files, and watch the log. When activating a
device (e.g. with the remote) then it will be logged as an unknown device
with the housecode. Note: the verbose level must be 3 or higher. KS300
devices do not have a proper code, so you can use anything.
5. I have the code for my devices in the ELV notation, which contains 1,2,3
and 4, but you require a hex code.
How should I convert it?
The code used by ELV is in the "quaternal" (?) system plus one added to each
digit, so you can even use the 4 button remote for programming. To convert,
you have two choices: the program four2hex in the contrib directory, or the
good old unix program bc.
6. I replaced my FHZ1X00PC, now the FHT80b's does not work anymore.
Help me!
The FHT80b's are talking to a single FHZ1XXX device, which has a unique
"FHTcode". You have two choices: if you know the old FHTcode, then you can
set it, or you can tell the FHT80b to forget the old FHZ, and start talking
with the new one.
- Set the FHTcode: The problem with this method is that I don't know how
to read out the value, we just can change it with
set FHZ FHTcode <hex-code>
- Resync the FHT80b: Press PROG until "Sond" appears, then select "CEnt"
with the wheel, press PROG again, Select "nA" with the wheel, press PROG
again.
7. I can specify an optional ml/raincounter for a KS300.
Why do you think that 255 should be the default?
The manual talks about 0.3l resolution, but I wanted to calibrate my device.
So I filled a plastic bottle with 0.5 liter water from the measuring cup,
drilled a small hole in the bottom of the bottle, let the water flow slowly
in the KS300 rain-cup, and looked at the counter after the bottle was empty.
The raincounter was incremented by 130 ticks. The diameter of my KS300
rain-cup is 13.9 cm, the area ca 151.75 cm2, which
is ca 1/65.9 m2.
The 0.5 liter corresponds to 32.95 liter per m2. 130 ticks
correspond to 32.95 l/m2 -> 1 tick is ca 253 ml. I estimate
the error margin to +/- 2%
You are welcome to do your own experiments, I am interested in the results.
8. The time specification of the builtin at command is not very
flexible.
Please add day/month/weekday to it.
I think the command is complex and flexible enough. Use a perl expression
for this functionality like (described in the commandref.html):
at *07:00:00 { fhz "set lamp on" if($we) }
9. I defined my FS20STR as an FHT device, but I do not get any data from
it.
The FS20STR is an FS20 device, even if it looks like an FHT80b.
You'll get "only" on-for-timer and off-for-timer events sent.
10. How to convert the FHT8b code seen in its display to the hex code needed
by fhem.pl?
Convert the first 2 digits first from decimal to hex, then the next two. Example:
% bc
obase=16
<first two digits>
<last two digits>
E.g The FHT8b code 1121 is 0b15 for the fhem.pl
11. I'd like to use this sunrise/sunset stuff, can you help me?
Copy contrib/99_SUNRISE_EL.pm into your FHEM directory.
Next look for the geographic coordinates of your home, e.g with a GPS
receiver or with googleearth. Compute the latitude/longitude as needed, and
enter them in your lastinclude file with the command:
{sunrise_coord("", "", "") }
If everything is ok, typing
{ sunrise_abs() }
in the telnet prompt, will return the time of the sunrise today, in a
HH:MM:SS format.
99_SUNRISE_EL.pm is the ExtraLight version of the original 99_SUNRISE.pm,
which needs the DateTime::Event::Sunrise perl module, which in turn is
usually difficult to install. If you still want to use the original module,
then the initialization string will be slightly different:
{sunrise_coord("", "", "Europe/Berlin") }
12. I'd like to switch on the ventilator if the FHT tells me its too hot. How to tell fhem to do that?
To get used to the methods, we do it step by step. Telnet to fhem, and type
the following:
# Check simply the value. It is the same as seen in "list"
FHZ> {$value{myfht}}
measured-temp: 23.8 (Celsius)
# Get the second word, so we can compare it.
FHZ> { my @a = split(" ", $value{myfht});; $a[1] }
23.8
# Set the ventilator on now, if its too hot.
FHZ> { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
# Now do this regularly
FHZ> define chilldown at +*00:30:00 { my @a = split(" ", $value{myfht});; fhem("set ventilator on") if($a[1] > 25.0) }
# An alternative:
FHZ> define chilldown at +*00:30:00 { fhem("set ventilator on") if($value{myfht} gt "measured-temp: 25.0") }