Netgative counting

Talks about metering
mstuetz
Posts: 110
Joined: Sun Dec 29, 2013 1:20 pm

Netgative counting

Post by mstuetz » Thu Jan 30, 2020 9:30 am

I've just upgraded from 0.8.5 to 1.2.2.
Almost everything worked fine, even the version "jump" was pretty big.
Unfortunately the "house consumption" graph does not work anymore - in the log I can find following message frequently.

Code: Select all

Error #4 Hausverbrauche report a negative value
Debug shows this:

Code: Select all

Memory (/dev/shm/mN_MEMORY.json) :
Array ( [msgflag1] => [msgflag2] => [msgflag3] => [msgflag4] => [msgflag5] => [msgflag6] => [msgflag7] => [msgflag8] => [msgflag9] => [5minflag] => [Totalcounter1] => 1236.5 [Totalcounter2] => 1236.5 [Totalcounter3] => 1236.5 [Totalcounter4] => -5460751 [Totalcounter6] => 02268265 [Totalcounter7] => 06888831 [Totalcounter9] => 8933 [First1] => 1237 [Last1] => 1237 [First2] => 1237 [Last2] => 1237 [First3] => 1237 [Last3] => 1237 [First4] => 0 [Last4] => 0 [First6] => 2285710 [Last6] => 2299289 [First7] => 6888831 [Last7] => 6888831 [First9] => 9197 [Last9] => 9268 [Last5] => 18 [Last8] => 50.7 [First5] => 18 [First8] => 50.8 )
Live (/dev/shm/mN_LIVEMEMORY.json) :
Array ( [UTC] => 1580372237 [SDM630_L11] => 000128 [SDM630_L22] => 000264 [SDM630_L33] => 000125 [Hausverbrauch4] => 000517 [BoilerTemperatur5] => 18 [Waermepumpe6] => 000000 [BoilerHeizung7] => 000000 [Batterie8] => 50.6 [Windrad9] => 1 )
Indicators (/dev/shm/mN_ILIVEMEMORY.json) :
So, off course the Totalcounter4 is negative, that comes from my pv+battery systems that deliver more to the power network than my house consumes.

Ist there a simple fix/hack, so that the values get shown as it was before?

jeanmarc
Posts: 2134
Joined: Thu Aug 29, 2013 7:16 am

Re: meterN 1.0

Post by jeanmarc » Fri Jan 31, 2020 7:22 am

Hi,
I haven't have much time to look at details, but you cannot have a meter that goes back.
That's impossible to render graph with negative value and to guess if a meter 'passed over'.

My main meter goes back and forth though, so i make a sensor for it to show the index. I think i ve include the example in dowload.

Now i prepare for skiing :mrgreen:

mstuetz
Posts: 110
Joined: Sun Dec 29, 2013 1:20 pm

Re: meterN 1.0

Post by mstuetz » Fri Jan 31, 2020 12:57 pm

Thx for your reply.
Why did that work in the past? I configured this on all my installations this way and it worked fine until the upgrade.
Too bad. Ist there a simple way to remove the negative check and get "old" behaviour.
Here a pic of the old Houseconsumption meter: https://ibb.co/55JvGg5

jeanmarc
Posts: 2134
Joined: Thu Aug 29, 2013 7:16 am

Re: Netgative counting

Post by jeanmarc » Sat Feb 01, 2020 5:43 pm

Hi,
I am back home, you cannot have a negative counter. ([Totalcounter4] => -5460751), if so the daily counting will returns wrong values.
You better make a dedicated meter for exported energy and another for imported.
Hope it's help

mstuetz
Posts: 110
Joined: Sun Dec 29, 2013 1:20 pm

Re: Netgative counting

Post by mstuetz » Sat Feb 01, 2020 6:04 pm

Ok, thx.
Too bad. I'd rather step back to a version where this works fine.
Don't want to mess up all my measurments from the last years.

jeanmarc
Posts: 2134
Joined: Thu Aug 29, 2013 7:16 am

Re: Netgative counting

Post by jeanmarc » Sat Feb 01, 2020 6:57 pm

From the mN start, it is state : The meter counter can't reset to 0 (eg. after a surge), it should always increase until it pass-over.

How can you have proper counting with negative ? As it take difference in a day :
Day 1 : start at 0 end at -100 = daily is -100.
Day 2 : start at -100 end at 100 = daily is null
Your daily consumption will be false with negative. Your "Hausverbrauch" meter do the difference between import/export, i'am pretty sure it is not real house consumption.

It is wiser to make a meter for exported/imported and make a proper meter for house consumption. If you wish to log your difference you can check "meterud.php" example, it is an indicator that will align a real meter that also goes reverse.
All reals meters start from 0 to 99999... ;)

mstuetz
Posts: 110
Joined: Sun Dec 29, 2013 1:20 pm

Re: Netgative counting

Post by mstuetz » Sun Feb 02, 2020 9:24 am

Thx Jeanmarc!
I followed your advice and added a household consumption and production meter instead of my old "houshold in+out meter". I guess this comes your idea of meterN closer. :)
This seems to work fine, off course.
I also added a indicator for actual power (-/+) just like before.
Unfortunately I did nowhere find the mentioned "meterud.php" example? Can you pls post it or send it to me?
I want the meter showing 24h production+consumption back, even it makes no sense for long time logging.

jeanmarc
Posts: 2134
Joined: Thu Aug 29, 2013 7:16 am

Re: Netgative counting

Post by jeanmarc » Sun Feb 02, 2020 10:11 am

I'am glad you didn't goes back :D
I'am not sure it fit your need, meterud is available in misc examples.
It is an indicator, it match a real supplier meter that can go reverse. It is not designed to render graph..

I use EIMP (imported) EEXP (export) and ESELFC (auto-consumption)
, those are available in daemon/houseenergy.

I'am not sure this is what this is your expect, mN is not designed to making negative difference :shifty:

mstuetz
Posts: 110
Joined: Sun Dec 29, 2013 1:20 pm

Re: Netgative counting

Post by mstuetz » Sun Feb 02, 2020 12:10 pm

So no chance to get back a graph with a zero line in the middle showing delivery and consumption in one graph like here: https://ibb.co/55JvGg5 ?
:shock:

jeanmarc
Posts: 2134
Joined: Thu Aug 29, 2013 7:16 am

Re: Netgative counting

Post by jeanmarc » Sun Feb 02, 2020 1:24 pm

Nope, a meter should increase.. As explained, it does difference in day and you'll get odds value in 'readings'.
Maybe, you can make a sensor if you wish to show the imported/exported flow ?
BTW, what meter as you using ?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest