Troubleshooting


emonPi Architecture Overview
Fig.1 - emonPi Architecture Overview

If you are experiancing issues please post on our community form, see Help page.

Debugging issues often involves connecting via SSH to restart services and view log files see:

Technical > Credentials > Connect Via SSH

There are a number of things to check if feeds are not updating:

  • Is emonhub running?
    • $ sudo service emonhub status
    • $ sudo service emonhub restart
  • Is emonHub posting to MQTT?
    • Check log file
    • Local Emoncms > emonHub > Emonhub logger
    • $ tail /var/log/emonhub/emonhub.log

  • Is Emoncms MQTT Input Service running?
    • $ sudo service mqtt_input status
    • $ sudo service mqtt_input restart
  • Check Emoncms logfile
    • Local Emoncms > Setup > Administration > Emoncms log
    • $ tail /var/log/emoncms.log

It’s important that the emonPi has the correct time. If required timezone should be set in Emoncms Account page and on the Raspberry Pi (see below). The emonPi requires an active Internet connection at bootup to obtain current time from NTP. After correct time has been obtained the soft-ntp function should be able to keep valid time even if Internet connection is lost. See NTP Time Fix for more info. If using an emonPi for a long period with no web connection it’s recommended to add a hardware Real-Time-Clock (RTC).

  • Check time on emonPi LCD display, press LCD push-button until uptime page is displayed
    • $ date

To set timezone:

  • In Emoncms: Local Emoncms > Setup > My Account > Timezone

  • On Raspberry Pi (Linux system time):

    • Check emonPi has a connection to the internet
    • Try a reboot
    • If time is still incorrect, then force manual NTP update:
    • Connect Via SSH

    • Run $ rpi-rw, then run $ sudo raspi-config, select Internationalisation Options and set local timezone. Then run $ rpi-ro.

    • Check time is correct by running $ date
    • If time is STILL not correct try:
    • Check emonpi has an active Internet connection $ wget google.com should connect successfully
    • $ sudo service ntp restart
    • Check time with $ date

Check available disk space in the data partition (/home/pi/data) by looking at the graph at the bottom of: Local Emoncms > Setup > Administration



If the password for the local Emoncms account has been forgotten this can be reset by connecting in via ssh then running:

$ php ~/usefulscripts/resetpassword.php

It then asks for the userid (default:1) and for a new password or option to auto generate. Example:

=======================================
EMONCMS PASSWORD RESET
=======================================
Select userid, or press enter for default:
Using default user 1
Enter new password, or press enter to auto generate:
Auto generated password: 9f7599c8da

If the account username has also been forgotten this can be retreived by connecting via ssh and looking at the MYSQL database entry :

When prompted enter the emonPi default MYSQL root password.

$ mysql -uroot -p
USE emoncms;
SELECT * FROM users;
exit

Caution: this will delete ALL Emoncms data

$ sudo su
$ ~/emonpi/./factoryreset