Neues Modul: GasCalculator

Begonnen von Sailor, 21 Januar 2016, 12:48:11

Vorheriges Thema - Nächstes Thema

no_Legend

Zitat von: fruit am 22 Februar 2016, 08:55:38
The panStamp counter I have resets on battery change but I use a dummy and notify to keep the counter in step
define Gas dummy

define G_Count_notify notify SWAP_03:G_Count:.* {\
my $count = Value( "SWAP_03" );;\
my $val = ( 1000 * ReadingsVal( "Gas", "state", "" ) + ( $count > 0?( $count * 5 ):0 ) ) / 1000;;\
fhem "set Gas $val";;\
}


Hi Guys,

one question why did you use a dummy and not the monotonic userreading?

Cheers Robert
IntelNUC mit Ubuntu mit FHEM immer aktuell,2x HMLAN, CUL443, CUL868 -homekit/siri -tablet ui -homebridge
Device, diverse:
HM-SEC-KEY,HM-LC-BL1-FM,HM-SEC-SD,HM-Sen-DB-PCB,HM-Sec-RHS,HM-Sec-SC-2,HM-WDS10-TH-O,Harmony,Netamo, 433MHz Steckdosen uvm.

Sailor

Hi all

Zitat von: no_Legend am 22 Februar 2016, 10:13:35
one question why did you use a dummy and not the monotonic userreading?

General question: Do you guys like to have an Feature to re-calculate the Offset based on the last known value as soon present calculation become negative (Couner reset)?

Best regards
    Sailor
******************************
Man wird immer besser...

fruit

Zitat von: no_Legend am 22 Februar 2016, 10:13:35one question why did you use a dummy and not the monotonic userreading?
Very good question... it had not occurred to me :/

There are so many ways of acheiving a desired result in fhem that is sometimes much too easy to overlook the obvious!
Feel free to follow up in German if you prefer

fruit

Zitat von: Sailor am 22 Februar 2016, 10:24:14Do you guys like to have an Feature to re-calculate the Offset based on the last known value as soon present calculation become negative (Couner reset)?
Not really needed here but probably a useful addition for many others who do not have an existing setup
Feel free to follow up in German if you prefer

no_Legend

@Sailer

Werden eingentlich auch Readings erzeugt, welche den Monatsverbrauch anzeigen.

Zur Übersichtlichkeit wurde ich es bevorzugen, wenn für jeden Monat ein Reading da wäre.
Oder gibt es eine andere möglichkeit es für jeden Monat zu speichern?

Ich sehe vll mal wieder den Wald vor lauter Bäumen nicht.

Gruß Robert
IntelNUC mit Ubuntu mit FHEM immer aktuell,2x HMLAN, CUL443, CUL868 -homekit/siri -tablet ui -homebridge
Device, diverse:
HM-SEC-KEY,HM-LC-BL1-FM,HM-SEC-SD,HM-Sen-DB-PCB,HM-Sec-RHS,HM-Sec-SC-2,HM-WDS10-TH-O,Harmony,Netamo, 433MHz Steckdosen uvm.

Sailor

Hallo Robert

Zitat von: no_Legend am 22 Februar 2016, 13:00:02
Werden eingentlich auch Readings erzeugt, welche den Monatsverbrauch anzeigen.

Mienst du diese Readings:


<DestinationDevice>_<SourceCounterReading>_EnergyCostMonth

Energy costs in the chosen currency since the beginning of the current month.

<DestinationDevice>_<SourceCounterReading>_EnergyMonth

Energy consumption in kWh since the beginning of the current month (midnight of the first).

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

octek0815

Hallo Sailor,

vielen Dank erstmal für das Tolle Modul!

Drei Fragen habe ich aber:

1. Ich benötige die Auswertung der entstanden Kosten nicht. Ist es möglich vielleicht per Attribut die Kostenberechnung abzuschalten damit folgende Readings nicht erzeugt werden?

..._EnergyCostMeter
..._EnergyCostMonth
..._EnergyCostYear
..._FinanceReserve

Im Moment behelfe ich mich in dem ich bei den Attributen BasicPricePerAnnum, GasPricePerKWh und MonthlyPayment eine Null setze dann bleiben die Readings auf Null.


2. Ich habe via UserReadings drei weitere Werte gebaut:

..._VolDaySum  >> Volumenverbrauch aktueller Tag
..._VolDaySum  >> Volumenverbrauch aktueller Monat
..._VolDaySum  >> Volumenverbrauch aktuelles Jahr

Ist es Möglich das vielleicht direkt ins Modul einzubauen?

3. Wenn Ja bei Frage Zwei, wäre es nicht schlecht wenn ich auch die Vortags, Vormonats und Vorjahres Werte für Volumen hätte.

z.B.:

..._VolPrevDaySum
..._VolPrevMonthSum
..._VolPrevYearSum

Viele Grüße
Olli






Crawler

Hätte auch mal eine Frage
reagiert das Modul auch auf Readings wie Flow Value Volume um es auch bei Wasserzählern nutzen zu können?
FHEM auf Raspi + HMLan + 14 Aktoren + OBIS(Strom) über GPIO

Hauswart

Zitat von: no_Legend am 22 Februar 2016, 07:59:01
Es gibt dafür Drei Möglichkeiten:

1. Du hängste einen Hourcounter dazwischen. (Habe ich selbst im einsatz)
Der Hourcounter zählt die Impulse.
Welchen Counter Wert das Arduino in Device hat interessiert HourCounter nicht.
Der GasCalculator nutzt dann den Counter vom HourCounter
Es soll noch erwähnt werden, dass der GasCalculator wie folgt dann HourCounter:
Bsp: GasVerbrauch:countsOverall:.*
Hallo Robert,

