meterN 1.0

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

Re: meterN 1.0

Post by jeanmarc » Fri Aug 30, 2019 5:53 pm

ok and the pwm_ssr.php script ?
I bet it should be

Code: Select all

$outstr1 = exec('`pgrep -c pwm_ssr`');
$outstr1 = trim($outstr1);

megamarco83
Posts: 110
Joined: Tue Apr 14, 2015 9:25 am

Re: meterN 1.0

Post by megamarco83 » Fri Aug 30, 2019 6:53 pm

mmm not working also ith trim command:

Code: Select all

pi@raspberrypi:~ $ reqsdm boiler-status
sh: 1: 1: not found
pwm_ssr_dimmer(<font color='#8B0000'>OFF</font>*X")
same response. ( in this case was active the script, but response is OFF)

here you can find the whole package:
https://github.com/flanesi/Raspberry-PWM-Water-heater

thanks JM as always!

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

Re: meterN 1.0

Post by jeanmarc » Fri Aug 30, 2019 7:09 pm

i'am sorry but i don't found your reqsdm in this.
By the way, reqsdm whas suppose to be writted to request an SDM electrical meter ;)
Is it possible to get an ssh access to your logger ? If so, give me details in PM

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

Re: meterN 1.0

Post by jeanmarc » Sat Aug 31, 2019 10:20 am

Solution was

Code: Select all

$outstr1 = trim(exec('pgrep -c pwm_ssr'));
if ($outstr1 == 1) {
$outstr = ('pwm_ssr_dimmer(<font color=\'#228B22\'>ON</font>*X)');
} else {
$outstr = ('pwm_ssr_dimmer(<font color=\'#8B0000\'>OFF</font>*X")');
}

EdoFede
Posts: 15
Joined: Thu Mar 07, 2019 1:54 pm
Contact:

Re: meterN 1.0

Post by EdoFede » Wed Sep 04, 2019 7:01 pm

Hi JM,

since I've updated to 1.2.1, the power indicator in the index and in the dashboard has stopped working :(

It seems to be only a "front-end" problem, since che test function reports the power consumption without any problem.
All other custom indicators work perfectly.

Could you help me to find the problem?

Thanks,
Edoardo

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

Re: meterN 1.0

Post by jeanmarc » Thu Sep 05, 2019 7:36 am

Hi Edoardo,
Did you do a full resfresh (CTRL+F5) ? What is your browser ?

EdoFede
Posts: 15
Joined: Thu Mar 07, 2019 1:54 pm
Contact:

Re: meterN 1.0

Post by EdoFede » Fri Sep 06, 2019 9:22 am

Hi,
yes.
I've tried with different browsers and devices, same result.

Instant power indicator > 0 W

No problem on console side:

Code: Select all

bash-5.0# cat metern1.txt
1(223.70*W)
1(5317727*Wh)
1_1(232.20*V)
1_2(1.18*A)
1_3(50.00*Hz)
1_4(0.80*F)

Image

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

Re: meterN 1.0

Post by jeanmarc » Fri Sep 06, 2019 9:29 am

Hi Edoardo,
Did you set your meter as 'elect' 'house consumption' ? Did the 'test live command' return is ok ?
If so, can you PM me a temporary ssh access to your logger ?

EdoFede
Posts: 15
Joined: Thu Mar 07, 2019 1:54 pm
Contact:

Re: meterN 1.0

Post by EdoFede » Fri Sep 06, 2019 9:43 am

Hi,

yes, the meter is configured as "elect" and the test live command works fine.

Unfortunately, I'm not able to give you ssh access, because of my network configuration.

I post screenshoots of the whole admin panel and config files, hope it can be useful.




Image

Image

Image

Image

Image



config_daemon.php

Code: Select all

<?php
	if(!defined('checkaccess')){ die('Direct access not permitted'); }

	if (is_null($PID)) {
		// Stop Daemon
		exec("pkill -f pooler485 > /dev/null 2>&1 &");
	} else {
		//Start Daemon
		exec("pooler485 1 9600 /dev/ttyUSB0 > /dev/null 2>/dev/null &");
	}
?>


config_indicator.php

Code: Select all

<?php
if(!defined('checkaccess')){die('Direct access not permitted');}

