Neues Modul: GasCalculator

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

Vorheriges Thema - Nächstes Thema

Sailor

Hi fruit

sorry for the late answer... The flu!  :(

Zitat von: fruit am 26 Januar 2016, 18:15:11

My actual readings and counts are
8456.056
8456.121 (13 count x .005m[sup]3[/sup])
8456.186 (18 count)
8456.226 (8 count)
8456.231 (1 count)

The module is showing from logs
[code]GasCountReadingValueDelta                : 0.000 m³
Current Reading Value                    : 8456.121
Previous Reading Value                   : 8456.121

GasCountReadingValueDelta                : -0.025 m³
Current Reading Value                    : 8456.096
Previous Reading Value                   : 8456.121

GasCountReadingValueDelta                : -0.035 m³
Current Reading Value                    : 8456.061
Previous Reading Value                   : 8456.096

GasCountReadingValueDelta                : 0.000 m³
Current Reading Value                    : 8456.061
Previous Reading Value                   : 8456.061


It looks like your are producing gas instead of consuming... :-)

It looks your counter counts down instead of up...

Could you please have a look in your actual counter module to make sure it really counts upwards...

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

Jarnsen

Eine einfache Anbindung müsste auch über MYSENSORS funktionieren. Einen watermetersketch oder doorsketch in Verbindung mit ner Reflexlichtschranke


Gesendet von iPhone mit Tapatalk
1 x RPi2,
1 x nanoCUL433, 1 x nanoCUL868, 1 x SIGNALduino433
Sonos/SonosSpeak, Homebridge, 2 x Enigma2, 10 x Nobily Rollläden, 3 x Intertechno Steckdosen
Pushover, Abfallerinnerung, MySensors, 7 x Max!

fruit

Zitat von: Sailor am 06 Februar 2016, 20:39:36sorry for the late answer... The flu!  :(
Sorry to hear that, I hope you are feeling better now
ZitatIt looks like your are producing gas instead of consuming... :-)
It looks your counter counts down instead of up...
I wish!
I should have stated those figures were from my reversed logs, it does count up not down.

I have tried the module again a few times since - and tried to see where it was going wrong but with no luck
I cannot see why the delta is sometimes negative but often positive and appears correct, perhaps tripping on a regex?
Feel free to follow up in German if you prefer

Sailor

Zitat von: fruit am 06 Februar 2016, 22:13:03
Sorry to hear that, I hope you are feeling better nowI wish!
I should have stated those figures were from my reversed logs, it does count up not down.

I have tried the module again a few times since - and tried to see where it was going wrong but with no luck
I cannot see why the delta is sometimes negative but often positive and appears correct, perhaps tripping on a regex?

Thanks, I am fine again!

I think the first step would be to evaluate the Log entries for the Counter module itself (Not the GasCalculator).

Could you make a filtered print-out from the log file?

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

fruit

I've attached a file of extracted values of today's log, see notes at the start
Feel free to follow up in German if you prefer

Sailor

Hi fruit

Zitat von: fruit am 08 Februar 2016, 16:02:11
I've attached a file of extracted values of today's log, see notes at the start

OK, thats the reason!

Your Counter is a Delta Counter!
That means he only logs the difference since the last measurement.

What you need is an absolute counter

It actually should look like that:

2016-02-08_00:15:49 SWAP_03 G_Count: 2
2016-02-08_00:45:49 SWAP_03 G_Count: 3
2016-02-08_01:00:47 SWAP_03 G_Count: 4
2016-02-08_01:30:45 SWAP_03 G_Count: 6
2016-02-08_02:00:43 SWAP_03 G_Count: 7
2016-02-08_02:15:42 SWAP_03 G_Count: 8
2016-02-08_02:45:40 SWAP_03 G_Count: 10
2016-02-08_03:15:20 SWAP_03 G_Count: 38
2016-02-08_03:29:23 SWAP_03 G_Count: 74
2016-02-08_03:43:58 SWAP_03 G_Count: 92
2016-02-08_04:13:56 SWAP_03 G_Count: 93
2016-02-08_04:28:56 SWAP_03 G_Count: 94
2016-02-08_04:58:54 SWAP_03 G_Count: 96
2016-02-08_05:13:40 SWAP_03 G_Count: 122
2016-02-08_05:27:47 SWAP_03 G_Count: 159

etc.

Could you give me a ScreenShot of your readings of your Counter module?

Thanks

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

fruit

#36
Zitat von: Sailor am 09 Februar 2016, 06:28:42Your Counter is a Delta Counter!
That means he only logs the difference since the last measurement.
Aha! I was confused by 'counting ticks' in commandref, much clearer now, thanks

ZitatWhat you need is an absolute counter
I have two of those, one in decimal, converted to meter readings from a notify
2016-02-08_14:04:54 Gas 8512.374
2016-02-08_14:19:40 Gas 8512.484
2016-02-08_14:34:22 Gas 8512.559

and another, direct from the panStamp in hex
2016-02-08_14:04:54 SWAP_03 0C.0-Pulse_counter: 0001315D
2016-02-08_14:19:40 SWAP_03 0C.0-Pulse_counter: 00013173
2016-02-08_14:34:22 SWAP_03 0C.0-Pulse_counter: 00013182


I can use the decimal version - or convert the native panStamp hex readings in a userReadings
I'll try the decimal version I think to save upsetting anything but looks as though I should be OK now.


Edit:No I can't use decimal version, it expects integer values. Not a problem, I'll try the other way
Edit:and that seems to be working as it should :)


Many thanks.
Feel free to follow up in German if you prefer

Sailor

Hi fruit

Zitat von: fruit am 09 Februar 2016, 07:45:49
Edit:and that seems to be working as it should :)

Feeling happz for you!

Just don't forget do adapt the parameters


GasCounterOffset
GasCubicPerCounts


in accordance to the new way of counting...

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

fruit

Zitat von: Sailor am 10 Februar 2016, 10:24:38Just don't forget do adapt the parameters
Done and all running smoothly now thanks
For a future update... you have a couple of typos in commandref predictabeable and cas-counter, on the same line :)

and for the benefit of other UK users... 'BasicPricePerAnnum' is Standing Charge (usually given as a daily rate).
UK energy tariffs can be complex - and really not designed to benefit the consumer :(
Feel free to follow up in German if you prefer

LarsK

Zitat von: Sailor am 05 Februar 2016, 17:36:11
Hallo Lars

Das kann so auch nicht klappen, da das Modul einen fortlaufenden Zaehlerwert erwartet.

Soll heißen:


2016-01-28_21:34:54 DEB3 01
2016-01-28_21:35:12 DEB3 02
2016-01-28_21:40:31 DEB3 03
2016-01-28_21:41:19 DEB3 04


Gruss
    Sailor

Hallo, danke.
Dann war das ein Denkfehler bei mir. Dann werde ich das mal umbauen.

Gerd.Ternes

Hallo Zusammen,
zunächst einmal "Respekt". Ich erfasse meine Werte seit rd. 1 Jahr mit der Funktion C_GASZAEHEHLER. Dort muss ich allerdings einige Werte (Monat, Jahr usw.) von Hand eintragen um die von mir gewünschte Auswertung zu erhalten.
Ich habe das Modul zunächst auf meinem Tastsystem (Cubietruck, minimale Funktionen ) installiert. Es lief eigentlich ganz ordentlich,  bis ich plötzlich den Web Server (fhem) nicht mehr erreichen konnte.
Als ich dann das Modul auf meinem Aktivsystem installiert habe kam das gleiche Problem. Im Log steht
Illegal division by zero at ./FHEM/73_GasCalculator.pm line 495.
danach kann ich den Server nicht mehr erreichen. Womit hängt das zusammen oder hat jemand das gleiche Problem?

Ich musste danach den Cubietruck resetten und da gingen dann auch leider die eingstellten Werte (Jahr, Monat Gesamt usw.) verloren. Vielleicht kann man hier ein wenig "nachbessern".
Weiterhin war (und ist) für mich interessant, Monats, und Tageswerte (durchschnittlicher Verbrauch/Tag bzw. Monat bzw. Woche) zus sehen. Lässt sich dies noch einbauen?

Danke im Voraus

Gerd

bert

Ja, hab ich auch. FHEM wird angehalten du brauchst nur fhem neu starten.

Gerd.Ternes

Hab ich gemacht, aber der Fehler kommt immer wieder

Gesendet von meinem MD_LIFETAB_P9516 mit Tapatalk


bert

Fhem stop bei jeder Aktualisierung drum hab ich mir nen Dummy gebaut und rufe den auf.

Gerd.Ternes

Kannst du den veröffentlichen?

Gesendet von meinem MD_LIFETAB_P9516 mit Tapatalk