klassm / andFHEM

Manage your FHEM home automation server via Android.
andFHEM.klass.li
60 stars 21 forks source link

Support HourCounter #884

Closed klassm closed 9 years ago

klassm commented 9 years ago

<?xml version="1.0" encoding="UTF-8"?>
<HourCounter_LIST>
   <HourCounter name="Gaszaehler" state="184" sets="countsOverall countsPerDay pauseTimeIncrement pauseTimePerDay pauseTimeOverall pulseTimeIncrement pulseTimePerDay pulseTimeOverall clear:noArg forceHourChange:noArg forceDayChange:noArg forceWeekChange:noArg forceMonthChange:noArg forceYearChange:noArg calc:noArg " attrs="verbose:0,1,2,3,4,5 room group comment alias eventMap userReadings disable:0,1 interval:1,2,3,4,5,10,15,20,30,60 event-on-change-reading event-on-update-reading event-aggregator event-min-interval stateFormat devStateIcon devStateStyle fp_henno icon sortby webCmd widgetOverride userattr">
      <INT key="CFGFN" value="/ram/fhem/FHEM/Gaszaehler.cfg" />
      <INT key="DEF" value="Gascounter:count:.*" />
      <INT key="NAME" value="Gaszaehler" />
      <INT key="NR" value="91" />
      <INT key="NTFY_ORDER" value="50-Gaszaehler" />
      <INT key="STATE" value="184" />
      <INT key="TYPE" value="HourCounter" />
      <INT key="VERSION" value="1.0.1.2 - 24.12.2014" />
      <ATTR key="room" value="Keller" />
      <ATTR key="userReadings" value="verbrauchTagkWh {sprintf(&quot;%.1f&quot;, ReadingsVal(&quot;Gaszaehler&quot;,&quot;countsPerDay&quot;,0)*0.01*10.0470) . &quot; kWh&quot;;; }, verbrauchTagEuro {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Gaszaehler&quot;,&quot;countsPerDay&quot;,0)*0.01*10.0470*0.058) . &quot;&quot;;; }, verbrauchGesamtEuro {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Gaszaehler&quot;,&quot;countsOverall&quot;,0)*0.01*10.0470*0.058) . &quot; €&quot;;; }, verbrauchTag {sprintf(&quot;%.3f&quot;, ReadingsVal(&quot;Gaszaehler&quot;,&quot;countsPerDay&quot;,0)*0.01) . &quot;&quot;;; }, Zaehlerstand {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Gaszaehler&quot;,&quot;countsOverall&quot;,0)*0.01) . &quot; m³&quot;;; }" />
      <ATTR key="verbose" value="1" />
      <STATE key="Zaehlerstand" value="626.54 m³" measured="2015-02-23 21:00:00" />
      <STATE key="clearDate" value="2015-01-13 20:02:05" measured="2015-01-13 20:02:05" />
      <STATE key="countsOverall" value="62654" measured="2015-02-23 21:00:00" />
      <STATE key="countsPerDay" value="184" measured="2015-02-23 21:00:00" />
      <STATE key="pauseTimeIncrement" value="0" measured="2015-01-06 17:11:49" />
      <STATE key="pauseTimeOverall" value="0" measured="2015-01-06 17:11:49" />
      <STATE key="pauseTimePerDay" value="0" measured="2015-02-23 00:00:00" />
      <STATE key="pulseTimeIncrement" value="0" measured="2015-01-06 17:11:49" />
      <STATE key="pulseTimeOverall" value="0" measured="2015-01-06 17:11:49" />
      <STATE key="pulseTimePerDay" value="0" measured="2015-02-23 00:00:00" />
      <STATE key="state" value="184" measured="2015-02-23 21:00:00" />
      <STATE key="tickChanged" value="658" measured="2015-02-23 20:39:43" />
      <STATE key="tickDay" value="1" measured="2015-02-23 00:00:00" />
      <STATE key="tickHour" value="37" measured="2015-02-23 21:00:00" />
      <STATE key="tickMonth" value="0" measured="2015-02-22 08:33:59" />
      <STATE key="tickUpdated" value="730" measured="2015-02-23 21:00:00" />
      <STATE key="tickWeek" value="0" measured="2015-02-22 08:33:59" />
      <STATE key="tickYear" value="0" measured="2015-02-22 08:33:59" />
      <STATE key="value" value="1" measured="2015-02-23 21:00:00" />
      <STATE key="verbrauchGesamtEuro" value="365.10 €" measured="2015-02-23 21:00:00" />
      <STATE key="verbrauchTag" value="1.840" measured="2015-02-23 21:00:00" />
      <STATE key="verbrauchTagEuro" value="1.07" measured="2015-02-23 21:00:00" />
      <STATE key="verbrauchTagkWh" value="18.5 kWh" measured="2015-02-23 21:00:00" />
   </HourCounter>
   <HourCounter name="Stromzaehler" state="4443" sets="countsOverall countsPerDay pauseTimeIncrement pauseTimePerDay pauseTimeOverall pulseTimeIncrement pulseTimePerDay pulseTimeOverall clear:noArg forceHourChange:noArg forceDayChange:noArg forceWeekChange:noArg forceMonthChange:noArg forceYearChange:noArg calc:noArg " attrs="verbose:0,1,2,3,4,5 room group comment alias eventMap userReadings disable:0,1 interval:1,2,3,4,5,10,15,20,30,60 event-on-change-reading event-on-update-reading event-aggregator event-min-interval stateFormat devStateIcon devStateStyle fp_henno icon sortby webCmd widgetOverride userattr">
      <INT key="CFGFN" value="/ram/fhem/FHEM/Stromzaehler.cfg" />
      <INT key="DEF" value="Stromcounter:reading:.off" />
      <INT key="NAME" value="Stromzaehler" />
      <INT key="NR" value="62" />
      <INT key="NTFY_ORDER" value="50-Stromzaehler" />
      <INT key="STATE" value="4443" />
      <INT key="TYPE" value="HourCounter" />
      <INT key="VERSION" value="1.0.1.2 - 24.12.2014" />
      <ATTR key="fp_henno" value="400,10,1," />
      <ATTR key="room" value="Keller" />
      <ATTR key="userReadings" value="verbrauchTagkWh {sprintf(&quot;%.0f&quot;, ReadingsVal(&quot;Stromzaehler&quot;,&quot;countsPerDay&quot;,0)*0.00125) . &quot;&quot;;; }, verbrauchTagEuro {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Stromzaehler&quot;,&quot;countsPerDay&quot;,0)*0.00125*0.258) . &quot;&quot;;; }, verbrauchGesamtEuro {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Stromzaehler&quot;,&quot;countsOverall&quot;,0)*0.00125*0.258) . &quot; €&quot;;; }, verbrauchTag {sprintf(&quot;%f&quot;, ReadingsVal(&quot;Stromzaehler&quot;,&quot;countsPerDay&quot;,0)*0.00125) . &quot;&quot;;; }, Zaehlerstand {sprintf(&quot;%.2f&quot;, ReadingsVal(&quot;Stromzaehler&quot;,&quot;countsOverall&quot;,0)*0.00125) . &quot; kW&quot;;; }" />
      <ATTR key="verbose" value="1" />
      <STATE key="Zaehlerstand" value="2304.53 kW" measured="2015-02-23 21:35:22" />
      <STATE key="clearDate" value="2015-01-06 17:11:47" measured="2015-01-06 17:11:47" />
      <STATE key="countsOverall" value="1843623" measured="2015-02-23 21:35:22" />
      <STATE key="countsPerDay" value="4443" measured="2015-02-23 21:35:22" />
      <STATE key="pauseTimeIncrement" value="0" measured="2015-01-06 17:11:47" />
      <STATE key="pauseTimeOverall" value="0" measured="2015-01-06 17:11:47" />
      <STATE key="pauseTimePerDay" value="0" measured="2015-02-23 00:00:00" />
      <STATE key="pulseTimeIncrement" value="0" measured="2015-01-06 17:11:47" />
      <STATE key="pulseTimeOverall" value="0" measured="2015-01-06 17:11:47" />
      <STATE key="pulseTimePerDay" value="0" measured="2015-02-23 00:00:00" />
      <STATE key="state" value="4443" measured="2015-02-23 21:35:22" />
      <STATE key="tickChanged" value="348" measured="2015-02-23 21:35:22" />
      <STATE key="tickDay" value="1" measured="2015-02-23 00:00:00" />
      <STATE key="tickHour" value="37" measured="2015-02-23 21:00:00" />
      <STATE key="tickMonth" value="0" measured="2015-02-22 08:33:58" />
      <STATE key="tickUpdated" value="336" measured="2015-02-23 21:35:22" />
      <STATE key="tickWeek" value="0" measured="2015-02-22 08:33:58" />
      <STATE key="tickYear" value="0" measured="2015-02-22 08:33:58" />
      <STATE key="value" value="1" measured="2015-02-23 21:35:22" />
      <STATE key="verbrauchGesamtEuro" value="594.57 €" measured="2015-02-23 21:35:22" />
      <STATE key="verbrauchTag" value="5.553750" measured="2015-02-23 21:35:22" />
      <STATE key="verbrauchTagEuro" value="1.43" measured="2015-02-23 21:35:22" />
      <STATE key="verbrauchTagkWh" value="6" measured="2015-02-23 21:35:22" />
   </HourCounter>
</HourCounter_LIST>
HENN0 commented 9 years ago

Hi

ich benutze den Hourcount als Strom und Gaszähler.

Ich denke für die Allgemeinheit wäre es am einfachsten nur den "STATE" als reading zu verwenden. Das kann man sich ja nach bedarf anpassen.

klassm commented 9 years ago

Hi,

naja normalerweise zeigt andFHEM immer die Attribute direkt an. Das kann man dann mit Einheiten auch schön formatieren. Die Frage ist nur immer was die Attribute im einzelnen bedeuten.

Gerade frage ich mich zum Beispiel ob die Einheit des Zählerstands wirklich kW sein sollen, oder ob das nicht eher kWh sind? Ich baue es mal als kWh, wenn du mir aber sagst, dass es sicher kW sind dann baue ich es nochmal um ...

Edit: gerade gesehen, dass die Einheit auch noch variiert - ok ich schreibe es generisch ...

Matthias