Feeds stopped working after firmware and emoncms upgrade

Hi Trystan, I have posted the results and error logs. Do you have any idea how to fix it or should I just do a fresh installation? If so, how to do it?



I’m not one of the experts but I was wondering if you had checked two places for timezones?

One is in the Setup > My Account and then look for Timezone:

And the other timezone is confirmed via SSH and then at the prompt type in date.

[email protected](ro):~$ date
Mon Aug 14 21:30:31 CDT 2017


If the timezone abbreviation is wrong it can be fixed with:

[email protected](rw):~$ sudo raspi-config

Current default time zone: 'America/Chicago'
Local time is now:      Mon Aug 14 21:50:42 CDT 2017.
Universal Time is now:  Tue Aug 15 02:50:42 UTC 2017.


  • 4 Localisation Options
  • I2 Change Timezone

To set time or fix timezone:

Sorry you’re going thru all of this. It shouldn’t be this hard!

Thanks Jon for your reply. I have checked my date in my account in emoncms and the timezone is correct. I am trying to check by SSH and now having problems logging in via SSH.

I am using putty with username: pi and password raspberry

I managed to login before but not it gives me error that authorization failed.

Is there a new password to login via SSH?
If I can do that , then the fault might be there is a timezone mismatch between emoncms and the firmware.

Hello philip, the password should be emonpi2016

@philip Do you have any schedules in Extras > Schedules ? Could you try rebuilding them to see if the issue is related to a configuration there?

ok, managed to login via SSH

checked the time settings as per Jon,

The current time is incorrect on emonpi

Emoncms local time (GMT +10) this is correct time

Emonpi via SSH time: Tue 15 Aug 11:26:59 UTC 2017 (this is incorrect time zone)

I have tried to update the time zone as per Jon’s instructions and then after I select everything and confirm , I get the below error:

“There was an error running option I2 Change Timezones”

I have no schedules setup.



Did you put sd card in writable mode? rpi-rw

thanks Ian. I forgot to make the file system writable. Anyhow, I managed to chang the time via SSH. It now matches and both times are synchronized
I rebooted but still cannot see the feeds page as it has the same problem.

I checked the json file out put and it seems to be the same error relating to the time zones.

json file output:

Fatal error: Uncaught exception ‘Exception’ with message ‘DateTimeZone::__construct(): Unknown or bad timezone ()’ in /var/www/emoncms/Modules/schedule/schedule_model.php:194 Stack trace: #0 /var/www/emoncms/Modules/schedule/schedule_model.php(194): DateTimeZone->__construct(’’) #1 /var/www/emoncms/Modules/schedule/schedule_model.php(147): Schedule->match_engine(NULL, NULL, ‘1502719200’, false) #2 /var/www/emoncms/Modules/schedule/schedule_processlist.php(54): Schedule->match(‘2’, ‘1502719200’) #3 [internal function]: Schedule_ProcessList->if_not_schedule_zero(‘2’, ‘1502719200’, 2979.4113769531, Array, Object(Process)) #4 /var/www/emoncms/Modules/process/process_model.php(60): call_user_func_array(Array, Array) #5 /var/www/emoncms/Modules/process/process_model.php(103): Process->__call(‘schedule__if_no…’, Array) #6 /var/www/emoncms/Modules/process/process_model.php(103): Process->schedule__if_not_schedule_zero(‘2’, ‘1502719200’, 2979.4113769531, Array) #7 /var/www/emoncms/Modules/feed/engine/VirtualFeed.php(84): Process in /var/www/emoncms/Modules/schedule/schedule_model.php on line 194

O dear!

@nchaveiro do you have any ideas?

From the error it looks like that schedule with id 2 got a NULL timezone.
Don’t know how it may happen from an upgrade, the setting is on the database. Corrupt database?
Schedules inherit the timezone of the user that last edited it.
Try to make any change to the schedule, save then revert and save again, it should update the database again.

Ok, I created a new schedule with expresion: Mon-Fri | 00:00-23:59 , saved it and viewed it . It displays message “schedule expression returned true” and some additional data. So it seems the schedule is working fine. I have rebooted and then checked the feeds page but have the same problem.

I think you are right about the database being corrupted. Is there a way I can reset the database back to default settings and I can start over again?
I think that to find the exact problem might take some time and it might be easier to just reset the whole emonpi back to factory settings with old firmware and then do the update to latest version. After that I can then create the feeds and it should be ok from there.

But did you try to edit the existing schedule that is giving the problem as i said?

@philip Can you paste a screenshot of your Schedules page?

actually there was no schedule there to edit in the first place. That is why I created a new one hoping that it would fix the issue.

Maybe it was an old schedule that I deleted before doing the upgrade that may be causing the issue.

If I take the SD card out of emonpi , can I format it and download all the files on it again and then reinstall it back into emonpi to reset the whole system?
I think the only way to fix the current problem is to poke around into the database to find the entry that is causing the issue and deleting it. But I dont know if that can be done or if it will be easier to just start afresh.

I’ve added a check for non-existant schedules on this commit:

ok, so I suppose I will just wait until that update is available. I am currently on version 9.8.8 and performing update shows that I am currently on latest version.

Hi Glyn, would you be able to send me a SD card with the current version so I can take out my current SD card and put in the new one and hopefully I can get the local feeds to work that way.

I am running 9.8.8 which seems to be the latest version and tried to update incase any changes but it says it is all up to date.

I think it is the only way as it seems the root cause is related to the schedule entry missing and the software can not seem to resolve itself.



You can download the image if you prefer. It will be a lot quicker. The actual download link is about 2 screens down the page.

1 Like

ok, I have eventually downloaded the image and created an image on a 4GB SD card. i am trying to swap over the SD cards on the emonpi but could not find any external slot for the SD card . I am assuming that I would have to open up the emonpi to get to the pcb board and change the SD card. Would that be the right procedure?

ok, managed to open up the emonpi and found the sd card. When I check it I discover it is 8gb and not 4gb. And it has three partitions: boot, 3.7gb volume and 4.0gb volume. The image I downloaded and prepared with etcher is only 2.7GB in size. How to do I transfer the downloaded image which is 2.7GB across to the sd card that is 8gb?
My 4GB SD card is bigger than the slot in the emon pi so I cannot install it. When I mount it in my computer , I see it has only two partitions, boot and 3.7GB volume.

Can I transfer the contents from the volumes from the 4gb SD card across to the 8GB respective volumes. eg. boot volume from 4gb SD card to boot volume on 8gb volume etc… I can just copy the files and folders across. Will that work?