Modul HourCounter - Betriebsstundenzähler mit einem Fensterkontakt

Begonnen von John, 08 April 2013, 22:11:55

Vorheriges Thema - Nächstes Thema

Jewe

Hei,

diese Funktion habe ich immer noch nicht umgesetzt, da ich nicht weis , was ich Ändern muss. Die Funktion wäre für mich aber schon sehr gut, da ich dann den Pelltsverbrauch pro Saison erfassen könnte, ohne zu rechnen :-)

Ich möchte das Jahr auf eine Saison einstellen z.b. vom 01.09. Bis 31.08 und nicht vom 01.01.-31.12.

Kann mir jemand helfen ?

Jens

Zitat von: John am 28 Februar 2016, 11:03:57
@jensweber

Folgender Vorschlag:

Änderungen in 99_UtilsHourCounter

* bisherigen Aufruf von appHC_OnYear auskommentieren (Zeile 277: HourCounter_cmdQueueAdd($hash,"appHC_OnYear q($name),q($part0),q($part1)");)
* appHC_OnMonth so ändern, daß du hier deinen individuellen Betriebsjahreswechsel erkennst und nun hier die  zuvor auskommentierte Zeile einsetzen.

John

Nighthawk

Hallo Zusammen,

ich habe alle 36 Seiten überflogen, aber leider keine Antwort für mein Problem gefunden.
Ich nutze den HourCounter für die Erfassung meines Wasserverbrauchs in Verbindung mit einer Wasseruhr mit Impulsgeber, der über ein GPIO Port des Raspberrys eingelesen wird.
Leider passiert es immer mal wieder dass die Zähler nach einem Reboot des Raspi bzw. Absturz von FHEM auf einen Wert zurückfallen die deutlich geringer sind als die letzten Werte vor dem Reboot.

Als Beispiel:
2017-08-30 21:57:17   CountPerDay  249
2017-08-30 21:59:12   CountPerDay  25

pappn

Das liegt daran, das die Werte nicht regelmässig gespeichert werden. Fährt FHEM z.b. für einen Showdown-restart runter, wird in fhem.save gespeichert und alles ist ok. Bei einem Stromausfall oder etwas anderem halt eben nicht, mit besagtem Effekt. Ich habe daher folgende Zeile in fhem.cfg: define fhem_save at +*00:05:00 {WriteStatefile()}

Gesendet von meinem SM-T580 mit Tapatalk

"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs

pappn

Um für den hourcounter ganz sicher zu gehen, dass mir nichts durchrutscht, habe ich hier noch ein WriteStatefile() am Ende der sub "sub appHCNotify($$$)" in der "99_UtilsHourCounter.pm" eingefügt. Damit werden nach jedem Zählereignis die Werte gesichert. Seid dem keine Probleme mehr mit alten Werten nach Ausfällen.

Gesendet von meinem SM-T580 mit Tapatalk

"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs

Nighthawk


Jewe

Hallo,
2 HourCounter funktionieren bei mir seit dem 26.05.2017 nicht mehr. Diese sind für meinen Pelletsverbrauch der Heizung, die ich über den Sommer nicht benötige.
In den Log´s ist das entsprechend zu sehen:

2017-05-25_00:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_00:00:00 CN.PelletsCounter appCountsPerDay: 4
2017-05-25_00:00:00 CN.PelletsCounter appOpHoursPerDay: 0.0158333333333333
2017-05-25_00:00:00 CN.PelletsCounter appTanklevel: -490.343542
2017-05-25_00:00:00 CN.PelletsCounter appUtilization: 0.0688405797101449
2017-05-25_01:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_02:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_03:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_04:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_05:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_06:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_07:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_08:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_09:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_10:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_11:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_12:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_13:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_14:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_15:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_16:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_17:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_18:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_19:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_20:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_21:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_22:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_23:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_00:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_00:00:01 CN.PelletsCounter appCountsPerDay: 0
2017-05-26_00:00:01 CN.PelletsCounter appOpHoursPerDay: 0
2017-05-26_00:00:01 CN.PelletsCounter appTanklevel: -490.343542
2017-05-26_00:00:01 CN.PelletsCounter appUtilization: 0
2017-05-26_01:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_02:00:03 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_03:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_04:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_05:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_06:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_07:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_08:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_09:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_10:00:00 CN.PelletsCounter appCountsPerHour: 0


