Hi there, I decided it was time to upgrade my emonbase, which is running “low-write 9.7.9 2017.01.05”; and emonSD-07Nov16 and had a few issues which I have solved and thought I would share in case others encounter the same problem. I started by making a copy of the SD Card, and I was looking forward to using the built-in upgrade option within the emoncms web interface Setup>Administration>Update Now
A window appeared showing the output from the update process, and there were various errors so I started to investigate on OEM site. It took me a while before I realised the output that appeared in the window was actually from the last time I updated in 2017! Yes there is a date which said “Mon 30 Jan 22:39:50 UTC 2017” but as it was from 18 months ago, I assumed it was some reference to the old version, and not the date that the update process ran. After all, it appeared in the update window, which I thought was the result of me pressing the update button, so it must be messages from today ? Well I now believe that the window just shows what is in /home/pi/data/emonpiupdate.log which in my case had not been updated…
And the reason the log file had not been updated, was that service-runner was not running on my Pi (this is my test Pi, that doesn’t process real data and at some point I had stopped service-runner). I manually started service-runner, and the update started running. I presume that clicking the update button must just set a flag in a file that service-runner monitors, so by restarting service-runner it launched the update in the background. Thankfully it was all logged to the emonpiupdate.log so I could still check the results.
[During my investigations, I was confused by various posts and the FAQ that explained the difference between the “emonPi Update” button and “EmonBase Update” button, because my version had neither of these buttons, but it had a button called “Update Now”. The “Update Now” button was replaced in version 9.8.0 with the two new buttons, and I had been using 9.7.9 so I had the one old button. Perhaps worth a brief mention in the FAQ for anyone else updating a system from pre-Jan 2017 (I read several posts from people who were updating systems for first time in 3 years)]
After the update finished, the emoncms web interface only showed a message about needing to update settings.php, and suggested comparing the current file to a default.settings.php. When I did this compare I found the default file did not have the standard userids and passwords for the various services (php, redis, mqtt) which were in my settings.php file. But I found a post on OEM that suggested using default.emonpi.settings.php. I compared this to my settings file, and all the userids & passwords matched, and the only difference was some new settings for Cassandra and some colour themes. So I copied the emonpi.settings over my settings.php and then the web interface loaded.
Except I couldn’t login due to the “Database error, you may need to run database update” error. Thankfully I found this post and ran the update from command line, and was then able to login. It appeared that the reason the DB update was not run by the update process was due to the issue with settings.php.
emonpiupdate.txt (64.4 KB)
Ian