meterN 0.8

Talks about metering
Garluk
Posts: 5
Joined: Tue Sep 05, 2017 10:05 pm

Re: meterN 0.8

Post by Garluk » Mon Sep 25, 2017 7:15 pm

JM, I report a bug.

If you add a meter I receive this notice in event windows:

Code: Select all

PHP Notice:  Undefined offset: 10 in /var/www/metern/scripts/metern.php on line 228
This message is due to absence of the meter's column value in the first line of the today csv file.
You can easily fix this bug.
Just replace line 228 in metern/scripts/metern.php

Code: Select all

$val_first = trim($array[$i]);
with

Code: Select all

if ($i <= $NUMMETER) {
	$val_first = trim($array[$i]);
} else {
	$val_first = 0;
}
Thanks

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

Re: meterN 0.8

Post by jeanmarc » Mon Sep 25, 2017 8:25 pm

Thanks, i guess isset is more cute

Code: Select all

                    if (!$msgflag) {
                        $val_last  = null;
                        $val_first = null;
                        $array     = preg_split('/,/', $lines[1]);
                        if (isset($array[$i])) {
                            $val_first = trim($array[$i]);
                            settype($val_first, 'float');
                        }
                        $array = preg_split('/,/', $lines[$contalines - 1]);
                        if (isset($array[$i])) {
                            $val_last = trim($array[$i]);
                            settype($val_last, 'float');
                        }
                        
                        if (!empty($val_first) && !empty($val_last) && ${'TYPE' . $i} != 'Sensor') { // Meter
                            if ($val_first <= $val_last) {
                                $val_last -= $val_first;
                            } else { // counter pass over
                                $val_last += ${'PASSO' . $i} - $val_first;
                            }
                        }
                        ...

Garluk
Posts: 5
Joined: Tue Sep 05, 2017 10:05 pm

Re: meterN 0.8

Post by Garluk » Mon Sep 25, 2017 9:28 pm

Great!

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: meterN 0.8

Post by TonyP62 » Fri Nov 24, 2017 7:40 pm

Thanks Jean-Marc for the RpiNotify . It is a very good and great idea.

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

Re: meterN 0.8

Post by jeanmarc » Sun Dec 03, 2017 10:45 am

Hello,

It's been awhile ! meterN0.8.5 is out :

- You can set the graphics's height in layout configuration
- You also have to set a gauge min and max
- Some minors fixes
- Updated to Highcharts 6

This release will allow to test the one click update (if you come from 0.8.4)

Cheers

NevD
Posts: 147
Joined: Tue Mar 11, 2014 12:22 am

Re: meterN 0.8

Post by NevD » Mon Dec 04, 2017 3:37 am

I am on 0.8.4 tried update says did not complete....


ERROR: mv /var/www/metern/ /var/www/metern.20171204/

The update didn't complete as expected !

CURDIR: /var/www/metern
SRVDIR: /var/www
SELFDIR: /metern/admin

What do I need to check ???

Nev

NevD
Posts: 147
Joined: Tue Mar 11, 2014 12:22 am

Re: meterN 0.8

Post by NevD » Mon Dec 04, 2017 3:55 am

OK it did not create the dir needed to move files permissions were 755, changed to 777 and dir created and update completed, using 250px and a scale of -3600 to 15000...

All looks good

Nev

flane
Posts: 89
Joined: Mon Aug 11, 2014 7:22 am

Re: meterN 0.8

Post by flane » Mon Dec 04, 2017 11:55 am

I upgraded from version 0.8.4 to 0.8.5.
Everything OK, no problem.
The one click update works very well. :D

Thanks JeanMarc, as always ..... a great job. :D

acfnews
Posts: 35
Joined: Mon Jan 05, 2015 6:58 pm

Re: meterN 0.8

Post by acfnews » Mon Dec 04, 2017 9:33 pm

NevD wrote:
Mon Dec 04, 2017 3:55 am
OK it did not create the dir needed to move files permissions were 755, changed to 777 and dir created and update completed, using 250px and a scale of -3600 to 15000...

All looks good

Nev
Nev,

I had the same issue, but settings the permissions towards 777 is a bit wide.
I fixed it by settings the main directory where 123solar and metern are to owner www-data (isof root:):

Code: Select all

root@raspberry_mk:/usr/share/nginx# ls -ald www/
drwxr-xr-x 9 www-data www-data 148 Dec  4 21:17 www/

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

Re: meterN 0.8

Post by jeanmarc » Tue Dec 05, 2017 6:59 am

Hi,
Did you put the archive on your web server's folder to extract (tar -xzvf metern*.tar.gz) or extract on a computer then copy the mN's folder ?

Locked

Who is online

Users browsing this forum: No registered users and 2 guests