2017-05-25_00:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_00:00:01 CN.PelletsAnforderung appCountsPerDay: 0
2017-05-25_00:00:01 CN.PelletsAnforderung appOpHoursPerDay: 22.8719444444444
2017-05-25_00:00:01 CN.PelletsAnforderung appUtilization: 95.0942028985507
2017-05-25_01:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_02:00:00 CN.PelletsAnforderung appCountsPerHour: 1
2017-05-25_03:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_04:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_05:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_06:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_07:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_08:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_09:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_10:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_11:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_12:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_13:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_14:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_15:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_16:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_17:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_18:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_19:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_20:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_21:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_22:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_23:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_00:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_00:00:00 CN.PelletsAnforderung appCountsPerDay: 1
2017-05-26_00:00:00 CN.PelletsAnforderung appOpHoursPerDay: 23.9997222222222
2017-05-26_00:00:00 CN.PelletsAnforderung appUtilization: 99.9987922705314
2017-05-26_01:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_02:00:03 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_03:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_04:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_05:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_06:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_07:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_08:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_09:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_10:00:00 CN.PelletsAnforderung appCountsPerHour: 0


Ein anderer HourCounter, den ich für die Gartenbewässerung verwende funktioniert aber tadellos. Diesen habe ich 2 oder 3 Tage zuvor neu definiert. Seit dem läuft dieser aber zuverlässig.
Ich habe bewusst nichts an den 2 alten Countern gemacht.

Hier noch ein Auszug aus dem Logfile nach dem Neustart :
2017.10.04 22:26:04 0: Server shutdown
2017.10.04 22:26:12 3: [UtilsHourCounter] Init Done with Version 1.0.1.0 - 10.12.2014 (john)
2017.10.04 22:26:12 1: PERL WARNING: Subroutine UtilsHourCounter_Initialize redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 47.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnYear redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 57.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnMonth redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 82.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnWeek redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 106.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnDay redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 130.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnHour redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 170.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnCount redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 187.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnUpdate redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 224.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHCNotify redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 255.
2017.10.04 22:26:12 1: Including fhem.cfg
2017.10.04 22:26:12 1: PERL WARNING: Subroutine UtilsHourCounter_Initialize redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 47, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnYear redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 57, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnMonth redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 82, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnWeek redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 106, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnDay redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 130, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnHour redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 170, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnCount redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 187, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnUpdate redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 224, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHCNotify redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 255, <$fh> line 9.

2017.10.04 22:26:26 3: HourCounter HourCounter Initialize.220 Init Done with Version 1.0.1.2 - 24.12.2014
2017.10.04 22:26:26 0: HourCounter CN.PelletsCounter Define.228 parameters: CN.PelletsCounter HourCounter Pelletschnecke:on Pelletschnecke:off
2017.10.04 22:26:26 0: HourCounter CN.PelletsAnforderung Define.228 parameters: CN.PelletsAnforderung HourCounter Pelletofen_Anforderung:off Pelletofen_Anforderung:on

2017.10.04 22:26:30 0: HourCounter CN.GartenwasserDurchfluss Define.228 parameters: CN.GartenwasserDurchfluss HourCounter A2_I12_20_Gartenwasser_Durchfluss:on A2_I12_20_Gartenwasser_Durchfluss:off

2017.10.04 22:26:45 1: Including ./log/fhem.save

2017.10.04 22:26:52 0: Featurelevel: 5.8

