Some issues with first meterN install ..

Talks about metering
Post Reply
AxxlFoley
Posts: 3
Joined: Mon Mar 23, 2015 9:50 am

Some issues with first meterN install ..

Post by AxxlFoley » Fri Aug 14, 2015 9:05 pm

Hi,

I'm have installed meteN on my raspberry pi with apache2. After some issues with authentication i can access the admin page now an can make settings.

Now my setup is the folloing I'm reading two meters via a USB IR reader. I have a bash script that can read the values and output in the required format like 1(10923*Wh)...

My issue is with the command I have to call.. No matter what I put and then test I always get the error page displayed :

is not valid, the correct format is 1(1234.5*Wh)

.. So I'm questioning myself what am I missing ? Where shoud i put the script that can gets called in the command field ? I assumed in /comapps is that correct ? Is it possible to use a shell script ?

I also tried the simple example from the download page .. cputemp.sh .. same issue like above.

Could someone explain a bit what exactly needs to be in that command input field ?

Thanks,
AxxlFoley

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

Re: Some issues with first meterN install ..

Post by jeanmarc » Sat Aug 15, 2015 5:55 am

Hi,
Make sure your meter ID correspond with the output: ID(VALUE*UNIT)
Good luck :)

AxxlFoley
Posts: 3
Joined: Mon Mar 23, 2015 9:50 am

Re: Some issues with first meterN install ..

Post by AxxlFoley » Sat Aug 15, 2015 7:19 am

Hi jeanmarc,
thanks, that was one of the things I checked first. I still have issues, could you give an example how the command field would be filled correctly? E.g with cputemp.sh script from the examples..

Do I have to put comapps/ before ?

Thanks,
Axel

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

Re: Some issues with first meterN install ..

Post by jeanmarc » Sun Aug 16, 2015 5:10 pm

Hi Axel,
Well, you can put any commands as long as the 'http' user can execute them..
Here's some examples commands :

Code: Select all

curl http://192.168.1.10/reqsmd.php?cmd=EIMP
more /tmp/485metern.txt | egrep "^EEXP\(" | grep "*Wh)"
pool123s energy
cputemp
..
You try try this example.php and request the page from your browser :

Code: Select all

<?php
$ID="your meter id";
$datareturn = exec("whatever command");

$regexp = "/^$ID\(-?[0-9\.]+\*[A-z0-9³²%°]+\)$/i";
$datareturn = trim($datareturn);
echo "$datareturn<br>";
if (preg_match($regexp, $datareturn)) {
    echo "It's valid";
} else {
    echo "It's not valid";
}
?>
Check also your www server log

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests