EmonPi Not working as expected after update

Hi All,

I just updated my emonpi via the emoncms web interface that is hosted on the emonpi.

This was a pre-built box that I brought from Open Energy Monitor themselves. No tampering has been done to the configuration in any way, the device has been offline for sometime as I was going to use it for a project but that died down.

I am able to access emoncms, but under nodes all are inactive (img attached)

EmonHub Log output:

2017-01-17 16:21:06,398 DEBUG    RFM2Pi     1054 NEW FRAME : OK 8 0 0 0 0 0 0 0 0 162 90 223 0 184 11 184 11 184 11 184 11 184 11 1 0 0 0 (-56)
2017-01-17 16:21:06,403 DEBUG    RFM2Pi     1054 Timestamp : 1484670066.4
2017-01-17 16:21:06,404 DEBUG    RFM2Pi     1054 From Node : 8
2017-01-17 16:21:06,405 DEBUG    RFM2Pi     1054    Values : [0, 0, 0, 0, 232.02, 22.3, 300, 300, 300, 300, 300, 1]
2017-01-17 16:21:06,407 DEBUG    RFM2Pi     1054      RSSI : -56
2017-01-17 16:21:06,408 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:06,408 DEBUG    RFM2Pi     1054 Sent to channel(start)' : ToEmonCMS
2017-01-17 16:21:06,410 DEBUG    RFM2Pi     1054 adding frame to buffer => [1484670066.398014, 8, 0, 0, 0, 0, 232.02, 22.3, 300, 300, 300, 300, 300, 1, -56]
2017-01-17 16:21:06,411 DEBUG    RFM2Pi     1054 Sent to channel(end)' : ToEmonCMS
2017-01-17 16:21:06,530 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:06,534 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:06,635 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:06,639 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:06,763 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:06,780 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:06,881 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:06,885 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,011 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,022 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,123 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,127 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,265 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,285 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,386 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,390 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,471 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 0 166 16 32 3 36 0 35 48 0 3 96 18 128 32 4 0 96 41 0 0 (-99)
2017-01-17 16:21:07,524 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,528 INFO     MQTT       Unexpected disconnection
2017-01-17 16:21:07,630 INFO     MQTT       Connecting to MQTT Server
2017-01-17 16:21:07,633 INFO     MQTT       Unexpected disconnection

EmonCMS Log output:

2017-1-17 16:14:19 MQTT INFO Reloading config
2017-1-17 16:14:25 MQTT INFO Reloading config
2017-1-17 16:14:31 MQTT INFO Reloading config
2017-1-17 16:14:37 MQTT INFO Reloading config
2017-1-17 16:14:43 MQTT INFO Reloading config
2017-1-17 16:14:49 MQTT INFO Reloading config
2017-1-17 16:14:53 FEEDWRITER INFO PHPTimeSeries bytes written: 0
2017-1-17 16:14:53 FEEDWRITER INFO PHPFina bytes written: 0
2017-1-17 16:14:55 MQTT INFO Reloading config
2017-1-17 16:15:01 MQTT INFO Reloading config
2017-1-17 16:15:07 MQTT INFO Reloading config
2017-1-17 16:15:13 MQTT INFO Reloading config
2017-1-17 16:15:19 MQTT INFO Reloading config
2017-1-17 16:15:25 MQTT INFO Reloading config
2017-1-17 16:15:31 MQTT INFO Reloading config
2017-1-17 16:15:37 MQTT INFO Reloading config
2017-1-17 16:15:43 MQTT INFO Reloading config
2017-1-17 16:15:49 MQTT INFO Reloading config
2017-1-17 16:15:53 FEEDWRITER INFO PHPTimeSeries bytes written: 0
2017-1-17 16:15:53 FEEDWRITER INFO PHPFina bytes written: 0
2017-1-17 16:15:55 MQTT INFO Reloading config
2017-1-17 16:16:01 MQTT INFO Reloading config
2017-1-17 16:16:07 MQTT INFO Reloading config
2017-1-17 16:16:13 MQTT INFO Reloading config
2017-1-17 16:16:19 MQTT INFO Reloading config
2017-1-17 16:16:25 MQTT INFO Reloading config
2017-1-17 16:16:31 MQTT INFO Reloading config
2017-1-17 16:16:37 MQTT INFO Reloading config
2017-1-17 16:16:43 MQTT INFO Reloading config
2017-1-17 16:16:49 MQTT INFO Reloading config

The RaspberryPi element seems to be boot looping, the LCD on the EmonPi just shows this, it has been on for about 20mins now with no change: ‘Raspberry Pi Booting…’

Any help would be most appreciated.

Regards,

Charles.

Can you download and attach the update.log and possibly a screenshot of the admin page?

It looks like the MQTT broker isn’t running or has an issue.

Hi Paul,

Admin screenshot:

Update Log:

Filesystem is unlocked - Write access
type ' rpi-ro ' to lock
Stopping system emonPiLCD daemon:start-stop-daemon: warning: failed to kill 2468: No such process
No process in pidfile '/var/run/emonPiLCD.pid' found running; none killed.
 failed!
