diff --git a/fhem/CHANGED b/fhem/CHANGED index 457fbc9a7..beba8be66 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 74_XiaomiFlowerMonitor: add attribut for Blocking.pm logoutput - bugfix: 14_CUL_TCM97001: Bug: "other state" bei W174, Plausibility check for W174, Append documentation - bugfix: 71_YAMAHA_AVR: fix max volume when using float values in @@ -9,7 +10,7 @@ - feature: 70_KODI: added reading jsonResponse which contains the last received message from Kodi - feature: 46_Aqicn: FHEMWEB text color formated, thanks to maddhin - - update: 74_74_XiaomiFlowerMonitor: new version, change internal routine + - update: 74_XiaomiFlowerMonitor: new version, change internal routine - feature: fhemweb_iconRadio.js: optionally colorize selected icons instead of its background by prefix use4icon@ - feature: fhemweb_iconButtons.js: optionally colorize selected icons instead diff --git a/fhem/FHEM/74_XiaomiFlowerSens.pm b/fhem/FHEM/74_XiaomiFlowerSens.pm index e7671d59d..48b87ed1f 100644 --- a/fhem/FHEM/74_XiaomiFlowerSens.pm +++ b/fhem/FHEM/74_XiaomiFlowerSens.pm @@ -47,7 +47,7 @@ use JSON; use Blocking; -my $version = "1.2.0"; +my $version = "1.2.2"; my %CallBatteryFirmwareAge = ( '8h' => 28800, '16h' => 57600, '24h' => 86400, @@ -114,6 +114,7 @@ sub XiaomiFlowerSens_Initialize($) { "minLux ". "maxLux ". "sshHost ". + "blockingCallLoglevel:2,3,4,5 ". $readingFnAttributes; @@ -139,7 +140,9 @@ sub XiaomiFlowerSens_Define($$) { $hash->{VERSION} = $version; $hash->{INTERVAL} = 300; $hash->{helper}{CallSensDataCounter} = 0; + $hash->{helper}{CallBatteryFirmware} = 0; $hash->{NOTIFYDEV} = "global"; + $hash->{loglevel} = 4; readingsSingleUpdate($hash,"state","initialized", 0); @@ -185,7 +188,7 @@ sub XiaomiFlowerSens_Attr(@) { } } - if( $attrName eq "disabledForIntervals" ) { + elsif( $attrName eq "disabledForIntervals" ) { if( $cmd eq "set" ) { return "check disabledForIntervals Syntax HH:MM-HH:MM or 'HH:MM-HH:MM HH:MM-HH:MM ...'" unless($attrVal =~ /^((\d{2}:\d{2})-(\d{2}:\d{2})\s?)+$/); @@ -199,7 +202,7 @@ sub XiaomiFlowerSens_Attr(@) { } } - if( $attrName eq "interval" ) { + elsif( $attrName eq "interval" ) { if( $cmd eq "set" ) { if( $attrVal < 300 ) { Log3 $name, 3, "XiaomiFlowerSens ($name) - interval too small, please use something >= 300 (sec), default is 3600 (sec)"; @@ -216,6 +219,18 @@ sub XiaomiFlowerSens_Attr(@) { } } + elsif( $attrName eq "blockingCallLoglevel" ) { + if( $cmd eq "set" ) { + $hash->{loglevel} = $attrVal; + Log3 $name, 3, "XiaomiFlowerSens ($name) - set blockingCallLoglevel to $attrVal"; + } + + elsif( $cmd eq "del" ) { + $hash->{loglevel} = 4; + Log3 $name, 3, "XiaomiFlowerSens ($name) - set blockingCallLoglevel to default"; + } + } + return undef; } @@ -765,6 +780,8 @@ sub XiaomiFlowerSens_CallBatteryFirmware_IsUpdateTimeAgeToOld($$) { Event Example for min/max Value's: 2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture low
Event Example for min/max Value's: 2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp high
  • sshHost - FQD-Name or IP of ssh remote system / you must configure your ssh system for certificate authentication. For better handling you can config ssh Client with .ssh/config file
  • +
  • batteryFirmwareAge - how old can the reading befor fetch new data
  • +
  • blockingCallLoglevel - Blocking.pm Loglevel for BlockingCall Logoutput
  • @@ -838,7 +855,8 @@ sub XiaomiFlowerSens_CallBatteryFirmware_IsUpdateTimeAgeToOld($$) { 2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture low
    2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp high

  • sshHost - FQDN oder IP-Adresse eines entfernten SSH-Systems. Das SSH-System ist auf eine Zertifikat basierte Authentifizierung zu konfigurieren. Am elegantesten geschieht das mit einer .ssh/config Datei auf dem SSH-Client.
  • -
  • batteryFirmwareAge - how old can the reading befor fetch new data
  • +
  • batteryFirmwareAge - wie alt soll der Timestamp des Readings sein bevor eine Aktuallisierung statt findet
  • +
  • blockingCallLoglevel - Blocking.pm Loglevel für BlockingCall Logausgaben