Community
OpenEnergyMonitor

Community

New install from scratch on a Raspberry Pi 3

Tags: #<Tag:0x00007f6e0e7b0560> #<Tag:0x00007f6e0e7b0128> #<Tag:0x00007f6e138e7cd0>

Hello, I want to monitor an Eastron SDM220 modbus energy meter with a raspberry pi and a USB to RS-485 converter.
I’m trying to make the software work, but I’m not able.
The steps I’ve made so far are:

  1. Download a pre-built emonSD-Image http://files.openenergymonitor.org/emonSD-07Nov16.zip
  2. Use Etcher to write the image to a 8GB SD card.
  3. sudo emonSDexpand to expand the data partition
  4. sudo apt-get update && apt-get upgrade to update the software
  5. Disable some services:
    sudo systemctl disable openhab.service
    sudo systemctl disable nodered.service
    sudo systemctl disable emonPiLCD.service

But I’m not able to connect to the webpage: http://192.168.1.100
Apache2 doesn’t start:

[email protected](rw):data$ sudo /etc/init.d/apache2 status
    ● apache2.service - LSB: Apache2 web server
       Loaded: loaded (/etc/init.d/apache2)
      Drop-In: /lib/systemd/system/apache2.service.d
               └─forking.conf
       Active: failed (Result: exit-code) since mié 2017-08-09 15:58:58 UTC; 11min ago
      Process: 798 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
    ago 09 15:58:58 emonpi apache2[798]: Output of config test was:
    ago 09 15:58:58 emonpi apache2[798]: AH00558: apache2: Could not reliably determine the server's fully qualified   domain name, using 127.0.1.1. Set the 'ServerName' directive globall...s this message
    ago 09 15:58:58 emonpi apache2[798]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
    ago 09 15:58:58 emonpi apache2[798]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/...default.conf:1
    ago 09 15:58:58 emonpi apache2[798]: AH00014: Configuration check failed
    ago 09 15:58:58 emonpi apache2[798]: Action 'configtest' failed.
    ago 09 15:58:58 emonpi apache2[798]: The Apache error log may have more information.
    ago 09 15:58:58 emonpi systemd[1]: apache2.service: control process exited, code=exited status=1
    ago 09 15:58:58 emonpi systemd[1]: Failed to start LSB: Apache2 web server.
    ago 09 15:58:58 emonpi systemd[1]: Unit apache2.service entered failed state.
    Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
    Hint: Some lines were ellipsized, use -l to show in full.

 

The emon service doesn’t work:

[email protected](rw):~$ sudo service emonhub status
● emonhub.service - (null)
   Loaded: loaded (/etc/init.d/emonhub)
   Active: failed (Result: exit-code) since mié 2017-08-09 15:58:58 UTC; 3min 36s ago
   Process: 966 ExecStart=/etc/init.d/emonhub start (code=exited, status=203/EXEC)
     ago 09 15:58:58 emonpi systemd[1]: emonhub.service: control process exited, code=exited status=203
     ago 09 15:58:58 emonpi systemd[1]: Failed to start (null).
     ago 09 15:58:58 emonpi systemd[1]: Unit emonhub.service entered failed state.

Please, could you point me to the right installation steps?

Regards,
Joaquin

Hi @Joaquin_Lopez,

This is strange, the pre-built SD card image is working for us. I’ve not tested using Etcher, we use linux dd.

Could you try and flash to a fresh SD card and test after step 2. Please ensure the unit is connect to the internet and leave it for about 5-10min since some auto updating takes place on first boot . I think something might have got corrupted if SD expand was started during this first update progress.

Thanks for the answer Glyn,
Please, could you point me to the Step2? Where is the correct guide?

I was following these steps:
https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log

Regards,

Sorry, I meant your step 2.

Bootup and test just after flashing the SD, and leave for 5-10min with an internet connection on first boot to auto update before expanding the SD. Also recomend testing before running apt-get upgrade just in case this is causing an issue.

Perfect Glyn, now it worked correctly, but with the order of the steps inverted, that is…

1. Download a pre-built emonSD-Image http://files.openenergymonitor.org/emonSD-07Nov16.zip
2. Use dd to write the image to a 16GB SD card.
3. sudo apt-get update && apt-get upgrade to update the software
4. sudo emonSDexpand to expand the data partition
5. Disable some services:
sudo systemctl disable openhab.service
sudo systemctl disable nodered.service
sudo systemctl disable emonPiLCD.service

The 1st time I connect to the web interface I have to create a user, isn’t it?
This user will act as the admin user for the web interface?

If I want to read the parameters sent by an Eastron SDM220 modbus connected via an USB-485 converter, what should I do?

Regards,

Yes, correct. By default the pre-built SD card only allows a single Emoncms user (admin). You can change that by editing /var/www/emoncms/settings.php

Sorry, I have no experience of this meter. Maybe search the forums? I found this thread:

That was my thread about the Eastron, unfortunately the RS485 USB board is still in the parts box as the pi Zero I had earmarked for it went to another project. If you do get it working @Joaquin_Lopez do let me know!