Have been running emoncms on my new emonpi for several days with no issues. However, I had to reset my wifi and found that everything had stopped updating (Updated column shows as"60 mins ago" in both nodes and feeds). I have tried deleting the feeds and creating new ones but this has not helped. The live values are updating as expected but nothing is being logged. I also note my new feed IDs start after the feed IDs of the ones I deleted.
Any help appreciated
Jez
Re: Problem with emoncms on emonpi
Update - seem to be getting logged data now - but the Updated column is still showing as "60 mins ago" even though logging is at 10s intervals. Could this be something to do with a mismatch between time stamps?
Jez
Re: Problem with emoncms on emonpi
Update - I seem to be getting data now but the Updated column is still showing as "60 mins ago". I am presuming that this is a timestamp mismatch issue. Do I need to reset a time somewhere?
Jez
Re: Problem with emoncms on emonpi
Hello Jez this sounds like an error caused by a timezone on the pi not being correct after the wifi reset. The easiest way to force a reset is to reboot the raspberrypi, alternatively its possible to login via SSH and run "sudo service ntp restart", We are planning to add a script in there to keep updating the time automatically to avoid this issue
Re: Problem with emoncms on emonpi
Trystan - I have tried rebooting the emonPi - but the Pi time stamp is still an hour behind.
Jez
Re: Problem with emoncms on emonpi
It would help to know where the error is creeping in, if you go to the emonhub tab and view the logs the time and date of each message should reflect local timezone whilst the timestamps within the messages are UTC times displayed as values such as 1433790039 are seconds since 1/1/1970 00:00:00 and and can be converted using sites such as http://www.epochconverter.com/ .
if you are able to ssh in to the pi the date command will confirm the current time setting too.
Paul
Re: Problem with emoncms on emonpi
Paul
Time and date of emonhub messages and timestamps within the messages are the same - and are 1 hour behind actual time in BST.
Jez
Re: Problem with emoncms on emonpi
Okay so UTC is tracking correctly and the Pi's OS is running in the default UTC timezone, which raises the question what makes emoncms believe the data is an hour old when it's reference should be the same time?
I'm guessing you have set the timezone as +1hr in emoncms, if you have then I think emoncms is either assuming the timestamps received are localtime and removing an hour or the +1 hr timezone adjustment is being used to alter UTC rather than localtime.
Can you try removing the +1hr ? does the "60mins ago" change to a number of seconds value?
You could also try changing the OS local timezone sudo dpkg-reconfigure tzdata selecting Europe then London should give you this confirmation
Then emonhub's logs should show the local time on the left, I don't expect this to impact emoncms though as it appears emoncms doesn't use the Pi's localtime but it would be good to confirm that.
Paul
Re: Problem with emoncms on emonpi
Paul
The timezone in "My Profile" is set as UTC +0:00, so I don't think I have set the timezone as +1hr. I have just changed it to -1hr to see what happens but it did not have any effect on the update times - these are still 60mins.
Jez
Re: Problem with emoncms on emonpi
Well that's bazaar! and a bit beyond my limited knowledge of emoncms, I'm afraid.
Paul
Re: Problem with emoncms on emonpi
Update - after a few minutes I have now seen a response to the change in timezone to UTC -1:00. Nodes and Feeds now show they are being updated by a few seconds as was the case when I first set up the system. The solar graphing app is also looking OK. Final solution is clearly to reset the time on the Pi as suggested by Trystan and reset the timezone back to UTC 0:00. I will live with my temporary fix for now and wait for Trystan's new script to update the Pi time.
Thanks for the help
Jez
Re: Problem with emoncms on emonpi
This is a separate issue, The Pi's time appears correct as that is used directly in the emonhub.log. The issue Trystan refers to only occurs if there is no internet connection at bootup AND the retained copy is not accessible due to it's location not being mounted at that time.
see http://openenergymonitor.org/emon/node/5877 for more info.
Paul