2017.10.04 22:26:52 0: HourCounter CN.PelletsCounter Run.598 first run done countsOverall:8
2017.10.04 22:26:52 0: HourCounter CN.PelletsAnforderung Run.598 first run done countsOverall:14
2017.10.04 22:26:52 0: HourCounter CN.GartenwasserDurchfluss Run.598 first run done countsOverall:14135


Die Warnmeldungen verstehe ich allerdings nicht ?
Ich stehe ziemlich auf dem Schlauch.

Jens

pappn

Zitat von: jensweber am 04 Oktober 2017, 22:35:50
Hallo,
2 HourCounter funktionieren bei mir seit dem 26.05.2017 nicht mehr. Diese sind für meinen Pelletsverbrauch der Heizung, die ich über den Sommer nicht benötige.
In den Log´s ist das entsprechend zu sehen:

2017-05-25_00:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_00:00:00 CN.PelletsCounter appCountsPerDay: 4
2017-05-25_00:00:00 CN.PelletsCounter appOpHoursPerDay: 0.0158333333333333
2017-05-25_00:00:00 CN.PelletsCounter appTanklevel: -490.343542
2017-05-25_00:00:00 CN.PelletsCounter appUtilization: 0.0688405797101449
2017-05-25_01:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_02:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_03:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_04:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_05:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_06:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_07:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_08:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_09:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_10:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_11:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_12:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_13:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_14:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_15:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_16:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_17:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_18:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_19:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_20:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_21:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_22:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-25_23:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_00:00:01 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_00:00:01 CN.PelletsCounter appCountsPerDay: 0
2017-05-26_00:00:01 CN.PelletsCounter appOpHoursPerDay: 0
2017-05-26_00:00:01 CN.PelletsCounter appTanklevel: -490.343542
2017-05-26_00:00:01 CN.PelletsCounter appUtilization: 0
2017-05-26_01:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_02:00:03 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_03:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_04:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_05:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_06:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_07:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_08:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_09:00:00 CN.PelletsCounter appCountsPerHour: 0
2017-05-26_10:00:00 CN.PelletsCounter appCountsPerHour: 0


2017-05-25_00:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_00:00:01 CN.PelletsAnforderung appCountsPerDay: 0
2017-05-25_00:00:01 CN.PelletsAnforderung appOpHoursPerDay: 22.8719444444444
2017-05-25_00:00:01 CN.PelletsAnforderung appUtilization: 95.0942028985507
2017-05-25_01:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_02:00:00 CN.PelletsAnforderung appCountsPerHour: 1
2017-05-25_03:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_04:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_05:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_06:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_07:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_08:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_09:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_10:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_11:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_12:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_13:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_14:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_15:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_16:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_17:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_18:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_19:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_20:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_21:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_22:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-25_23:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_00:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_00:00:00 CN.PelletsAnforderung appCountsPerDay: 1
2017-05-26_00:00:00 CN.PelletsAnforderung appOpHoursPerDay: 23.9997222222222
2017-05-26_00:00:00 CN.PelletsAnforderung appUtilization: 99.9987922705314
2017-05-26_01:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_02:00:03 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_03:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_04:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_05:00:01 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_06:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_07:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_08:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_09:00:00 CN.PelletsAnforderung appCountsPerHour: 0
2017-05-26_10:00:00 CN.PelletsAnforderung appCountsPerHour: 0


Ein anderer HourCounter, den ich für die Gartenbewässerung verwende funktioniert aber tadellos. Diesen habe ich 2 oder 3 Tage zuvor neu definiert. Seit dem läuft dieser aber zuverlässig.
Ich habe bewusst nichts an den 2 alten Countern gemacht.

