KFM100E

Aus FHEMWiki
Version vom 26. April 2014, 21:39 Uhr von Soulman (Diskussion | Beiträge) (→‎Links)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

KFM 100 Sensor

Description

The KFM 100 is a capacitive sensor for measuring liquids (water, others are unknown). It consists of 2 parts:

  • KFM 100 S: Sender (sensor), which is immerged into the liquid
  • KFM 100 E: Receiver (Display), which shows the readings (up to 4 individual sensors are possible with each receiver)

Features

The Sender uses a battery and is built into a box, which is watertight enough that it can be left in plain rain without experiencing difficulties. The measurement is done by a 2 cable rope-ladder, which is 3m long, the wires are separated by evenly spaced (10cm) plastic sticks. So the maximum depth which can be measured is 3 m. Smaller depths can be measured by cutting the cable, even if this is not strictly required (the influence of a cable too long is low, even if it lies outside in the rain).

The details as published by the manufacturer:

  • General
    • Protocol: BidCos
    • Range: 100 m (outside)
  • Receiver KFM100 E
    • Up to 4 sensors
    • Voltage: 9–15 VDC, NS-Hohlstecker 5,5/2,1
    • Size (W x H x D): 143 x 58 x 25 mm
  • Sender KFM100 S
    • Measuring depth: 1–3 m (increments of 0,1 m)
    • Voltage: 3 x 1,5 V Mignon (LR6/AA)
    • Size (W x H x D): 115 x 65 x 55 mm

Communication

The KFM communicates through a special BidCos protocol, which apparently is not 100% Homematic compatible. This means that you can not use it in the Homematic context, but FHEM understands the protocol and can display the readings.

Values are transmitted about every 31 Minutes, saving battery. For installation and calibration there is a special mode, where data are transmitted every 3 Seconds.

Installation and configuration

For each sensor there is configuration to be done if one wants to display the meterings correctly on the display:

  • Form and dimensions of the tank must be entered
  • The Sensor must be calibrated

The device has a special mode for the latter which asks essentially to immerge the device more and more into the tank (every 10 cm) and press a confirmation button at each step. This is a bit tedious, but still easy to do. From the height of the liquid and the information concerning the tank the display is then able to show the content in liters or percent values. Probably the values get interpolated between the measured points.

Configuration and operation with FHEM

Autoconf in FHEM recognizes the device and shows the raw values. But to get a useful (i.e. human readable) display, some configuration is needed.

First you need to make the device itself known with the proper FHEM model and subType. For the sender and receiver the following attributes are relevant (though FHEM does not do much (i.e. nothing) with the receiver...):

  • subType: KFM100
  • model: KFM-Sensor
  • model: KFM-Display

To get more than just raw values, you must tell FHEM something about your installation. Unfortunately FHEM does know nothing about tank forms and sizes and there no way to tell it (unless someone implements it one day). So you can not do the same calibration as with the device itself, where you need only to measure immersion depth and general tank values.

FHEM on the other hand offers a mapping between reading and (content) values. So you are free to provide as many interpolation points as you wish, but you can not leave the calculation to FHEM, but need to do it yourself. Obwiously this is trivial if you have a cubic tank, but more complicated if it is more like a barrel. In the easy case you just provide 2 value pairs, each with the metering and content information as metering:content. You can also provide a unit:

  • rawToReadable: 10:0 255:4198
  • unit: l

It is currently unclear if the calibration needs to be executed beforehand and influences the values of the sender. Please report here, if you have done an installation without calibrating first.

A full configuration could look like this (of course addresses like 13E426 and 13A991 must be replaced by the proper values):

define KFM_100_Sensor CUL_HM 13E426
attr KFM_100_Sensor comment KFM100S Sender
attr KFM_100_Sensor model KFM-Sensor
attr KFM_100_Sensor rawToReadable 10:0 255:4198
attr KFM_100_Sensor room CUL_HM
attr KFM_100_Sensor subType KFM100
attr KFM_100_Sensor unit l
define FileLog_KFM_100_Sensor FileLog /opt/fhem/var/log/KFM_100_Sensor_%Y.log KFM_100_Sensor
attr FileLog_KFM_100E_Sensor logtype hpl_kfm100e,text
attr FileLog_KFM_100E_Sensor room CUL_HM
define KFM_100_Display CUL_HM 13A991
attr KFM_100_Display comment KFM100E Receiver
attr KFM_100_Display model KFM-Display
attr KFM_100_Display room CUL_HM
attr KFM_100_Display subType KFM100
define FileLog_KFM_100_Display FileLog /opt/fhem/var/log/KFM_100_Display_%Y.log KFM_100E_Display
attr FileLog_KFM_100_Display logtype text
attr FileLog_KFM_100_Display room CUL_HM

Display with PGM2

If you want to establish a .gplot file, the relevant parts could be:

set y2label "Rohwert"
set ylabel "Fuellstand [l]"
set yrange [0:5000]
set y2range [0:255]
#FileLog 4:rawValue:0:
#FileLog 4:content:0:
plot \
 "< awk $3=="rawValue:" {print $1, $4}' <IN>"\
   using 1:2 axes x1y2 title 'Raw Value' with lines,\
 "< awk $3=="content:" {print $1, $4}' <IN>"\
   using 1:2 axes x1y1 title 'Volumen' with points\

Known Issues

n/a

Links

  • Operating manual (in German)PDF
  • Rewatec tank volumes HTML