Skip to content

2) Help

Jean-Marc Louviaux edited this page May 21, 2022 · 2 revisions

How to update ?

Use the updater and follow the procedure. You may also : Stop meterN, remove everything but keep a copy of "data" & "config" directories. Extract the latest archive on your web server's folder. (tar -xzvf metern*.tar.gz) Import your previous "data" & "config" directories. Then, go into the administration.
eg : Stop mN then
cd /var/www/
sudo mkdir metern_backup
sudo mv /var/www/metern/ /var/www/metern_backup/
sudo wget https://github.com/jeanmarc77/meterN/releases/download/1.2.3.2/metern1.2.3.2.tar.gz
sudo tar -xzvf metern1.2.3.2.tar.gz
sudo rm metern1.2.3.2.tar.gz
sudo cp -rp /var/www/metern_backup/data /var/www/metern/data
sudo cp -rp /var/www/metern_backup/config /var/www/metern/config
sudo chown -R www-data:www-data /var/www/metern/

How to start meterN on boot ?

Edit your /etc/rc.local file and add the line: /usr/bin/curl http://localhost/metern/scripts/bootmn.php
If you use systemd: Download 'metern.service' and put it in /etc/systemd/system then type : systemctl enable metern

The 'Test command' or 'Test live command' don't return anything

  • meterN run as http user, you'll need to grant the access to your communication app(s) : chmod a+x your_app(s)
  • Usually, there is problem to access the communication ports (/dev/ttyACM* /dev/ttyUSB*) as http user
    So, first go in the debug page (debug.php) check what is your webserver's user next to whoami. It's often 'http' but it might be 'www' or something else.
    The peripherals are usually owned by the uucp group, add your user: useradd -G uucp http
    Then verifiy with : groups http

The 'Test command' or 'Test live command' return something but show "is not valid"

Make sure you respect the good dataset format.

How to permit using communication app in mN ?

Edit config/allowed_comapps.php, add an entry into $ALLWDCMD array. (e.g. $ALLWDCMD[0] = 'my_comapp';)

I still can't get it to work or something still wrong

Use the latest release and always test your your communications apps alone and make sure it is reliable before starting mN.
You could enable debug mode and restart, then check what the error log returns in the debugger. It usually contain many hints of what goes wrong.
Please only use github's issues for mN's bugs and enhancements, not purely related about communication app or help, sorry i don't have much time for that..