Hier noch ein Auszug aus dem Logfile nach dem Neustart :
2017.10.04 22:26:04 0: Server shutdown
2017.10.04 22:26:12 3: [UtilsHourCounter] Init Done with Version 1.0.1.0 - 10.12.2014 (john)
2017.10.04 22:26:12 1: PERL WARNING: Subroutine UtilsHourCounter_Initialize redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 47.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnYear redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 57.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnMonth redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 82.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnWeek redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 106.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnDay redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 130.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnHour redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 170.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnCount redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 187.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnUpdate redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 224.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHCNotify redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 255.
2017.10.04 22:26:12 1: Including fhem.cfg
2017.10.04 22:26:12 1: PERL WARNING: Subroutine UtilsHourCounter_Initialize redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 47, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnYear redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 57, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnMonth redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 82, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnWeek redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 106, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnDay redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 130, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnHour redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 170, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnCount redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 187, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHC_OnUpdate redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 224, <$fh> line 9.
2017.10.04 22:26:12 1: PERL WARNING: Subroutine appHCNotify redefined at ./FHEM/99_UtilsHourCounter_jwe.pm line 255, <$fh> line 9.

2017.10.04 22:26:26 3: HourCounter HourCounter Initialize.220 Init Done with Version 1.0.1.2 - 24.12.2014
2017.10.04 22:26:26 0: HourCounter CN.PelletsCounter Define.228 parameters: CN.PelletsCounter HourCounter Pelletschnecke:on Pelletschnecke:off
2017.10.04 22:26:26 0: HourCounter CN.PelletsAnforderung Define.228 parameters: CN.PelletsAnforderung HourCounter Pelletofen_Anforderung:off Pelletofen_Anforderung:on

2017.10.04 22:26:30 0: HourCounter CN.GartenwasserDurchfluss Define.228 parameters: CN.GartenwasserDurchfluss HourCounter A2_I12_20_Gartenwasser_Durchfluss:on A2_I12_20_Gartenwasser_Durchfluss:off

2017.10.04 22:26:45 1: Including ./log/fhem.save

2017.10.04 22:26:52 0: Featurelevel: 5.8

2017.10.04 22:26:52 0: HourCounter CN.PelletsCounter Run.598 first run done countsOverall:8
2017.10.04 22:26:52 0: HourCounter CN.PelletsAnforderung Run.598 first run done countsOverall:14
2017.10.04 22:26:52 0: HourCounter CN.GartenwasserDurchfluss Run.598 first run done countsOverall:14135


Die Warnmeldungen verstehe ich allerdings nicht ?
Ich stehe ziemlich auf dem Schlauch.

Jens
Puh, schwierig. Ich kann nur sagen,  das die Warnmeldungen mit "redefined" normal sind. Allerdings ist mir aufgefallen, dass bei deiner Definition

2017.10.04 22:26:26 0: HourCounter CN.PelletsAnforderung Define.228 parameters: CN.PelletsAnforderung HourCounter Pelletofen_Anforderung:off Pelletofen_Anforderung:on

off und on vertauscht sind. Soll das so sein? Damit zählst du dann die Zeit ohne Anforderung.

Gab es irgendwann einen Stromausfall oder FHEM Absturz?

Gesendet von meinem SM-T580 mit Tapatalk

"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs

Jewe

Zitat von: pappn am 04 Oktober 2017, 23:04:53
off und on vertauscht sind. Soll das so sein? Damit zählst du dann die Zeit ohne Anforderung.

Gab es irgendwann einen Stromausfall oder FHEM Absturz?

Ja, Danke, das sollte eigentlich anders sein. Ist mir noch nicht aufgefallen, da ich "nur" die Anzahl der Starts auswerte.

Habe es gefunden ! Habe doch was verändert. Das Attribut event-on-change-reading hatte ich auf 1 gesetzt um das Logfile kleiner zu bekommen. Und das funktiniert ja auch, es wird nichts geschrieben :-)
Muss dann mal sehen ob ich das so belasse und es auch funktioniert.

Wasserwerk33

Hallo Leute

Ich habe da mal eine Frage ist vielleicht auch eine dumme.

Ich habe den HourCounter als Betriebsstundenzähler für meine alter Uhr an der Wand, die zum aufziehen ist missbraucht. Ich vergesse nämlich sie alle 14 Tage aufzuziehen. Wie kann ich den Tageszähler Stundenzähler wieder zurücksetzen auf null? Ich habe einen Dummy angelegt der als Start/Stopp Knopf das Resetensimulieren soll. Der Dummy ist im hourcounter mit Dummy:1 und Dummy:0 hinterlegt.

