Neues Modul: ElectricityCalculator

Begonnen von Sailor, 26 August 2016, 21:05:35

Vorheriges Thema - Nächstes Thema

caldir65

#720
Ok, danke, habe ich jetzt so gemacht.
Ich bekomme auch die Readings erzeugt, sie bleiben jedoch auf 0, obwohl das Zähldevice fleißig Werte liefert.
Hier einmal exemplarisch die Definition für Strom-Bezug:
Internals:
   CFGFN     
   DEF        MyObis:total_consumption.*
   FUUID      62360c5e-f33f-378b-9bdb-886f49989f3e913a
   NAME       ElectricityCalculatorIn
   NOTIFYDEV  MyObis
   NR         57359
   NTFY_ORDER 10-ElectricityCalculatorIn
   REGEXP     MyObis:total_consumption.*
   STATE      active
   TYPE       ElectricityCalculator
   READINGS:
     2022-03-19 18:15:45   MyObis_total_consumption_CounterCurrent 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterDay1st 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterDayLast 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterMeter1st 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterMeterLast 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterMonth1st 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterMonthLast 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterYear1st 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_CounterYearLast 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostDay 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMeter 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMonth 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostYear 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyDay 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyMeter 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyMonth 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_EnergyYear 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_FinanceReserve -8.083
     2022-03-19 18:15:45   MyObis_total_consumption_MonthMeterReading 1
     2022-03-19 18:15:45   MyObis_total_consumption_PowerCurrent 0.000
     2022-03-19 18:15:45   MyObis_total_consumption_PowerDayAver 0.000
     2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMax 0
     2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMin 0
   helper:
     gets:
       2022-03-19 18:15:45   MyObis_total_consumption_CounterCurrent 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterDay1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterDayLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMeter1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMeterLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMonth1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMonthLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterYear1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterYearLast 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostDay 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMeter 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMonth 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostYear 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyDay 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyMeter 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyMonth 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyYear 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_FinanceReserve -8.083
       2022-03-19 18:15:45   MyObis_total_consumption_MonthMeterReading 1
       2022-03-19 18:15:45   MyObis_total_consumption_PowerCurrent 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_PowerDayAver 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMax 0
       2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMin 0
     sets:
       2022-03-19 18:15:45   MyObis_total_consumption_CounterCurrent 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterDay1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterDayLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMeter1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMeterLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMonth1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterMonthLast 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterYear1st 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_CounterYearLast 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostDay 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMeter 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostMonth 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyCostYear 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyDay 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyMeter 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyMonth 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_EnergyYear 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_FinanceReserve -8.083
       2022-03-19 18:15:45   MyObis_total_consumption_MonthMeterReading 1
       2022-03-19 18:15:45   MyObis_total_consumption_PowerCurrent 0.000
       2022-03-19 18:15:45   MyObis_total_consumption_PowerDayAver 0.000
       2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMax 0
       2022-03-19 18:05:28   MyObis_total_consumption_WFRDayMin 0
   system:
     DecimalPlace %.3f
     SiPrefixPowerFactor 1
Attributes:
   BasicPricePerAnnum 97,08
   Currency   €
   DbLogExclude .*
   DecimalPlace 3
   ElectricityCounterOffset 0
   ElectricityKwhPerCounts 0,0001
   ElectricityPricePerKWh 0.3094
   MonthOfAnnualReading 3
   MonthlyPayment 0
   ReadingDestination CalculatorDevice
   SiPrefixPower kW
   room       HWR