ich habe es bei mir genauso definiert:
define myGasCalculator GasCalculator GasVerbrauch:countsOverall:.*

Jedoch übernimmt er die Werte vom HourCounter nicht?
1. Installation:
KNX, Tasmota (KNX), Sonos, Unifi

2. Installation:
HM-CFG-USB, Unifi (, SIGNALduino 868, MySensors, SIGNALduino 433)

no_Legend

Zitat von: Hauswart am 23 Februar 2016, 08:15:20
Hallo Robert,

ich habe es bei mir genauso definiert:
define myGasCalculator GasCalculator GasVerbrauch:countsOverall:.*

Jedoch übernimmt er die Werte vom HourCounter nicht?

Hi,

wie heißt denn dein HourCounter?
Und wie hast du den HourCounter definiert? Zählt er?

Gruß Robert
IntelNUC mit Ubuntu mit FHEM immer aktuell,2x HMLAN, CUL443, CUL868 -homekit/siri -tablet ui -homebridge
Device, diverse:
HM-SEC-KEY,HM-LC-BL1-FM,HM-SEC-SD,HM-Sen-DB-PCB,HM-Sec-RHS,HM-Sec-SC-2,HM-WDS10-TH-O,Harmony,Netamo, 433MHz Steckdosen uvm.

Hauswart

Zitat von: no_Legend am 23 Februar 2016, 08:21:00
Und wie hast du den HourCounter definiert? Zählt er?
Ja, er zählt, soweit auch normal.
define GasVerbrauch HourCounter MYSENSOR_2:tripped3:.on MYSENSOR_2:tripped3:.off
1. Installation:
KNX, Tasmota (KNX), Sonos, Unifi

2. Installation:
HM-CFG-USB, Unifi (, SIGNALduino 868, MySensors, SIGNALduino 433)

Sidey



Zitat von: Sailor am 22 Februar 2016, 10:24:14
General question: Do you guys like to have an Feature to re-calculate the Offset based on the last known value as soon present calculation become negative (Couner reset)?

Hi Sailor,

yes. This would be a goot extension.

If counter value < last counter value then update offset to current meter value.
May the new offset isn't enough, but that is all we can do in cause of an outage or reset of the sensor.

Sidey
Signalduino, Homematic, Raspberry Pi, Mysensors, MQTT, Alexa, Docker, AlexaFhem

Maintainer von: SIGNALduino, fhem-docker, alexa-fhem-docker, fhempy-docker

no_Legend

Zitat von: Hauswart am 23 Februar 2016, 08:32:37
Ja, er zählt, soweit auch normal.
define GasVerbrauch HourCounter MYSENSOR_2:tripped3:.on MYSENSOR_2:tripped3:.off

Kannst du mal vom GasCalculator die Readings und attribute posten?

Gruß Robert
IntelNUC mit Ubuntu mit FHEM immer aktuell,2x HMLAN, CUL443, CUL868 -homekit/siri -tablet ui -homebridge
Device, diverse:
HM-SEC-KEY,HM-LC-BL1-FM,HM-SEC-SD,HM-Sen-DB-PCB,HM-Sec-RHS,HM-Sec-SC-2,HM-WDS10-TH-O,Harmony,Netamo, 433MHz Steckdosen uvm.

Hauswart

Zitat von: no_Legend am 23 Februar 2016, 09:15:39
Kannst du mal vom GasCalculator die Readings und attribute posten?
Ist denk nicht spezielles dabei. :)
Zitat
Readings
countsOverall   516   2016-02-23 09:15:38
countsPerDay   356   2016-02-23 09:15:38
pauseTimeEdge   1   2016-02-23 09:15:38
pauseTimeIncrement   0   2016-02-23 09:15:38
pauseTimeOverall   5061   2016-02-23 09:15:38
pauseTimePerDay   2558   2016-02-23 09:15:38
pulseTimeEdge   15   2016-02-23 09:15:38
pulseTimeIncrement   15   2016-02-23 09:15:38
pulseTimeOverall   47054   2016-02-23 09:15:38
pulseTimePerDay   30782   2016-02-23 09:15:38
state   356   2016-02-23 09:15:38
tickChanged   33   2016-02-23 09:15:38
tickDay   1   2016-02-23 00:00:00
tickHour   14   2016-02-23 09:00:00
tickMonth   0   2016-02-22 19:02:22
tickUpdated   53   2016-02-23 09:15:38
tickWeek   0   2016-02-22 19:02:22
tickYear   0   2016-02-22 19:02:22
value   0   2016-02-23 09:15:38

Attributes
room   Central Heating
1. Installation:
KNX, Tasmota (KNX), Sonos, Unifi

2. Installation:
HM-CFG-USB, Unifi (, SIGNALduino 868, MySensors, SIGNALduino 433)

no_Legend

Zitat von: Hauswart am 23 Februar 2016, 09:19:51
Ist denk nicht spezielles dabei. :)

Ist wohl der HourCounter, was du gerade gepostet hast.
Und noch bitte vom GasCalculator readings und attr.
IntelNUC mit Ubuntu mit FHEM immer aktuell,2x HMLAN, CUL443, CUL868 -homekit/siri -tablet ui -homebridge
Device, diverse:
HM-SEC-KEY,HM-LC-BL1-FM,HM-SEC-SD,HM-Sen-DB-PCB,HM-Sec-RHS,HM-Sec-SC-2,HM-WDS10-TH-O,Harmony,Netamo, 433MHz Steckdosen uvm.