The GasCalculator Module calculates the gas consumption and costs of one ore more gas counters. It is not a counter module itself but requires a regular expression (regex or regexp) in order to know where retrieve the counting ticks of one or more mechanical gas counter. As soon the module has been defined within the fhem.cfg, the module reacts on every event of the specified counter like myOWDEVICE:counter.* etc. The GasCalculator module provides several current, historical, statistical predictable values around with respect to one or more gas-counter and creates respective readings. To avoid waiting for max. 12 months to have realistic values, the readings <DestinationDevice>_<SourceCounterReading>_Vol1stDay , <DestinationDevice>_<SourceCounterReading>_Vol1stMonth , <DestinationDevice>_<SourceCounterReading>_Vol1stYear and <DestinationDevice>_<SourceCounterReading>_Vol1stMeter must be corrected with real values by using the setreading - command.
These real values may be found on the last gas bill. Otherwise it will take 24h for the daily, 30days for the monthly and up to 12 month for the yearly values to become realistic. |
Define |
define <name> GasCalculator <regex> |
<name> : | The name of the calculation device. Recommendation: "myGasCalculator". |
<regex> : | A valid regular expression (also known as regex or regexp) of the event where the counter can be found |
define myGasCalculator GasCalculator myGasCounter:countersA.* |
Attributes |
In addition the global attributes e.g. room can be used. |
BasicPricePerAnnum : | A valid float number for basic annual fee in the chosen currency for the gas supply to the home. The value is provided by your local gas provider is shown on your gas bill. For UK users it may known under "Standing Charge". Please make sure it is based on one year The default value is 0.00 |
Currency : | One of the pre-defined list of currency symbols [€,£,$]. The default value is € |
disable : | Disables the current module. The module will not react on any events described in the regular expression. The default value is 0 = enabled. |
GasCounterOffset : | A valid float number of the volume difference = offset (not the difference of the counter ticks!) between the value shown on the mechanic meter for the gas volume and the calculated volume of this device. The value for this offset will be calculated as follows VOffset = VMechanical - VModule The default value is 0.00 |
GasCubicPerCounts : | A valid float number of the ammount of volume per ticks. The value is given by the mechanical trigger of the mechanical gas meter. E.g. GasCubicPerCounts = 0.01 means each count is a hundredth of the volume basis unit. The default value is 0.01 |
GasNominalHeatingValue : | A valid float number for the gas heating value in [kWh/ chosen Volume]. The value is provided by your local gas provider is shown on your gas bill. The default value is 10.00 |
GaszValue : | A valid float number for the gas condition based on the local installation of the mechanical gas meter in relation of the gas providers main supply station. The value is provided by your local gas provider is shown on your gas bill. The default value is 1.00 |
GasPricePerKWh : | A valid float number for gas price in the chosen currency per kWh for the gas. The value is provided by your local gas provider is shown on your gas bill. The default value is 0.0654 |
MonthlyPayment : | A valid float number for monthly advance payments in the chosen currency towards the gas supplier. The default value is 0.00 |
MonthOfAnnualReading : | A valid integer number for the month when the mechanical gas meter reading is performed every year. The default value is 5 (May) |
ReadingDestination : | One of the pre-defined list for the destination of the calculated readings: [CalculatorDevice,CounterDevice]. The CalculatorDevice is the device which has been created with this module. The CounterDevice is the Device which is reading the mechanical gas-meter. The default value is CalculatorDevice - Therefore the readings will be written into this device. |
Volume : | One of the pre-defined list of volume symbols [m³,ft³]. The default value is m³ |
<DestinationDevice>_<SourceCounterReading>_EnergyCostDayLast : | Energy costs of the last day. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMeter : | Energy costs in the chosen currency since the beginning of the month of where the last gas-meter reading has been performed by the gas supplier. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMeterLast : | Energy costs in the chosen currency of the last gas-meter period. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMonth : | Energy costs in the chosen currency since the beginning of the current month. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMonthLast : | Energy costs in the chosen currency of the last month. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostYear : | Energy costs in the chosen currency since the beginning of the current year. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostYearLast : | Energy costs of the last calendar year. |
<DestinationDevice>_<SourceCounterReading>_EnergyDay : | Energy consumption in kWh since the beginning of the current day (midnight). |
<DestinationDevice>_<SourceCounterReading>_EnergyDayLast : | Total Energy consumption in kWh of the last day. |
<DestinationDevice>_<SourceCounterReading>_EnergyMeter : | Energy consumption in kWh since the beginning of the month of where the last gas-meter reading has been performed by the gas supplier. |
<DestinationDevice>_<SourceCounterReading>_EnergyMeterLast : | Total Energy consumption in kWh of the last gas-meter reading period. |
<DestinationDevice>_<SourceCounterReading>_EnergyMonth : | Energy consumption in kWh since the beginning of the current month (midnight of the first). |
<DestinationDevice>_<SourceCounterReading>_EnergyMonthLast : | Total Energy consumption in kWh of the last month. |
<DestinationDevice>_<SourceCounterReading>_EnergyYear : | Energy consumption in kWh since the beginning of the current year (midnight of the first). |
<DestinationDevice>_<SourceCounterReading>_EnergyYearLast : | Total Energy consumption in kWh of the last calendar year. |
<DestinationDevice>_<SourceCounterReading>_FinanceReserve : | Financial Reserver based on the advanced payments done on the first of every month towards the gas supplier. With negative values, an additional payment is to be excpected. |
<DestinationDevice>_<SourceCounterReading>_MonthMeterReading : | Number of month since last meter reading. The month when the reading occured is the first month = 1. |
<DestinationDevice>_<SourceCounterReading>_Meter : | Current indicated total volume consumption on mechanical gas meter. Correct Offset-attribute if not identical. |
<DestinationDevice>_<SourceCounterReading>_PowerCurrent : | Current heating Power. (Average between current and previous measurement.) |
<DestinationDevice>_<SourceCounterReading>_PowerDayAver : | Average heating Power since midnight. |
<DestinationDevice>_<SourceCounterReading>_PowerDayMax : | Maximum power peak since midnight. |
<DestinationDevice>_<SourceCounterReading>_PowerDayMin : | Minimum power peak since midnight. |
<DestinationDevice>_<SourceCounterReading>_Vol1stDay : | First volume reading of the current day. |
<DestinationDevice>_<SourceCounterReading>_VolLastDay : | Volume reading of the previous day. |
<DestinationDevice>_<SourceCounterReading>_Vol1stMonth : | First volume reading of the current month. |
<DestinationDevice>_<SourceCounterReading>_VolLastMonth : | Volume reading of the previous month. |
<DestinationDevice>_<SourceCounterReading>_Vol1stYear : | First volume reading of the current year. |
<DestinationDevice>_<SourceCounterReading>_VolLastYear : | Volume reading of the previous year. |
<DestinationDevice>_<SourceCounterReading>_Vol1stMeter : | First volume reading of the first day of the month of the current meter reading period. |
<DestinationDevice>_<SourceCounterReading>_VolLastMeter : | Volume reading of the first day of the month of the last meter reading period. |
Das GasCalculator Modul berechnet den Gas - Verbrauch und den verbundenen Kosten von einem oder mehreren Gas-Zählern. Es ist kein eigenes Zählermodul sondern benötigt eine Regular Expression (regex or regexp) um das Reading mit den Zähl-Impulse von einem oder mehreren Gaszählern zu finden. Sobald das Modul in der fhem.cfg definiert wurde, reagiert das Modul auf jedes durch das regex definierte event wie beispielsweise ein myOWDEVICE:counter.* etc. Das GasCalculator Modul berechnet augenblickliche, historische statistische und vorhersehbare Werte von einem oder mehreren Gas-Zählern und erstellt die entsprechenden Readings. Um zu verhindern, dass man bis zu 12 Monate warten muss, bis alle Werte der Realität entsprechen, müssen die Readings <DestinationDevice>_<SourceCounterReading>_Vol1stDay , <DestinationDevice>_<SourceCounterReading>_Vol1stMonth , <DestinationDevice>_<SourceCounterReading>_Vol1stYear und <DestinationDevice>_<SourceCounterReading>_Vol1stMeter entsprechend mit dem setreading - Befehl korrigiert werden.
Diese Werte findet man unter Umständen auf der letzten Gas-Rechnung. Andernfalls dauert es bis zu 24h für die täglichen, 30 Tage für die monatlichen und bis zu 12 Monate für die jährlichen Werte bis diese der Realität entsprechen. |
Define |
define <name> GasCalculator <regex> |
<name> : | Der Name dieses Berechnungs-Device. Empfehlung: "myGasCalculator". |
<regex> : | Eine gültige Regular Expression (regex or regexp) von dem Event wo der Zählerstand gefunden werden kann |
define myGasCalculator GasCalculator myGasCounter:countersA.* |
Attributes |
Zusätzlich können die globalen Attribute wie room verwendet werden. |
BasicPricePerAnnum : | Eine gültige float Zahl für die jährliche Grundgebühr in der gewählten Währung für die Gas-Versorgung zum End-Verbraucher. Dieser Wert stammt vom Gas-Zulieferer und steht auf der Gas-Rechnung. Der Standard Wert ist 0.00 |
Currency : | Eines der vordefinerten Währungssymbole: [€,£,$]. Der Standard Wert ist € |
disable : | Deaktiviert das devive. Das Modul wird nicht mehr auf die Events reagieren die durch die Regular Expression definiert wurde. Der Standard Wert ist 0 = ativiert. |
GasCounterOffset : | Eine gültige float-Zahl für den Volumen Unterschied = Offset (Nicht der Unterschied zwischen Zählimpulsen) zwischen dem am mechanischen Gaszähler und dem angezeigten Wert im Reading dieses Device. Der Offset-Wert wird wie folgt ermittelt: VOffset = VMechanisch - VModule Der Standard-Wert ist 0.00 |
GasCubicPerCounts : | Eine gültige float-Zahl für die Menge an Zählimpulsen pro gewählter Volumen-Grundeinheit. Der Wert ist durch das mechanische Zählwerk des Gaszählers vorgegeben. GasCubicPerCounts = 0.01 bedeutet, dass jeder Zählimpuls ein hunderstel der gewählten Volumengrundeinheit. Der Standard-Wert ist 0.01 |
GasNominalHeatingValue : | Eine gültige float-Zahl für den Heizwert des gelieferten Gases in [kWh/ gewählter Volumeneinheit]. Dieser Wert stammt vom Gas-Zulieferer und steht auf der Gas-Rechnung. Der Standard-Wert ist 10.00 |
GaszValue : | Eine gültige float-Zahl für die Zustandszahl des Gases basierend auf der Relation based on the local installation of the mechganical gas meter in relation of the gas providers main supply station. Dieser Wert stammt vom Gas-Zulieferer und steht auf der Gas-Rechnung. Der Standard-Wert ist 1.00 |
GasPricePerKWh : | Eine gültige float-Zahl für den Gas Preis in der gewählten Währung pro kWh. Dieser Wert stammt vom Gas-Zulieferer und steht auf der Gas-Rechnung. Der Standard-Wert ist 0.0654 |
MonthlyPayment : | Eine gültige float-Zahl für die monatlichen Abschlagszahlungen in der gewählten Währung an den Gas-Lieferanten. Der Standard-Wert ist 0.00 |
MonthOfAnnualReading : | Eine gültige Ganz-Zahl für den Monat wenn der mechanische Gas-Zähler jedes Jahr durch den Gas-Lieferanten abgelesen wird. Der Standard-Wert ist 5 (Mai) |
ReadingDestination : | Eines der vordefinerten Device als Ziel der errechneten Readings: [CalculatorDevice,CounterDevice]. Das CalculatorDevice ist das mit diesem Modul erstellte Device. Das CounterDevice ist das Device von welchem der mechanische Zähler ausgelesen wird. Der Standard-Wert ist CalculatorDevice. |
Volume : | Eine der vordefinierten Volumensymbole für die Volumeneinheit [m³,ft³]. Der Standard-Wert ist m³ |
<DestinationDevice>_<SourceCounterReading>_EnergyCostLastDay : | Energiekosten in der gewählten Währung des letzten Tages. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMeter : | Energiekosten in der gewählten Währung seit Anfang des Monats wo der Gas-Versorger den Zähler abliest. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMeterLast : | Energiekosten in der gewählten Währung der letzten Zählperiode des Gas-Versorgers. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMonth : | Energiekosten in der gewählten Währung seit Anfang des Monats. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostMonthLast : | Energiekosten in der gewählten Währung des letzten Monats. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostYear : | Energiekosten in der gewählten Währung seit Anfang des Jahres. |
<DestinationDevice>_<SourceCounterReading>_EnergyCostYearLast : | Energiekosten in der gewählten Währung des letzten Jahres. |
<DestinationDevice>_<SourceCounterReading>_EnergyDay : | Energieverbrauch in kWh seit Mitternacht. |
<DestinationDevice>_<SourceCounterReading>_EnergyDayLast : | Gesamter Energieverbrauch des letzten Tages (Gestern). |
<DestinationDevice>_<SourceCounterReading>_EnergyMeter : | Energieverbrauch in kWh seit Anfang seit Anfang des Monats wo der Gas-Versorger den Zähler abliest. |
<DestinationDevice>_<SourceCounterReading>_EnergyMeterLast : | Gesamter Energieverbrauch der letzten Zählerperiode des Gas-Versorgers. |
<DestinationDevice>_<SourceCounterReading>_EnergyMonth : | Energieverbrauch in kWh seit Anfang seit Anfang des Monats (Mitternacht des 01.). |
<DestinationDevice>_<SourceCounterReading>_EnergyMonthLast : | Gesamter Energieverbrauch im letzten Monat. |
<DestinationDevice>_<SourceCounterReading>_EnergyYear : | Energieverbrauch in kWh seit Anfang seit Anfang des Jahres (Mitternacht des 01. Januar). |
<DestinationDevice>_<SourceCounterReading>_EnergyYearLast : | Gesamter Energieverbrauch in kWh des letzten Kalender-Jahres. |
<DestinationDevice>_<SourceCounterReading>_FinanceReserve : | Finanzielle Reserve basierend auf den Abschlagszahlungen die jeden Monat an den Gas-Versorger gezahlt werden. Bei negativen Werten ist von einer Nachzahlung auszugehen. |
<DestinationDevice>_<SourceCounterReading>_MonthMeterReading : | Anzahl der Monate seit der letzten Zählerablesung. Der Monat der Zählerablesung ist der erste Monat = 1. |
<DestinationDevice>_<SourceCounterReading>_Meter : | Zählerstand am Gaszähler. Bei Differenzen muss das Offset-Attribut korrigiert werden. |
<DestinationDevice>_<SourceCounterReading>_PowerCurrent : | Aktuelle Heizleistung. (Mittelwert zwischen aktueller und letzter Messung) |
<DestinationDevice>_<SourceCounterReading>_PowerDayAver : | Mittlere Heitzleistung seit Mitternacht. |
<DestinationDevice>_<SourceCounterReading>_PowerDayMax : | Maximale Leistungsaufnahme seit Mitternacht. |
<DestinationDevice>_<SourceCounterReading>_PowerDayMin : | Minimale Leistungsaufnahme seit Mitternacht. |
<DestinationDevice>_<SourceCounterReading>_Vol1stDay : | Erster Volumenmesswert des Tages (Mitternacht). |
<DestinationDevice>_<SourceCounterReading>_VolLastDay : | Verbrauchtes Volumen des vorherigen Tages. |
<DestinationDevice>_<SourceCounterReading>_Vol1stMonth : | Erster Volumenmesswert des Monats (Mitternacht des 01.). |
<DestinationDevice>_<SourceCounterReading>_VolLastMonth : | Verbrauchtes Volumen des vorherigen Monats. |
<DestinationDevice>_<SourceCounterReading>_Vol1stYear : | Erster Volumenmesswert des Jahres (Mitternacht des 01. Januar). |
<DestinationDevice>_<SourceCounterReading>_VolLastYear : | Verbrauchtes Volumen des vorherigen Jahres. |
<DestinationDevice>_<SourceCounterReading>_Vol1stMeter : | Erster Volumenmesswert des Zeitraums seit Anfang des Monats wo der Gas-Versorger den Zähler abliest. |
<DestinationDevice>_<SourceCounterReading>_VolLastMeter : | Verbrauchtes Volumen des vorherigen Abrechnungszeitraums. |