Und noch einmal - weil es einfacher hier ist - das Zählerdevice
Internals:
   DEF        /dev/ttyUSB0@9600,8,N,1 SML
   DeviceName /dev/ttyUSB0@9600,8,N,1
   FD         14
   FUUID      5c573c89-f33f-e6da-d804-6bd80686739de4b7
   MeterType  SML
   NAME       MyObis
   NR         45
   PARTIAL   
   STATE      opened
   TYPE       OBIS
   OLDREADINGS:
   READINGS:
     2022-03-15 19:48:59   ManufID         EMH
     2022-03-15 19:48:59   PublicKey       7476-DF6D-9560-00C2-280F-E161-3008-1560-0192-DB35-C998-C96C-A77B-DEA8-D955-66F0-3AFF-E64B-418D-1C47-1953-7C93-EBA0-0CAD-01
     2022-03-15 19:48:59   Serial          09-01-45-4D-48-00-00-3E-F1-26
     2021-03-19 18:23:36   Version         
     2018-01-18 17:41:30   dir_total_consumption →
     2018-01-18 17:41:30   dir_total_feed  →
     2022-03-15 19:48:59   power           490.9
     2022-03-13 21:24:37   state           opened
     2022-03-15 19:48:59   total_consumption 24343802
     2022-03-15 19:48:59   total_feed      52147829.6
   helper:
     BUFFER     
     DIRECTIONSUM >
     EoM        0
     LastPacketTime 1647370139.53166
     SPEED      5
     SPEED2     5
     TRIGGERTIME 1647203077.10137
     Channels:
     DEVICES:
       
       0
       
     RULECACHE:
       1-0:0.0.9*255 Serial
       1-0:1.8.0*255 Counter
       1-0:1.8.1*255 Counter
       1-0:1.8.2*255 Counter
       1-0:16.7.0*255 Channels
       1-0:2.8.0*255 Counter
       1-0:2.8.1*255 Counter
       1-0:2.8.2*255 Counter
       129-129:199.130.3*255 ManufID
       129-129:199.130.5*255 PublicKey
     directions:
       <          ←
       >          →
Attributes:
   comment    total_consumption_kWh { my $temp1 = ReadingsVal($name,"total_consumption",0)/1000; return $temp1;},total_feed_kWh { my $temp2 = ReadingsVal($name,"total_feed",0)/1000; return $temp2;}
   event-on-change-reading .*
   event-on-update-reading .*
   extChannels auto
   ignoreUnknown on
   room       Strom
   suppressReading total_.*.Ch.*
   unitReadings off


Gruß, Christoph

Nachtrag: Ich habe den Stromzähler auf einem eigenem Raspi laufen und per fhem2fhem zum Haupt-Raspi in einen gleichnamigen Dummy übertragen - mit diesem Dummy kommt der EC anscheinend nicht richtig klar. Ich habe mal auf dem Zähler-Raspi den EC analog eingerichtet, und dort scheinen die Werte sauber ausgewertet zu werden...
Alte Techniker-Regel: "kaum macht man es richtig, funktioniert es auch"
------
Dell Wyse5070 ThinClient 16GBRam, 64GB SSD, Lubuntu 22.04LTS, fhem (aktuell), debmatic, Homematic-Devs, ConBee II und deConz, viele Shellys, Rademacher, NextCloud-Anbindung, FullyKioskBrowser+FUIP uvm.

Sailor

Moin

Zitat von: caldir65 am 18 März 2022, 10:25:28
Ok, danke, habe ich jetzt so gemacht.
Ich bekomme auch die Readings erzeugt, sie bleiben jedoch auf 0, obwohl das Zähldevice fleißig Werte liefert.
MyObis:total_consumption.*

Ist mir auch schleierhaft...
Zählt der total_consumption auch wirklich hoch oder bleibt der auf dem gleichen Wert?

Wenn du den auf MyObis:total_consumption:.* änderst?

Gruß
    Sailor
******************************
Man wird immer besser...

caldir65

Zitat von: Sailor am 22 März 2022, 13:08:28
Wenn du den auf MyObis:total_consumption:.* änderst?

Moin,

damit funktioniert es jetzt auch über den Dummy. Danke.

Gruß, Christoph
Alte Techniker-Regel: "kaum macht man es richtig, funktioniert es auch"
------
Dell Wyse5070 ThinClient 16GBRam, 64GB SSD, Lubuntu 22.04LTS, fhem (aktuell), debmatic, Homematic-Devs, ConBee II und deConz, viele Shellys, Rademacher, NextCloud-Anbindung, FullyKioskBrowser+FUIP uvm.

ojb

Hallo Sailor,

erst mal vielen Dank für das tolle Modul.