defmod Uhraufziehen HourCounter Uhr_Dummy:1 Uhr_Dummy:0
attr Uhraufziehen event-on-update-reading 1
attr Uhraufziehen room Uhr
attr Uhraufziehen stateFormat tickDay Tage\
tickHour Stunden[ /code]

Danke für die Hilfe

pappn

Vielleicht hilft dir das hier weiter:

set <name> app.* <value>

Any reading with the leading term "app", can be modified.
This can be useful for user-readings.
"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs

Wasserwerk33

@pappn

Wie definiere ich das den? Stelle mich wohl dumm an.

Kannst du mir helfen?

pappn

Die app.* Readings gibt es erst wenn du UtilsHourCounter einbindest. Siehe FHEMWiki zu HourCounter oder CommandRef. Hast du dir das Wiki und die CommandRef dazu angesehen?

Nur um 14 Tage á 24 Std ablaufen zu lassen ist Hour Counter vielleicht auch nicht das Mittel der Wahl.

Warum nicht eine Kombi aus dummy, notify und at?
z.B. ganz simpel so: define Uhr_Test dummy
attr Uhr_Test room Test
attr Uhr_Test webCmd Aufgezogen

define Uhr_timer notify Uhr_Test:Aufgezogen define alarm at +336:00 set Uhr_Test Aufziehen
attr Uhr_Timer room Test

Damit kannst du beim Dummy auf Aufgezogen klicken, wenn du das erledigt hast, und 14 Tage später wechselt der Wert des Dummys auf Aufziehen. Das kann man natürlich weiter ausbauen. Zusätzliche notifiys, weitere dummys etc. Ganz nach belieben.
"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs

Wasserwerk33

@pappn

Ja gelesen habe ich aber nur das Wiki aber das mit dem utilshourcounter hatte ich so noch nicht verstanden. Hatte den hourcounter genommen weil es mir einfach schien. Aber das was du mit dummy und notify sagst ist besser

Danke

Depechem

Hallo,
Ich ich möchte  das Modul für meine Gasauswertung nutzen.
Der Zählerstand wird in dem Modul wie gewünscht hochgezählt.

Wie kann man sich jetzt Tages, Monats, Jahreswerte anzeigen lassen.
Genau genommen möchte ich mir in einer Readingsgroup folgendes anzeigen lassen:
Zitat
Gasverbrauch
Januar 2017
Februar 2017
März 2017
...u.s.w.

Die Daten werden zwar in ein Filelog geschrieben aber irgendwie habe ich keine Ahnung wie ich zu meinen Werten komme.

Ich hoffe ihr könnt mir helfen.
Gruß Thomas
RaspberryPi2 / FHEM / 3 Wand-Tablets mit Tablet UI / HM USB / verschiedene HM-Aktoren / JeeLink USB für WS1600 und mehrere LaCrosse Sensoren / HEOS ...

pappn

Zitat von: Depechem am 14 Februar 2018, 08:41:50
Hallo,
Ich ich möchte  das Modul für meine Gasauswertung nutzen.
Der Zählerstand wird in dem Modul wie gewünscht hochgezählt.

Wie kann man sich jetzt Tages, Monats, Jahreswerte anzeigen lassen.
Genau genommen möchte ich mir in einer Readingsgroup folgendes anzeigen lassen:
Die Daten werden zwar in ein Filelog geschrieben aber irgendwie habe ich keine Ahnung wie ich zu meinen Werten komme.

Ich hoffe ihr könnt mir helfen.
Gruß Thomas
Schau mal bei readingsgroup bzw. readingshistory. Das sollte dir helfen.

Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

"When all else fails, read the instructions."

CUL868, RFXTFX433 und CCU3
FS20, S300TH, UNIRoll, Homematic IP, OZW672, diverse HOMEEASY, IT kompatible und China Zeugs