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
Some issues with first meterN install ..
Re: Some issues with first meterN install ..
Hi,
Make sure your meter ID correspond with the output: ID(VALUE*UNIT)
Good luck
Make sure your meter ID correspond with the output: ID(VALUE*UNIT)
Good luck

Re: Some issues with first meterN install ..
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
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
Re: Some issues with first meterN install ..
Hi Axel,
Well, you can put any commands as long as the 'http' user can execute them..
Here's some examples commands :
You try try this example.php and request the page from your browser :
Check also your www server log
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
..
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";
}
?>
Who is online
Users browsing this forum: No registered users and 2 guests