Ich benutze es um meine Stromverbräuche (Haus, Heizung, Wallbox, Gesamt) und meine Stromlieferungen/-verkäufe (Netzbezug, Netzeinspeisung, PV-Ertrag) zu tracken und in einem schönen Dashboard darzustellen.

Leider ist mir jetzt aufgefallen, dass ich das Konzept nicht ganz verstanden zu haben scheine. Die "Meter" Wert hatte ich immer als Gesamt_Energie-Werte verstanden. Offensichtlich werden sie aber am "MonthOfAnnualReading" genullt.

Das heißt es gibt keine Möglichkeit wirklich die Gesamt-Energie zu bekommen, oder?

Könnte man das eventuell einbauen?

Ich bin also auf der Suche nach quasi EnergyTotal, EnergyCostTotal.

Liebe Grüße
Oli
FHEM unter Debian auf Asus EEBox: KNX (Wetterstation, Rollläden, Beleuchtung), Maple-CUN (Temperatur und Feuchte über 1-Wire, Intertechno-Funksteckdosen), PV-Anlage mit Plenticore und BYD, Viessmann Wärmepumpe, 1-Wire (Temperatur, Feuchte, Stromverbrauch), Husquarna-Automower, ...

Sailor

Hi Oli

Zitat von: ojb am 04 Mai 2022, 11:26:51
Leider ist mir jetzt aufgefallen, dass ich das Konzept nicht ganz verstanden zu haben scheine. Die "Meter" Wert hatte ich immer als Gesamt_Energie-Werte verstanden. Offensichtlich werden sie aber am "MonthOfAnnualReading" genullt.

Ja klar - Siehe commandref:
_EnergyMeter : Energieverbrauch seit Beginn der aktuellen Ableseperiode.

Zitat von: ojb am 04 Mai 2022, 11:26:51
Das heißt es gibt keine Möglichkeit wirklich die Gesamt-Energie zu bekommen, oder?
Aber klar doch: _CounterCurrent

Gruß
    Sailor
******************************
Man wird immer besser...

ojb

FHEM unter Debian auf Asus EEBox: KNX (Wetterstation, Rollläden, Beleuchtung), Maple-CUN (Temperatur und Feuchte über 1-Wire, Intertechno-Funksteckdosen), PV-Anlage mit Plenticore und BYD, Viessmann Wärmepumpe, 1-Wire (Temperatur, Feuchte, Stromverbrauch), Husquarna-Automower, ...

Sailor

Zitat von: ojb am 06 Mai 2022, 13:56:19
Und auch die Gesamt-Kosten?

Wie soll das gehen, wenn sich die Kosten in jeder Mess-Periode ändern?
Was du machen kannst, sind die jeweiligen Kosten am Ende der Messperiode plotten.

Gruß
    Sailor
******************************
Man wird immer besser...

Wasserwerk33

#727
Hallo Leute,

mein Stromzähler wird immer zum 1.05 abgerechnet.
Habe mir den Zählerstand zum 1.05 aufgeschrieben. Was muss ich nun wo eintragen damit die Werte passen.

Kommt aus dem Wiki.
Zusätzlich kann man vermeiden, dass man bis zu 12 Monate warten muss, bis alle Werte in den Readings korrekt sind, diese Readings manuell setzen:

<DestinationDevice>_<SourceCounterReading>_CounterDay1st,
<DestinationDevice>_<SourceCounterReading>_CounterMonth1st,
<DestinationDevice>_<SourceCounterReading>_CounterYear1st und
<DestinationDevice>_<SourceCounterReading>_CounterMeter1st

setreading <Device> <Reading> <WERT>


Habe nur so Werte das ich 8400€ Zahlen soll. Dieses passt aber nicht. den rest von wegen was ich pro KWh zahle, oder abschlag habe ich schon ausgefühlt. Nur das mit den Monats/Jahres berechnung bekomme ich nicht hin

danke für eure Hilfe.

hat geklappt. weiß nicht was ich anderes gemacht habe. Hatte es nochmal gelöscht danach passte es.

ojb

Zitat von: Sailor am 09 Mai 2022, 09:19:54
Wie soll das gehen, wenn sich die Kosten in jeder Mess-Periode ändern?
Was du machen kannst, sind die jeweiligen Kosten am Ende der Messperiode plotten.

Nein, ich meine etwas anderes.

Ich habe z.b. einen ElectricityCalculator für die Netzeinspeisung der PV-Anlage. Mich interessiert aber nicht eine Abrechnungsperiode sondern was ist seit Messbeginn von der Anlage eingespeist worden.

Ich habe mal den Code überflogen. Wenn ich als "Wechsel-Monat" 0 eingebe, dann dürfte es doch nie zu einem Abrechnungsperiodenwechsel kommen, kann das sein?
Ansonsten wäre dirty work around CounterLast und Counter1st beim Periodenwechsel manuell auf Null zu setzen.

Anbei mal ein Screenshot meines PV-Dashboards, das aus all meinen ElectricityCalculator's stammt:
ElectricityCalculator_Batteriebezug,
ElectricityCalculator_Eigenverbrauch_aus_Photovoltaik,
ElectricityCalculator_Gesamt,
ElectricityCalculator_Haus,
ElectricityCalculator_Heizung,
ElectricityCalculator_Netzbezug,
ElectricityCalculator_Netzeinspeisung,
ElectricityCalculator_Photovoltaik_Ertrag,
ElectricityCalculator_Wallbox.

Liebe Grüße
Oli
FHEM unter Debian auf Asus EEBox: KNX (Wetterstation, Rollläden, Beleuchtung), Maple-CUN (Temperatur und Feuchte über 1-Wire, Intertechno-Funksteckdosen), PV-Anlage mit Plenticore und BYD, Viessmann Wärmepumpe, 1-Wire (Temperatur, Feuchte, Stromverbrauch), Husquarna-Automower, ...

Wasserwerk33

Hallo Leute,

Ich habe mal eine Frage. Und zwar habe ich ein Problem mit meiner Stromberechnung.

Mein Fhem Modul sagt mir das ich 126 Euro verbraucht habe an Stromkosten.

Wenn ich es selber aussrechen komme ich auch auf 115€ (302x0,3825=115,515)
Wenn das Modul vielleicht noch den Basispreis mit berechnet komme ich trotzdem nicht auf meinen Preis. 215€:365tage=0,5890*37 Tage=21,79€

115,515+21,79=137,30

Wo ist den nun mein Fehler.

List Stromcalculator:
Internals:
   DEF        haus.stromzaehler:total_consumption:.*
   FUUID      6278c683-f33f-5e7b-c490-d552cdc97334fba2
   NAME       myElectricityCalculator
   NOTIFYDEV  haus.stromzaehler
   NR         164
   NTFY_ORDER 10-myElectricityCalculator
   REGEXP     haus.stromzaehler:total_consumption:.*
   STATE      Kosten Heute: 2.204 € <br>
