소스 검색

Update Counter Helper eingefuegt

hmetzner 7 년 전
부모
커밋
35988cf417

+ 0 - 0
fhem/core/-U


+ 1 - 0
fhem/core/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.
+  - bugfix:  88_HMCCU: Fixed shutdown bug.
   - bugfix:  32_withings: API endpoint change to Nokia servers
   - feature: 93_DbRep: V8.0.0, restoreMySQL for clientSide dumps implemented
   - bugfix:  74_XiaomiBTLESens: fix bug in disabledForInterval (Forum #835350)

+ 32 - 14
fhem/core/FHEM/12_HProtocolGateway.pm

@@ -1,4 +1,4 @@
-# $Id: 12_HProtocolGateway.pm 17304 2018-09-09 10:56:23Z eisler $
+# $Id: 12_HProtocolGateway.pm 17337 2018-09-13 15:15:11Z eisler $
 ####################################################################################################
 #
 #	12_HProtocolGateway.pm
@@ -48,9 +48,8 @@ sub HProtocolGateway_Initialize($) {
                       "baudrate:300,600,1200,2400,4800,9600 " .
                       "parityBit:N,E,O " .
                       "databitsLength:5,6,7,8 " .
-                      "stopBit " .
+                      "stopBit:0,1" .
                       "pollIntervalMins " .
-                      "mode:Filllevel,Volume,Ullage " .
                       "path";
 }
 
@@ -108,14 +107,15 @@ sub HProtocolGateway_GetUpdate($) {
 
   foreach (@tankList) {
     my $tankHash = $_;
+    my $mode = AttrVal($tankHash->{NAME},"mode","");
     my $command = "\$A";
-    if ($attr{$name}{mode} eq "Volume") {
+    if ($mode eq "Volume") {
       $command = "\$B";
-    } elsif ($attr{$name}{mode} eq "Ullage") {
+    } elsif ($mode eq "Ullage") {
       $command = "\$C";
     }
-
-    my $msg = $command . $tankHash->{READINGS}{hID}{VAL} . "\r\n";
+    my $hID = AttrVal($tankHash->{NAME},"hID","");
+    my $msg = $command . $hID . "\r\n";
     DevIo_SimpleWrite($hash, $msg , 2);
     my ($err, $data) = HProtocolGateway_ReadAnswer($hash,$tankHash);
     Log3 $name, 5, "err:". $err;
@@ -200,13 +200,14 @@ sub HProtocolGateway_ParseMessage($$) {
     return if($check ne $checksum);
 
     my ($filllevel,$volume,$ullage) = (0,0,0); 
+    my $mode = AttrVal($tankHash->{NAME},"mode","");
 
-    if ($attr{$name}{mode} eq "Filllevel") {
+    if ($mode eq "FillLevel") {
       $filllevel = $tankdata;
       $volume = HProtocolGateway_Tank($hash,$tankHash,$filllevel);
-    } elsif ($attr{$name}{mode} eq "Volume") {
+    } elsif ($mode eq "Volume") {
       $volume = $tankdata;
-    } elsif ($attr{$name}{mode} eq "Ullage") {
+    } elsif ($mode eq "Ullage") {
       $ullage = $tankdata;
     }
 
@@ -305,8 +306,6 @@ sub HProtocolGateway_Attr (@) {
 	    } else {
 	       RemoveInternalTimer($hash);
         }
-    } elsif ($attr eq 'mode') {
-      $attr{$name}{mode} = $val;
     } elsif ($attr eq 'path') {
       $attr{$name}{path} = $val; 
     } elsif ($attr eq 'baudrate') {
@@ -351,9 +350,11 @@ sub HProtocolGateway_Poll($) {
 sub HProtocolGateway_Tank($$$) {
   my ($hash,$tankHash,$filllevel) = @_;
   my $name = $hash->{NAME};
+  my $path = AttrVal($name,"path","");
+  my $type = AttrVal($tankHash->{NAME},"type","");
 
   my %TankChartHash;
-  open my $fh, '<', $attr{$name}{path}.'tank'.$tankHash->{READINGS}{hID}{VAL}.'.csv' or die "Cannot open: $!";
+  open my $fh, '<', $path.$type or die "Cannot open: $!";
   while (my $line = <$fh>) {
     $line =~ s/\s*\z//;
     my @array = split /,/, $line;
@@ -393,7 +394,6 @@ sub HProtocolGateway_Tank($$$) {
   <ul>
     <code>define &lt;name&gt; HProtocolGateway /dev/tty???<br />
     attr &lt;name&gt; pollIntervalMins 2<br />
-    attr &lt;name&gt; mode Filllevel<br />
     attr &lt;name&gt; path /opt/fhem/<br />
     attr &lt;name&gt; baudrate 1200<br />
     attr &lt;name&gt; databitsLength 8<br />
@@ -420,8 +420,26 @@ sub HProtocolGateway_Tank($$$) {
     2430,58275<br />
     </code> 
 
+  
     <br /><br /> 
 
+  <a name="HProtocolGateway"></a>
+  <b>Attributes</b>
+  <ul>
+    <li>pollIntervalMins<br />
+    poll Interval in Mins</li>
+    <li>path<br />
+    Strapping Table csv file path</li>
+    <li>baudrate<br />
+    Baudrate / 300, 600, 1200, 2400, 4800, 9600</li>
+    <li>databitsLength<br />
+    Databits Length / 5, 6, 7, 8</li>
+    <li>parityBit<br />
+    Parity Bit / N, E, O</li>
+    <li>stopBit<br />
+    Stop Bit / 0, 1</li>
+  </ul><br />
+
   </ul><br />
 
 </ul><br />

+ 29 - 5
fhem/core/FHEM/12_HProtocolTank.pm

@@ -1,4 +1,4 @@
-# $Id: 12_HProtocolTank.pm 17304 2018-09-09 10:56:23Z eisler $
+# $Id: 12_HProtocolTank.pm 17337 2018-09-13 15:15:11Z eisler $
 ####################################################################################################
 #
 #	12_HProtocolTank.pm
@@ -31,8 +31,12 @@ sub HProtocolTank_Initialize($) {
   $hash->{DefFn}          = "HProtocolTank_Define";
   $hash->{ParseFn}        = "HProtocolTank_Parse";
   $hash->{FingerprintFn}  = "HProtocolTank_Fingerprint";
+  $hash->{AttrFn}         = "HProtocolGateway_Attr";
   $hash->{Match}          = "^[a-zA-Z0-9_]+ [a-zA-Z0-9_]+ [+-]*[0-9]+([.][0-9]+)?";
-  $hash->{AttrList}       = $readingFnAttributes;
+  $hash->{AttrList}       = "hID " .
+                            "mode:FillLevel,Volume,Ullage " .
+                            "type " .
+                            $readingFnAttributes;
 }
 
 sub HProtocolTank_Define($$) {
@@ -92,6 +96,18 @@ sub HProtocolTank_Fingerprint($$) {
   # this message is a duplicate message. Refer to FHEM Wiki.
 }
 
+sub HProtocolTank_Attr (@) {
+    my ($command, $name, $attr, $val) =  @_;
+    my $hash = $defs{$name};
+    my $msg = '';
+
+    if ($attr eq 'type') {
+      $attr{$name}{type} = $val;
+    } elsif ($attr eq 'mode') {
+      $attr{$name}{mode} = $val;
+    }
+}
+
 1;
 
 
@@ -110,7 +126,6 @@ sub HProtocolTank_Fingerprint($$) {
   <b>Define</b>
   <ul>
     <code>define tank01 HProtocolTank HProtocolGateway<br />
-          setreading tank01 hID 01<br />
     </code>
     <br />
 
@@ -121,8 +136,6 @@ sub HProtocolTank_Fingerprint($$) {
   <a name="HProtocolTank"></a>
   <b>Readings</b>
   <ul>
-    <li>hID<br />
-    01 - 99 Tank Number / Tank Address</li>
     <li>ullage<br />
     0..999999 Ullage in litres</li>
     <li>filllevel<br />
@@ -143,6 +156,17 @@ sub HProtocolTank_Fingerprint($$) {
     0..9 00.. Probe error</li>
   </ul><br />
 
+  <a name="HProtocolTank"></a>
+  <b>Attributes</b>
+  <ul>
+    <li>hID<br />
+    01 - 32 Tank Number / Tank Address (99 for testing only)</li>
+    <li>mode<br />
+    FillLevel, Volume, Ullage</li>
+    <li>type<br />
+    Strapping Table csv file / tank01.csv</li>
+  </ul><br />
+
 
 </ul><br />
 

+ 41 - 25
fhem/core/FHEM/32_withings.pm

@@ -1,5 +1,5 @@
 ##############################################################################
-# $Id: 32_withings.pm 17334 2018-09-12 21:29:19Z moises $
+# $Id: 32_withings.pm 17341 2018-09-13 22:23:46Z moises $
 #
 #  32_withings.pm
 #
@@ -10,7 +10,7 @@
 #
 #
 ##############################################################################
-# Release 05 / 2018-03-01
+# Release 06 / 2018-09-13
 
 package main;
 
@@ -50,7 +50,7 @@ my %device_models = (  1 => { 1 => "Smart Scale", 2 => "Wireless Scale", 3 => "S
                        2 => { 21 => "Smart Baby Monitor", 22 => "Home", 22 => "Home v2", },
                        4 => { 41 => "iOS Blood Pressure Monitor", 42 => "Wireless Blood Pressure Monitor", 43 => "BPM", 44 => "BPM+", },
                       16 => { 51 => "Pulse Ox", 52 => "Activite", 53 => "Activite v2", 54 => "Go", 55 => "Steel HR", },
-                      32 => { 60 => "Aura", 61 => "Sleep Sensor", 62 => "Sleep Mat", },
+                      32 => { 60 => "Aura", 61 => "Sleep Sensor", 62 => "Sleep Mat", 63 => "Sleep", },
                       64 => { 70 => "Thermo", }, );
 
                       #Firmware files: cdnfw_withings_net
@@ -507,6 +507,7 @@ sub withings_getToken($) {
     Log3 "withings", 2, "withings: json evaluation error on getToken ".$@;
     return undef;
   }
+  Log3 "withings", 1, "withings: getToken json error ".$json->{error} if(defined($json->{error}));
 
   my $once = $json->{body}{once};
   $hash->{Once} = $once;
@@ -637,6 +638,7 @@ sub withings_getSessionKey($) {
         Log3 $name, 2, "$name: json evaluation error on getSessionKey ".$@;
         return undef;
       }
+      Log3 $name, 1, "withings: getSessionKey json error ".$json->{error} if(defined($json->{error}));
 
       foreach my $account (@{$json->{body}{account}}) {
           next if( !defined($account->{id}) );
@@ -873,13 +875,13 @@ sub withings_initDevice($) {
   $hash->{lastweighindate} = $device->{lastweighindate} if( defined($device->{lastweighindate}) );
 
 
-  if((defined($hash->{typeID}) && $hash->{typeID} == 16) or (defined($hash->{modelID}) && $hash->{modelID} == 61))
+  if((defined($hash->{typeID}) && $hash->{typeID} == 16) or (defined($hash->{typeID}) && $hash->{typeID} == 32 && defined($hash->{modelID}) && $hash->{modelID} != 60))
   {
     my $devicelink = withings_getDeviceLink( $hash );
-    if(defined($devicelink->{userid}))
+    if(defined($devicelink) && defined($devicelink->{linkuserid}))
     {
-      $hash->{User} = $devicelink->{userid};
-      $hash->{UserDevice} = $modules{$hash->{TYPE}}{defptr}{"U".$devicelink->{userid}} if defined($modules{$hash->{TYPE}}{defptr}{"U".$devicelink->{userid}});
+      $hash->{User} = $devicelink->{linkuserid};
+      $hash->{UserDevice} = $modules{$hash->{TYPE}}{defptr}{"U".$devicelink->{linkuserid}} if defined($modules{$hash->{TYPE}}{defptr}{"U".$devicelink->{linkuserid}});
     }
   }
 
@@ -958,6 +960,7 @@ sub withings_getUsers($) {
     Log3 $name, 2, "$name: json evaluation error on getUsers ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getUsers json error ".$json->{error} if(defined($json->{error}));
 
   my @users = ();
   foreach my $user (@{$json->{body}{users}}) {
@@ -979,7 +982,7 @@ sub withings_getDevices($) {
   withings_getSessionKey($hash);
 
   my ($err,$data) = HttpUtils_BlockingGet({
-    url => $hash->{'.https'}."://scalews.health.nokia.com/index/service/association",
+    url => $hash->{'.https'}."://scalews.withings.com/cgi-bin/association",
     timeout => 10,
     noshutdown => 1,
     data => {sessionid => $hash->{SessionKey}, accountid => $hash->{AccountID} , type => '-1', enrich => 't' , appname => 'my2', appliver=> $hash->{helper}{appliver}, apppfm => 'web', action => 'getbyaccountid'},
@@ -998,6 +1001,7 @@ sub withings_getDevices($) {
     Log3 $name, 2, "$name: json evaluation error on getDevices ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getDevices json error ".$json->{error} if(defined($json->{error}));
   Log3 "withings", 5, "$name: getdevices ".Dumper($json);
 
   my @devices = ();
@@ -1035,6 +1039,7 @@ sub withings_getDeviceDetail($) {
     Log3 $name, 2, "$name: json evaluation error on getDeviceDetail ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getDeviceDetail json error ".$json->{error} if(defined($json->{error}));
 
   if($json)
   {
@@ -1067,10 +1072,10 @@ sub withings_getDeviceLink($) {
   withings_getSessionKey( $hash->{IODev} );
 
   my ($err,$data) = HttpUtils_BlockingGet({
-    url => $hash->{'.https'}."://scalews.health.nokia.com/index/service/v2/link",
+    url => $hash->{'.https'}."://scalews.health.nokia.com/cgi-bin/association",
     timeout => 10,
     noshutdown => 1,
-    data => {sessionid => $hash->{IODev}->{SessionKey}, deviceid => $hash->{Device} , appname => 'my2', appliver=> $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'get'},
+    data => {sessionid => $hash->{IODev}->{SessionKey}, appname => 'hmw', appliver=> $hash->{IODev}->{helper}{appliver}, enrich => 't', action => 'getbyaccountid'},
   });
 
   #my $ua = LWP::UserAgent->new;
@@ -1086,8 +1091,15 @@ sub withings_getDeviceLink($) {
     Log3 $name, 2, "$name: json evaluation error on getDeviceLink ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getDeviceLink json error ".$json->{error} if(defined($json->{error}));
 
-  return $json->{body};
+  foreach my $association (@{$json->{body}{associations}}) {
+    next if( !defined($association->{deviceid}) );
+    next if( $association->{deviceid} ne $hash->{Device} );
+    return $association->{deviceproperties};
+  }
+
+  return undef;
 }
 
 
@@ -1141,7 +1153,7 @@ sub withings_getDeviceReadingsScale($) {
   $enddate = $now if ($enddate > $now);
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 30,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, deviceid=> $hash->{Device}, meastype => '12,35', startdate => int($lastupdate), enddate => int($enddate), devicetype => '16', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getmeashf'},
@@ -1176,7 +1188,7 @@ sub withings_getDeviceReadingsBedside($) {
   $enddate = $now if ($enddate > $now);
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 30,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, deviceid=> $hash->{Device}, meastype => '12,13,14,15,56', startdate => int($lastupdate), enddate => int($enddate), devicetype => '16', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getmeashf'},
@@ -1211,7 +1223,7 @@ sub withings_getDeviceReadingsHome($) {
   $enddate = $now if ($enddate > $now);
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 30,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, deviceid=> $hash->{Device}, meastype => '12,13,14,15,58', startdate => int($lastupdate), enddate => int($enddate), devicetype => '16', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getmeashf'},
@@ -1353,6 +1365,7 @@ sub withings_getVideoLink($) {
     Log3 $name, 2, "$name: json evaluation error on getVideoLink ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getVideoLink json error ".$json->{error} if(defined($json->{error}));
 
   if(defined($json->{body}{device}))
   {
@@ -1389,6 +1402,7 @@ sub withings_getS3Credentials($) {
     Log3 $name, 2, "$name: json evaluation error on getS3Credentials ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getS3Credentials json error ".$json->{error} if(defined($json->{error}));
 
   if(defined($json->{body}{sts}))
   {
@@ -1450,6 +1464,7 @@ sub withings_getUserDetail($) {
     Log3 $name, 2, "$name: json evaluation error on getUserDetail ".$@;
     return undef;
   }
+  Log3 $name, 1, "withings: getUserDetail json error ".$json->{error} if(defined($json->{error}));
 
   return $json->{body}{users}[0];
 }
@@ -1512,7 +1527,7 @@ sub withings_poll($;$) {
       withings_getDeviceProperties($hash) if($force > 1 || $lastProperties <= ($now - $intervalProperties));
       withings_getDeviceReadingsBedside($hash) if($force || $lastData <= ($now - $intervalData));
     }
-    elsif(defined($hash->{modelID}) && $hash->{modelID} eq '61') {
+    elsif(defined($hash->{modelID}) && ($hash->{modelID} eq '61' || $hash->{modelID} eq '62' || $hash->{modelID} eq '63')) {
       withings_getDeviceProperties($hash) if($force > 1 || $lastProperties <= ($now - $intervalProperties));
       withings_getUserReadingsSleep($hash) if($force || $lastData <= ($now - $intervalData));
       withings_getUserReadingsSleepDebug($hash) if($force || $lastDebug <= ($now - $intervalDebug));
@@ -1562,7 +1577,7 @@ sub withings_getUserReadingsDaily($) {
   my $enddateymd = strftime("%Y-%m-%d", localtime($enddate));
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/aggregate",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/aggregate",
     timeout => 60,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey},  userid=> $hash->{User}, range => '1', meastype => '36,37,38,40,41,49,50,51,52,53,87', startdateymd => $startdateymd, enddateymd => $enddateymd, appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getbyuserid'},
@@ -1580,7 +1595,7 @@ sub withings_getUserReadingsDaily($) {
   $enddateymd = strftime("%Y-%m-%d", localtime($enddate));
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/activity",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/activity",
     timeout => 60,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey},  userid=> $hash->{User}, subcategory => '37', startdateymd => $startdateymd, enddateymd => $enddateymd, appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getbyuserid'},
@@ -1664,7 +1679,7 @@ sub withings_getUserReadingsSleep($) {
   #    data => {sessionid => $hash->{IODev}->{SessionKey}, userid=> $hash->{User}, meastype => '43,44,11,57,59,60,61,62,63,64,65,66,67,68,69,70', startdate => int($lastupdate), enddate => int($enddate), devicetype => '32', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getvasistas'},
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 60,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, userid=> $hash->{User}, meastype => '11,39,41,43,44,57,59,87', startdate => int($lastupdate), enddate => int($enddate), devicetype => '32', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getvasistas'},
@@ -1698,7 +1713,7 @@ sub withings_getUserReadingsSleepDebug($) {
   $enddate = $now if ($enddate > $now);
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 60,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, userid=> $hash->{User}, meastype => '60,61,62,63,64,65,66,67,68,69,70', startdate => int($lastupdate), enddate => int($enddate), devicetype => '32', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getvasistas'},
@@ -1736,7 +1751,7 @@ sub withings_getUserReadingsActivity($) {
  Log3 "withings", 5, "$name: getactivityreadings ".$lastupdate." to ".$enddate;
 
   HttpUtils_NonblockingGet({
-    url => "https://scalews.health.nokia.com/index/service/v2/measure",
+    url => "https://scalews.health.nokia.com/cgi-bin/v2/measure",
     timeout => 60,
     noshutdown => 1,
     data => {sessionid => $hash->{IODev}->{SessionKey}, userid=> $hash->{User}, meastype => '36,37,38,39,40,41,42,43,44,59,70,87,90', startdate => int($lastupdate), enddate => int($enddate), devicetype => '16', appname => 'my2', appliver => $hash->{IODev}->{helper}{appliver}, apppfm => 'web', action => 'getvasistas'},
@@ -1842,7 +1857,7 @@ sub withings_parseMeasureGroups($$) {
 
 
      delete $hash->{CHANGETIME};
-     Log3 $name, 4, "$name: got ".$i.' entries from MeasureGroups (latest: '.FmtDateTime($newlastupdate).')';
+     Log3 $name, 3, "$name: got ".$i.' entries from MeasureGroups (latest: '.FmtDateTime($newlastupdate).')';
 
     }
 
@@ -1852,7 +1867,7 @@ sub withings_parseMeasurements($$) {
   my ($hash, $json) = @_;
   my $name = $hash->{NAME};
   #parse
-  Log3 "withings", 5, "$name: parsemeasurements";
+  Log3 "withings", 4, "$name: parsemeasurements";
   my ($now) = time;
   my $lastupdate = ReadingsVal( $name, ".lastData", ($now-21*24*60*60) );
   my $newlastupdate = $lastupdate;
@@ -1924,7 +1939,7 @@ sub withings_parseMeasurements($$) {
 
 
       delete $hash->{CHANGETIME};
-      Log3 $name, 4, "$name: got ".$i.' entries from Measurements (latest: '.FmtDateTime($newlastupdate).')';
+      Log3 $name, 3, "$name: got ".$i.' entries from Measurements (latest: '.FmtDateTime($newlastupdate).')';
 
 
     }
@@ -2192,7 +2207,7 @@ sub withings_parseVasistas($$;$) {
         my @readingsvalue = (@{$values[$j++]});
         if($readingsdate <= $lastupdate)
         {
-          Log3 $name, 4, "$name: old vasistas skipped: ".FmtDateTime($readingsdate);
+          Log3 $name, 5, "$name: old vasistas skipped: ".FmtDateTime($readingsdate);
           next;
         }
 
@@ -3155,8 +3170,9 @@ sub withings_Dispatch($$$) {
       Log3 $name, 2, "$name: json evaluation error on dispatch type ".$param->{type}." ".$@;
       return undef;
     }
+    Log3 $name, 1, "withings: Dispatch ".$param->{type}." json error ".$json->{error} if(defined($json->{error}));
 
-    Log3 $name, 4, "$name: json returned: ".Dumper($json);
+    Log3 $name, 5, "$name: json returned: ".Dumper($json);
 
     if(defined($param->{enddate}))
     {

+ 4 - 4
fhem/core/FHEM/88_HMCCU.pm

@@ -2,9 +2,9 @@
 #
 #  88_HMCCU.pm
 #
-#  $Id: 88_HMCCU.pm 17325 2018-09-11 07:54:43Z zap $
+#  $Id: 88_HMCCU.pm 17338 2018-09-13 17:20:18Z zap $
 #
-#  Version 4.3
+#  Version 4.3.001
 #
 #  Module for communication between FHEM and Homematic CCU2.
 #
@@ -107,7 +107,7 @@ my %HMCCU_CUST_CHN_DEFAULTS;
 my %HMCCU_CUST_DEV_DEFAULTS;
 
 # HMCCU version
-my $HMCCU_VERSION = '4.3';
+my $HMCCU_VERSION = '4.3.001';
 
 # Default RPC port (BidCos-RF)
 my $HMCCU_RPC_PORT_DEFAULT = 2001;
@@ -1304,7 +1304,7 @@ sub HMCCU_Shutdown ($)
 	my $name = $hash->{NAME};
 
 	# Shutdown RPC server
-	if (HMCCU_IsFlag ($name, "(extrpc|procrpc")) {
+	if (HMCCU_IsFlag ($name, "(extrpc|procrpc)")) {
 		HMCCU_StopExtRPCServer ($hash);
 	}
 	else {

+ 1 - 1
fhem/core/FHEM/controls.txt

@@ -1,4 +1,4 @@
-http://fhem.de/fhemupdate/controls_fhem.txt
+https://fhem.de/fhemupdate/controls_fhem.txt
 https://raw.githubusercontent.com/klein0r/fhem-style-haus-automatisierung/version-2/controls_ha_theme.txt
 https://raw.githubusercontent.com/knowthelist/fhem-tablet-ui/master/controls_fhemtabletui.txt
 https://raw.githubusercontent.com/jowiemann/DBPlan-for-Fhem/master/controls_dbplan.txt

+ 9 - 9
fhem/core/FHEM/controls_fhem.txt

@@ -1,4 +1,4 @@
-REV 17334
+REV 17341
 DIR unused
 MOV www/pgm2/fhemweb_multiple.js unused
 MOV www/pgm2/fhemweb_noArg.js unused
@@ -21,7 +21,7 @@ MOV www/pgm2/ios7smallscreensvg_style.css unused
 MOV www/pgm2/iossmallscreensvg_defs.svg unused
 MOV www/pgm2/iossmallscreensvg_style.css unused
 MOV FHEM/firmware/LaCrosseGateway.bin unused
-UPD 2018-09-13_07:45:06 258144 ./CHANGED
+UPD 2018-09-14_07:45:02 258187 ./CHANGED
 UPD 2018-09-05_07:45:04 37945 ./MAINTAINER.txt
 UPD 2018-09-09_07:45:03 39688 ./configDB.pm
 UPD 2018-08-27_07:45:04 20439 ./fhem.cfg.demo
@@ -97,8 +97,8 @@ UPD 2018-04-29_07:45:04 19133 FHEM/11_OWX_FRM.pm
 UPD 2018-04-29_07:45:04 27106 FHEM/11_OWX_SER.pm
 UPD 2018-04-29_07:45:04 25762 FHEM/11_OWX_TCP.pm
 UPD 2018-05-30_07:45:03 10823 FHEM/12_HMS.pm
-UPD 2018-09-10_07:45:02 12776 FHEM/12_HProtocolGateway.pm
-UPD 2018-09-10_07:45:02 3982 FHEM/12_HProtocolTank.pm
+UPD 2018-09-14_07:45:02 13159 FHEM/12_HProtocolGateway.pm
+UPD 2018-09-14_07:45:02 4602 FHEM/12_HProtocolTank.pm
 UPD 2017-12-17_13:17:44 14463 FHEM/13_KS300.pm
 UPD 2016-10-27_07:45:10 29342 FHEM/14_CUL_MAX.pm
 UPD 2015-12-05_07:45:11 10226 FHEM/14_CUL_REDIRECT.pm
@@ -185,7 +185,7 @@ UPD 2016-01-31_07:45:12 18305 FHEM/32_TechemWZ.pm
 UPD 2018-01-17_07:45:02 209352 FHEM/32_WifiLight.pm
 UPD 2018-03-02_07:47:09 15860 FHEM/32_mailcheck.pm
 UPD 2016-08-23_07:45:12 5646 FHEM/32_speedtest.pm
-UPD 2018-09-13_07:45:06 125955 FHEM/32_withings.pm
+UPD 2018-09-14_07:45:02 127260 FHEM/32_withings.pm
 UPD 2016-09-30_07:45:11 15878 FHEM/32_yowsup.pm
 UPD 2017-12-15_07:45:02 4576 FHEM/33_readingsChange.pm
 UPD 2018-03-02_07:47:09 89206 FHEM/33_readingsGroup.pm
@@ -389,7 +389,7 @@ UPD 2018-07-17_07:45:04 6465 FHEM/84_IOhomecontrolDevice.pm
 UPD 2018-08-20_07:45:03 42219 FHEM/86_Robonect.pm
 UPD 2015-07-28_14:05:31 17571 FHEM/87_WS2000.pm
 UPD 2015-07-28_14:05:31 4345 FHEM/88_ALL4000T.pm
-UPD 2018-09-12_07:45:02 251554 FHEM/88_HMCCU.pm
+UPD 2018-09-14_07:45:02 251563 FHEM/88_HMCCU.pm
 UPD 2018-09-12_07:45:02 42477 FHEM/88_HMCCUCHN.pm
 UPD 2018-09-12_07:45:02 37134 FHEM/88_HMCCUDEV.pm
 UPD 2018-02-14_07:45:02 90153 FHEM/88_HMCCURPC.pm
@@ -679,12 +679,12 @@ UPD 2016-07-21_07:45:27 24829 docs/HOWTO_DE.html
 UPD 2015-07-28_14:05:35 46151 docs/IMG_0483.jpg
 UPD 2017-06-30_07:45:02 37394 docs/Landis-Gyr-E350-meter.jpg
 UPD 2015-07-28_14:05:35 14548 docs/ccc.jpg
-UPD 2018-09-13_07:45:09 3553699 docs/commandref.html
+UPD 2018-09-14_07:45:05 3554273 docs/commandref.html
 UPD 2018-09-13_07:45:11 2186974 docs/commandref_DE.html
 UPD 2018-07-16_07:45:03 76259 docs/commandref_frame.html
 UPD 2018-07-16_07:45:03 85715 docs/commandref_frame_DE.html
-UPD 2018-09-13_07:45:12 196347 docs/commandref_modular.html
-UPD 2018-09-13_07:45:13 207061 docs/commandref_modular_DE.html
+UPD 2018-09-14_07:45:08 196347 docs/commandref_modular.html
+UPD 2018-09-14_07:45:09 207061 docs/commandref_modular_DE.html
 UPD 2015-07-28_14:05:35 4778 docs/cul_rfr.jpg
 UPD 2015-07-28_14:05:35 19949 docs/faq.html
 UPD 2015-07-28_14:05:35 938 docs/fhemdoc.js

+ 29 - 4
fhem/core/docs/commandref.html

@@ -31212,7 +31212,6 @@ Step C0 C1<br>
   <ul>
     <code>define &lt;name&gt; HProtocolGateway /dev/tty???<br />
     attr &lt;name&gt; pollIntervalMins 2<br />
-    attr &lt;name&gt; mode Filllevel<br />
     attr &lt;name&gt; path /opt/fhem/<br />
     attr &lt;name&gt; baudrate 1200<br />
     attr &lt;name&gt; databitsLength 8<br />
@@ -31239,8 +31238,26 @@ Step C0 C1<br>
     2430,58275<br />
     </code> 
 
+  
     <br /><br /> 
 
+  <a name="HProtocolGateway"></a>
+  <b>Attributes</b>
+  <ul>
+    <li>pollIntervalMins<br />
+    poll Interval in Mins</li>
+    <li>path<br />
+    Strapping Table csv file path</li>
+    <li>baudrate<br />
+    Baudrate / 300, 600, 1200, 2400, 4800, 9600</li>
+    <li>databitsLength<br />
+    Databits Length / 5, 6, 7, 8</li>
+    <li>parityBit<br />
+    Parity Bit / N, E, O</li>
+    <li>stopBit<br />
+    Stop Bit / 0, 1</li>
+  </ul><br />
+
   </ul><br />
 
 </ul><br />
@@ -31257,7 +31274,6 @@ Step C0 C1<br>
   <b>Define</b>
   <ul>
     <code>define tank01 HProtocolTank HProtocolGateway<br />
-          setreading tank01 hID 01<br />
     </code>
     <br />
 
@@ -31268,8 +31284,6 @@ Step C0 C1<br>
   <a name="HProtocolTank"></a>
   <b>Readings</b>
   <ul>
-    <li>hID<br />
-    01 - 99 Tank Number / Tank Address</li>
     <li>ullage<br />
     0..999999 Ullage in litres</li>
     <li>filllevel<br />
@@ -31290,6 +31304,17 @@ Step C0 C1<br>
     0..9 00.. Probe error</li>
   </ul><br />
 
+  <a name="HProtocolTank"></a>
+  <b>Attributes</b>
+  <ul>
+    <li>hID<br />
+    01 - 32 Tank Number / Tank Address (99 for testing only)</li>
+    <li>mode<br />
+    FillLevel, Volume, Ullage</li>
+    <li>type<br />
+    Strapping Table csv file / tank01.csv</li>
+  </ul><br />
+
 
 </ul><br />
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 31 - 2
fhem/core/fhem.cfg