I2C LCD DETECTED Ox27
Starting emonPi Update >

Tue Jan 17 15:21:03 UTC 2017

EUID: 1000

emonSD-17Jun2015_updated

git pull /home/pi/emonpi
* master
Already up-to-date.
git pull /home/pi/RFM2Pi
* master
Already up-to-date.
git pull /home/pi/emonhub
* emon-pi
Already up-to-date.

Start emonPi Atmega328 firmware update:

=================================
EmonPi update started
=================================

EUID: 1000

Requirement already up-to-date: paho-mqtt in /usr/local/lib/python2.7/dist-packages
Cleaning up...
Stopping OpenEnergyMonitor emonHub: emonhub has been stopped ok.
Start ATmega328 serial upload using avrdude with latest.hex
Discrete Sampling
avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/home/pi/emonpi/firmware/compiled/latest.hex
avrdude-original: Using autoreset DTR on GPIO Pin 7

avrdude-original: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude-original: Device signature = 0x1e950f
avrdude-original: NOTE: FLASH memory has been specified, an erase cycle will be performed
                  To disable this feature, specify the -D option.
avrdude-original: erasing chip
avrdude-original: reading input file "/home/pi/emonpi/firmware/compiled/latest.hex"
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: writing flash (17898 bytes):

Writing | ################################################## | 100% 2.53s

avrdude-original: 17898 bytes of flash written
avrdude-original: verifying flash memory against /home/pi/emonpi/firmware/compiled/latest.hex:
avrdude-original: load data flash data from input file /home/pi/emonpi/firmware/compiled/latest.hex:
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex contains 17898 bytes
avrdude-original: reading on-chip flash data:

Reading | ################################################## | 100% 1.93s

avrdude-original: verifying ...
avrdude-original: 17898 bytes of flash verified
Starting OpenEnergyMonitor emonHub: emonhub has been started ok.


Start emonhub update script:

=================================
EmonPi update started
=================================
Running emonhub automatic node addition script
EUID: 1000
EUID: 1000
[[5]]
Node 5 already present
[[6]]
Node 6 already present
[[7]]
Node 7 already present
[[8]]
Node 8 already present
[[9]]
Node 9 already present
[[10]]
Node 10 already present
[[11]]
Node 11 already present
[[19]]
Node 19 already present
[[20]]
Node 20 already present
[[21]]
Node 21 already present
[[22]]
Node 22 already present
[[23]]
Node 23 already present
[[24]]
Node 24 already present
[[25]]
Node 25 already present
[[26]]
Node 26 already present

Start emoncms update:

=================================
Emoncms update started

Tue Jan 17 15:21:20 UTC 2017

EUID: 1000
Checking cron tab for service runner entry...
service runner crontab entry already installed

git pull /var/www/emoncms
* low-write
Already up-to-date.

git pull /var/www/emoncms/Modules/nodes
* master
Already up-to-date.

git pull /var/www/emoncms/Modules/app
* master
Already up-to-date.

git pull /var/www/emoncms/Modules/config
* master
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

git pull /var/www/emoncms/Modules/wifi
* master
Already up-to-date.
git pull /var/www/emoncms/Modules/dashboard
* low-write
Already up-to-date.

git pull /var/www/emoncms/Modules/graph
* master
Already up-to-date.

git pull /home/pi/postprocess
Already on 'emonpi'
Already up-to-date.
git pull /home/pi/backup
* master
Already up-to-date.

update mqtt_input systemd unit file
cp: cannot stat `/var/www/emoncms/scripts/mqtt_input.service': No such file or directory
sudo: systemctl: command not found

Update Emoncms database
[]

Restarting Services...
Restarting OpenEnergyMonitor emonHub: emonhub has been restarted ok.
Log is turned off
Restarting feedwriter
Log is turned off
Restarting emoncms-nodesJob is already running!


sudo: systemctl: command not found

set log rotate config owner to root
Restarting Services...


Start emonPi LCD service
Starting system emonPiLCD daemon:.

...................
emonPi update done
Tue Jan 17 15:22:31 UTC 2017

Filesystem is locked - Read Only access
type ' rpi-rw ' to unlock

Thanks,

Charles.

it seems you have an older June-2015 image which isn’t really fully compatible with the latest update routines. There have been a lot of changes since then and the latest image should be a little more “future proof”.

I would recommend downloading the latest image and flashing it to the SDcard (that involves taking one end off the emonPi to access the SDcard). We could probably work through the updates etc but you would still be running an old image, if you do not have data to save it would be better to change image now rather than struggle to fix what will always be out of date.

1 Like

Thanks Paul,

Is there a img I can download and just flash or do I need to flash Raspbian then compile from git?

Thanks,

Charles.

7th Nov 16 is the latest emonSD release, a pre-build SD card image can be downloaded from here: emonSD pre built SD card Download & Change Log · openenergymonitor/emonpi Wiki · GitHub

See instructions on that page for how to flash the image to an SD card.