Kosten Gestern: 0.759€ <br>
Kosten Monat: 19.164 €<br>
Kosten Jahr: 126.316 €<br>
<br>
<br>
Reserve:156.593 €
   TYPE       ElectricityCalculator
   eventCount 18
   READINGS:
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_CounterCurrent 22243552.000
     2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDay1st 22237789.600
     2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDayLast 22237786.000
     2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeter1st 21962313.800
     2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeterLast 21962313.800
     2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonth1st 22193450.500
     2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonthLast 22192931.000
     2022-05-09 10:34:20   haus.stromzaehler_total_consumption_CounterYear1st 21913313.800
     2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterYearLast 21962313.800
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostDay 2.204
     2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyCostDayLast 0.759
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMeter 107.574
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMonth 19.164
     2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyCostMonthLast 106.954
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostYear 126.316
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyDay 5762.400
     2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyDayLast 1984.100
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMeter 281238.200
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMonth 50101.500
     2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyMonthLast 279617.200
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyYear 330238.200
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_FinanceReserve 156.593
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_MonthMeterReading 2
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerCurrent 1272.000
     2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerDayAver 523.147
     2022-06-07 10:42:42   haus.stromzaehler_total_consumption_PowerDayMax 3978.305
     2022-06-07 04:26:57   haus.stromzaehler_total_consumption_PowerDayMin 96
     2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMax 0
     2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMin 0
   helper:
     gets:
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_CounterCurrent 22243552.000
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDay1st 22237789.600
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDayLast 22237786.000
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeter1st 21962313.800
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeterLast 21962313.800
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonth1st 22193450.500
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonthLast 22192931.000
       2022-05-09 10:34:20   haus.stromzaehler_total_consumption_CounterYear1st 21913313.800
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterYearLast 21962313.800
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostDay 2.204
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyCostDayLast 0.759
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMeter 107.574
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMonth 19.164
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyCostMonthLast 106.954
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostYear 126.316
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyDay 5762.400
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyDayLast 1984.100
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMeter 281238.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMonth 50101.500
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyMonthLast 279617.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyYear 330238.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_FinanceReserve 156.593
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_MonthMeterReading 2
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerCurrent 1272.000
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerDayAver 523.147
       2022-06-07 10:42:42   haus.stromzaehler_total_consumption_PowerDayMax 3978.305
       2022-06-07 04:26:57   haus.stromzaehler_total_consumption_PowerDayMin 96
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMax 0
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMin 0
     sets:
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_CounterCurrent 22243552.000
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDay1st 22237789.600
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_CounterDayLast 22237786.000
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeter1st 21962313.800
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterMeterLast 21962313.800
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonth1st 22193450.500
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_CounterMonthLast 22192931.000
       2022-05-09 10:34:20   haus.stromzaehler_total_consumption_CounterYear1st 21913313.800
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_CounterYearLast 21962313.800
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostDay 2.204
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyCostDayLast 0.759
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMeter 107.574
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostMonth 19.164
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyCostMonthLast 106.954
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyCostYear 126.316
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyDay 5762.400
       2022-06-07 00:00:55   haus.stromzaehler_total_consumption_EnergyDayLast 1984.100
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMeter 281238.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyMonth 50101.500
       2022-06-01 01:33:25   haus.stromzaehler_total_consumption_EnergyMonthLast 279617.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_EnergyYear 330238.200
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_FinanceReserve 156.593
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_MonthMeterReading 2
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerCurrent 1272.000
       2022-06-07 11:01:42   haus.stromzaehler_total_consumption_PowerDayAver 523.147
       2022-06-07 10:42:42   haus.stromzaehler_total_consumption_PowerDayMax 3978.305
       2022-06-07 04:26:57   haus.stromzaehler_total_consumption_PowerDayMin 96
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMax 0
       2022-05-09 09:45:08   haus.stromzaehler_total_consumption_WFRDayMin 0
   system:
     DecimalPlace %.3f
     SiPrefixPowerFactor 1000
Attributes:
   BasicPricePerAnnum 215
   Currency   €
   DecimalPlace 3
   ElectricityCounterOffset 21913
   ElectricityKwhPerCounts 1
   ElectricityPricePerKWh 0.0003825
   MonthOfAnnualReading 5
   MonthlyPayment 150
   ReadingDestination CalculatorDevice
   SiPrefixPower kW
   group      Strom
   room       Keller
   stateFormat Kosten Heute: haus.stromzaehler_total_consumption_EnergyCostDay € <br>
Kosten Gestern: haus.stromzaehler_total_consumption_EnergyCostDayLast€ <br>
Kosten Monat: haus.stromzaehler_total_consumption_EnergyCostMonth €<br>
Kosten Jahr: haus.stromzaehler_total_consumption_EnergyCostYear €<br>
<br>
<br>
Reserve:haus.stromzaehler_total_consumption_FinanceReserve €


List Stromzähler:
Internals:
   DEF        192.168.33.41:23 SML
   DeviceName 192.168.33.41:23
   FD         24
   FUUID      6278c02e-f33f-5e7b-6d7b-a6aee6bdcd5db938
   MeterType  SML
   NAME       haus.stromzaehler
   NR         163
   PARTIAL   
   STATE      22222 kWh / 1344 W
   TYPE       OBIS
   eventCount 73
   READINGS:
     2022-06-07 11:02:43   ManufID         ISK
     2022-06-07 11:02:43   PublicKey       95A1-36DF-6B55-2EF2-0539-613F-2471-6871-1A12-74AD-25E0-920E-D5AC-67D3-4EE2-0234-4E7B-2689-5A26-0AF5-819E-2B87-B4C3-2031-01
     2022-06-07 11:02:43   Serial          09-01-49-53-4B-00-03-F6-62-A0
     2022-06-07 11:02:43   power           1344
     2022-06-07 11:02:43   power_L1        189
     2022-06-07 11:02:43   power_L2        970
     2022-06-07 11:02:43   power_L3        184
     2022-06-07 09:50:45   state           opened
     2022-06-07 11:02:43   total_consumption 22221661
     2022-06-07 11:02:43   total_consumption_Ch1 22221661
     2022-06-07 11:02:43   total_consumption_Ch2 0
   helper:
     BUFFER     
     DIRECTIONSUM >
     EoM        1
     LastPacketTime 1654592563.66693
     NETDEV     1
     SPEED      5
     TRIGGERTIME 1654588241.91297
     Channels:
     DEVICES:
       
       60
       
     RULECACHE:
       1-0:0.0.9*255 Serial
       1-0:1.8.0*255 Counter
       1-0:1.8.1*255 Counter
       1-0:1.8.2*255 Counter
       1-0:16.7.0*255 Channels
       1-0:36.7.0*255 Channels
       1-0:56.7.0*255 Channels
       1-0:76.7.0*255 Channels
       129-129:199.130.3*255 ManufID
       129-129:199.130.5*255 PublicKey
     directions:
Attributes:
   event-on-change-reading .*
   extChannels auto
   group      Strom
   interval   60
   pollingMode on
   room       Keller
   stateFormat {sprintf("%.0f kWh", (ReadingsVal($name,"total_consumption",0) / 1000) ) . " / ". sprintf("%.0f W", ReadingsVal($name,"power",0))}


Vielleicht kann mir ja einer Helfen.
Danke schon mal im vorraus

Wasserwerk33


Sailor

#731
Zitat von: Wasserwerk33 am 09 Juni 2022, 15:48:49
Hat keiner eine Idee?

Kannst du mal deine Attribut ueberpruefen:

ZitatElectricityPricePerKWh 0.0003825
Das sieht komisch aus!

Bezueglich deines Zählers... gibt der wirklich kwh aus oder Wh?
Zitattotal_consumption 22221661

Wenn der Wh ausgibt musst du noch dein Attribut
ElectricityKwhPerCounts 0.001
ändern.

Gruß
    Sailor
******************************
Man wird immer besser...

Wasserwerk33

Hi

So Fehler wohl gefunden. Habe meine Counter off set gesetzt auf 21913 danach springt er so komisch um. Hatte nochmal einen neuen angelegt. Wo ich es erstmal nicht verändert hatte, da passt es mit 1 im KWh Bereich. Sobald ich in meinem neuen den Counter gesetzt habe spinnt er. Aber ich bin ja erst bei 21913 mit der Rechnung angefangen. Danach passt der Zähler auch nicht mehr.

Wasserwerk33

Nochmal gerade das help gelesen. Offset ist ja falsch für den Start meiner Berechnung. Wo muss ich den die 21913 eintragen, damit mein Startpunkt ab dort gelesen wird.


Gisbert

Hallo Sailor,

gelegentlich startet mein Fhem von selbst neu. Warum, wieso und ob ich es in der Vergangenheit vielleicht selbst eingestellt habe, weiß ich leider nicht.

Der Neustart scheint wohl zu passieren, wenn irgendeine Art von Überlastung eintritt. Prinzipiell ist das ja gut, jedenfalls besser als wenn Fhem komplett lahm gelegt ist. Das ganze geschieht 2-3mal im Monat.

Der ElectricityCalculator startet dann wieder bei null, was dann den Tagesverbrauch verfälscht. Gibt es ein Gegenmittel dazu?

Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY