瀏覽代碼

Add support for XiaomiFlowerSens readings:
- fertility
- lux
- moisture

WATO configuration template missing!

erdoking 7 年之前
父節點
當前提交
b36e286dce
共有 2 個文件被更改,包括 20 次插入2 次删除
  1. 5 0
      local/share/check_mk/checks/fhem
  2. 15 2
      local/share/check_mk/pnp-templates/check_mk-fhem.php

+ 5 - 0
local/share/check_mk/checks/fhem

@@ -166,6 +166,11 @@ def check_fhem(item, params, info):
                 ('duration_in_traffic', 'duration_in_traffic',  'mins',             '',                1,          1),
                 ## ESPEasy
                 ('presence',            'presence',             '',                 '',                1,          1),
+                ## XiaomiFlowerSens
+                ('fertility',           'fertility',            '',                 '',                1,          1),
+                ('lux',                 'lux',                  'lx',               '',                1,          1),
+                ('moisture',            'moisture',             u'%',               '',                1,          1),
+
              ##  key                            title                           unit                channel            show        perfd
              ##  -------                        -------                         -------             -------            ----        -----
                 ## LUXTRONIK2

+ 15 - 2
local/share/check_mk/pnp-templates/check_mk-fhem.php

@@ -62,7 +62,7 @@ if (isset($fhem_defines['temperature']) && isset($fhem_defines['humidity']) ) {
 }
 
 # 2. Temperature
-if (isset($fhem_defines['temperature']) ) {
+if (isset($fhem_defines['temperature']) or isset($fhem_defines['moisture'])) {
    $ds_name[] = 'temperature';
    $opt[] = $defopt . "--title \"Temperature\"";
    $def[] = ""
@@ -70,6 +70,8 @@ if (isset($fhem_defines['temperature']) ) {
         . fhem_line("desiredtemp",      "408f20", "Desired temp",   "°C",  FALSE)
         . fhem_area("dewpoint",         "B40404", "Dewpoint",       "°C",  FALSE)  
         . fhem_line("valveposition",    "00bfff", "Valve position", "%% ",  FALSE)
+        ## XiaomiFlowerSens
+        . fhem_curve("LINE2", "moisture", "00bfff", "moisture", "%%",  FALSE)
         ;
 }
 
@@ -216,7 +218,7 @@ if (isset($fhem_defines['counterHoursHeatPump']) ) {
 }
 
 # 14. LUXTRONIK2 (counterHoursHeating)
-if (isset($fhem_defines['counterHoursHeating'])  or isset($fhem_defines['counterHoursHotWater'])) {
+if (isset($fhem_defines['counterHoursHeating']) or isset($fhem_defines['counterHoursHotWater'])) {
    $ds_name[] = 'counterHoursHeating';
    $opt[] = $defopt . "--title \"counterHoursHotWater + counterHoursHeating\"";
    $def[] = ""
@@ -226,4 +228,15 @@ if (isset($fhem_defines['counterHoursHeating'])  or isset($fhem_defines['counter
 }
 
 
+# 15. XiaomiFlowerSens (fertility)
+if (isset($fhem_defines['fertility']) or isset($fhem_defines['lux'])) {
+   $ds_name[] = '';
+   $opt[] = $defopt . "--title \"fertility\"";
+   $def[] = ""
+        . fhem_area("fertility","ffd700", "fertility",   "",  FALSE)
+        . fhem_curve("LINE2", "lux", "ee0000", "lux", "lx",  FALSE)
+        . fhem_curve("LINE2", "moisture", "00bfff", "moisture", "%%",  FALSE)
+        ;
+}
+
 ?>