// ### CONFIG FOR INDICATOR(S)
$NUMIND=4;

$INDNAME1="Tensione";
$INDID1="1_1";
$INDCOMMAND1="cat /dev/shm/metern1.txt |egrep '^1_1\(' | grep '*V)'";
$INDUNIT1="V";
$cfgver=1563348400;

$INDNAME2="Corrente";
$INDID2="1_2";
$INDCOMMAND2="cat /dev/shm/metern1.txt |egrep '^1_2\(' | grep '*A)'";
$INDUNIT2="A";
$cfgver=1563348400;

$INDNAME3="Frequenza";
$INDID3="1_3";
$INDCOMMAND3="cat /dev/shm/metern1.txt |egrep '^1_3\(' | grep '*Hz)'";
$INDUNIT3="Hz";
$cfgver=1563348400;

$INDNAME4="Cos φ";
$INDID4="1_4";
$INDCOMMAND4="cat /dev/shm/metern1.txt |egrep '^1_4\(' | grep '*F)'";
$INDUNIT4="";
$cfgver=1563348400;
?>


config_layout.php

Code: Select all

<?php
if(!defined('checkaccess')){die('Direct access not permitted');}

$GRAPHH=250;
$POWER_MIN=0;
$POWER_MAX=4500;
$GRAPH_MET1=1;
$LASTD_MET1=true;
$FILL_MET1=false;
$GRAPH_MET2=2;
$LASTD_MET2=false;
$FILL_MET2=false;
$GRAPH_MET3=2;
$LASTD_MET3=false;
$FILL_MET3=true;
$GRAPH_MET4=2;
$LASTD_MET4=false;
$FILL_MET4=true;

$cfgver=1506503500;
?>


config_main.php

Code: Select all

<?php
if(!defined('checkaccess')){die('Direct access not permitted');}
// ### GENERAL
$NUMMETER=4;
$DELAY=1000;
$DISTRO='ubuntu_x86';
$LOGCOM=false;
$DEBUG=false;
$DATASET='IEC62056';

// ### LOCALIZATION
$DTZ='Europe/Rome';
$LATITUDE=44.506;
$LONGITUDE=11.302;
$DATEFORMAT='d/m/Y';
$DPOINT=',';
$THSEP='.';
$CURS='€';

// ### WEB PAGE
$TITLE="meterN";
$SUBTITLE="« Home energy metering &amp; monitoring »";
$STYLE="default";
$LANG="English";

// ### CLEANUP
$KEEPDDAYS=365;
$AMOUNTLOG=1000;

$cfgver=1559293870;
?>


config_met1.php

Code: Select all

<?php
if(!defined('checkaccess')){die('Direct access not permitted');}

// ### CONFIG FOR METER #1

$METNAME1="Casa";
$TYPE1='Elect';
$PROD1=2;
$PHASE1=1;
$SKIPMONITORING1=false;
$ID1="1";
$COMMAND1="poolerconsumi 1 energy";
$UNIT1="Wh";
$PRECI1=0;
$PASSO1=100000;
$COLOR1='962629';
$PRICE1=0.13929;
$LID1="1";
$LIVECOMMAND1="poolerconsumi 1 power";
$LIVEUNIT1="W";
$EMAIL1="";
$POAKEY1='';
$POUKEY1='';
$RPITOK1='';
$WARNCONSOD1=15000;
$NORESPM1=false;

$cfgver=1563348870;
?>


memory.php

Code: Select all

<?php
// Make sure you only use a tmpfs. Don't put a / at the end of the variable path.
$TMPFS = '/dev/shm';

// live things
$LIVEMEMORY  = $TMPFS . '/mN_LIVEMEMORY.json';
$ILIVEMEMORY = $TMPFS . '/mN_ILIVEMEMORY.json';
// 5minflag + total counters + mail Q
$MEMORY      = $TMPFS . '/mN_MEMORY.json';
?>

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

Re: meterN 1.0

Post by jeanmarc » Fri Sep 06, 2019 10:57 am

Maybe it's your other meters (tensione/Frequenza/Cos) that return nothing (---).
In Chrome could you press F12, then reload the page F5. Then, check what are the errors in 'Console' tab

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests