Autor Thema: show temperature / measuredTemperature at devices list, not desiredTemperature  (Gelesen 409 mal)

Offline novalis

  • New Member
  • *
  • Beiträge: 3
Hi,
I am missing measuredTemperature value at HeatingThermostat (HT) details web page (was shown as "temperature" in old version, now it seems that it is only shown at HT which is not paired with Wall Thermosat (WT) ) and I would also like to see this temperature (and WT temperature) in MAX room devices list, I don't want to see desiredTemperature as "state", I want to see actual "temperature" of Heating and Wall thermostats.  It was possible with old MAX file version, but since I am using SVN version, I am having those new files ...

I did this:

--- FHEM/10_MAX.pm      (revision 24678)
+++ FHEM/10_MAX.pm      (working copy)
@@ -1602,6 +1602,7 @@
     #Sometime we get an MAX_Parse MAX,1,ThermostatState,01090d,180000000000, where desiredTemperature is 0 - ignore it

     readingsBulkUpdate($shash, "temperature", MAX_SerializeTemperature($measuredTemperature)) if ($measuredTemperature ne "");
+    $shash->{'.temperature'}=$measuredTemperature if ($measuredTemperature ne "");
     if (!AttrVal($shash->{NAME},'externalSensor',''))
     {readingsBulkUpdate($shash, "deviation", sprintf("%.1f",($measuredTemperature-$shash->{'.desiredTemperature'}))) if ($shash->{'.desiredTemperature'} && $measuredTemperature);}
     else
@@ -1692,6 +1693,7 @@
     if(defined($temperature))
     {
       $temperature = ((($desiredTemperatureRaw &0x80)<<1) + $temperature)/10;  # auch Temperaturen über 25.5 °C werden angezeigt !
+      $shash->{'.temperature'}=$temperature;
       Log3 $hash, 5, $shash->{NAME}.", desiredTemperature : $shash->{'.desiredTemperature'}, temperature : $temperature";
       readingsBulkUpdate($shash, "temperature", sprintf("%.1f",$temperature));
       readingsBulkUpdate($shash, "deviation",   sprintf("%.1f", ($temperature-$shash->{'.desiredTemperature'})));
@@ -1938,6 +1940,7 @@
   #$state = $shash->{'.desiredTemperature'}.$c if (exists($shash->{'.desiredTemperature'}));

   $state = $shash->{'.desiredTemperature'} if (exists($shash->{'.desiredTemperature'}));
+  $state = $shash->{'.temperature'} if (exists($shash->{'.temperature'}));
   $state = ($shash->{'.isopen'}) ? 'opened' : 'closed' if (exists($shash->{'.isopen'}));

   if ($shash->{devtype} > 5)

To show at least the temperature at MAX room  devices list where the temperature is known,but I am still missing the measuredTemperature of HT, which is paired with WT

Thanks.

Offline novalis

  • New Member
  • *
  • Beiträge: 3
Some update to shown temperatures - looks like after some time HeatingThersmostat (HT) is showing temperature, but it's not HT's measuredTemperature, but temperature of WallThermostat (in last post I wrote, that only HTs which are not paired with WT have "temperature")

Offline Wzut

  • Moderator
  • Hero Member
  • ***
  • Beiträge: 4513
THX4Info, I will check this
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

Offline jangofritz

  • New Member
  • *
  • Beiträge: 7
edit stateFormat to:

State                     : state °C<br/>
Temperature         : temperature °C<br/>

If you do not need the state just erase it.

JFritz

nanoCUL und 9 MAX! Thermostate. TabletUI und MAX!Scanner - ESP8266 als Aktor für die Zirkulationspumpe und zur Feuchte und Temperaturmessung - Sonoff TH16 als Aktor für Espressomaschine - Conbee + diverse THPs in Feuchträumen, sowie BWMs und Drucktaster