emonpi not logging

EmonPi shows data from sensors, cannot log locally.

Recently received emonpi, set it up per video guides.

Using one CT and AC-AC wave monitor.

Nodes screen shows all nodes inactive but data values correct and CT values change correctly as load changes.

Created Feeds but cannot see any logging occurring.

Been monitoring for 48 hours. 

pb66's picture

Re: emonpi not logging

Was it connected to the internet at boot up? if you go to the emonhub page and check the log what time and date do you see for the log entries? any mention of 1970?

It would be helpful if you could post some emonhub.log and possibly some emoncms.log for us to see what is happening.

Paul

wattsupdoc's picture

Re: emonpi not logging

Thanks Paul, 

Below last few lines of emoncms.los and emonhub.log after refreshing each several times.

I note dates are 2015/6/17 and time is incorrect. I set time offset to UTC-8 at initial turn on and acct setup.

It must be that emonpi needs to get time and date from network time/date server? 

I was hoping to use it for local logging at my well pump which is too distant from house router to get wifi and be on home network or web.

emoncms.log

2015-6-17 14:54:46 MQTT INFO Reloading config

2015-6-17 14:54:48 MQTT INFO Received mqtt message: emonhub/rx/5/values 335,0,335,247.44,0,0,0,0,0,0,0

2015-6-17 14:54:52 MQTT INFO Reloading config

2015-6-17 14:54:53 MQTT INFO Received mqtt message: emonhub/rx/5/values 334,0,334,247.46,0,0,0,0,0,0,0

2015-6-17 14:54:58 MQTT INFO Reloading config

2015-6-17 14:55:03 MQTT INFO Received mqtt message: emonhub/rx/5/values 333,0,333,246.89,0,0,0,0,0,0,0

2015-6-17 14:55:04 MQTT INFO Reloading config

emonhub.log

2015-6-17 14:51:48 MQTT INFO Received mqtt message: emonhub/rx/5/values 335,0,335,247.86,0,0,0,0,0,0,0

2015-6-17 14:51:52 MQTT INFO Reloading config

2015-6-17 14:51:53 MQTT INFO Received mqtt message: emonhub/rx/5/values 332,0,332,247.81,0,0,0,0,0,0,0

2015-6-17 14:51:58 MQTT INFO Reloading config

2015-6-17 14:52:03 MQTT INFO Received mqtt message: emonhub/rx/5/values 339,0,339,247.51,0,0,0,0,0,0,0

2015-6-17 14:52:04 MQTT INFO Reloading config

2015-6-17 14:52:08 MQTT INFO Received mqtt message: emonhub/rx/5/values 338,0,338,246.65,0,0,0,0,0,0,0

2015-6-17 14:52:10 MQTT INFO Reloading config

2015-6-17 14:52:16 MQTT INFO Reloading config

2015-6-17 14:52:18 MQTT INFO Received mqtt message: emonhub/rx/5/values 333,0,333,247.02,0,0,0,0,0,0,0

2015-6-17 14:52:22 MQTT INFO Reloading config

2015-6-17 14:52:23 MQTT INFO Received mqtt message: emonhub/rx/5/values 338,0,338,247.73,0,0,0,0,0,0,0

2015-6-17 14:52:28 MQTT INFO Reloading config

2015-6-17 14:52:33 MQTT INFO Received mqtt message: emonhub/rx/5/values 334,0,334,247.62,0,0,0,0,0,0,0​

Regards, 

Tim

 

 

 

wattsupdoc's picture

Re: emonpi not logging

Thanks Paul, 

It was not connected directly to internet at boot up.

emonpi was connected to my pc with ethernet cable, the pc was on home wifi network and pc was connected to internet over wifi. 

Below are logs requested after refreshing each several times, I note the date and time are incorrect. 

Does emonpi need to get date/time from an internet time/date server at initial boot up?

I was going to log power and time directly at my well pump which is too distant from router to get wifi signal. 

emonhub.log

2015-6-17 14:51:48 MQTT INFO Received mqtt message: emonhub/rx/5/values 335,0,335,247.86,0,0,0,0,0,0,0

2015-6-17 14:51:52 MQTT INFO Reloading config

2015-6-17 14:51:53 MQTT INFO Received mqtt message: emonhub/rx/5/values 332,0,332,247.81,0,0,0,0,0,0,0

2015-6-17 14:51:58 MQTT INFO Reloading config

2015-6-17 14:52:03 MQTT INFO Received mqtt message: emonhub/rx/5/values 339,0,339,247.51,0,0,0,0,0,0,0

2015-6-17 14:52:04 MQTT INFO Reloading config

2015-6-17 14:52:08 MQTT INFO Received mqtt message: emonhub/rx/5/values 338,0,338,246.65,0,0,0,0,0,0,0

2015-6-17 14:52:10 MQTT INFO Reloading config

2015-6-17 14:52:16 MQTT INFO Reloading config

2015-6-17 14:52:18 MQTT INFO Received mqtt message: emonhub/rx/5/values 333,0,333,247.02,0,0,0,0,0,0,0

2015-6-17 14:52:22 MQTT INFO Reloading config

2015-6-17 14:52:23 MQTT INFO Received mqtt message: emonhub/rx/5/values 338,0,338,247.73,0,0,0,0,0,0,0

2015-6-17 14:52:28 MQTT INFO Reloading config

2015-6-17 14:52:33 MQTT INFO Received mqtt message: emonhub/rx/5/values 334,0,334,247.62,0,0,0,0,0,0,0

emoncms.log

2015-6-17 14:54:46 MQTT INFO Reloading config

2015-6-17 14:54:48 MQTT INFO Received mqtt message: emonhub/rx/5/values 335,0,335,247.44,0,0,0,0,0,0,0

2015-6-17 14:54:52 MQTT INFO Reloading config

2015-6-17 14:54:53 MQTT INFO Received mqtt message: emonhub/rx/5/values 334,0,334,247.46,0,0,0,0,0,0,0

2015-6-17 14:54:58 MQTT INFO Reloading config

2015-6-17 14:55:03 MQTT INFO Received mqtt message: emonhub/rx/5/values 333,0,333,246.89,0,0,0,0,0,0,0

2015-6-17 14:55:04 MQTT INFO Reloading config

​If this posts twice, I apologize, may have made mistake on first reply. 

Regards, 

Tim

pb66's picture

Re: emonpi not logging

The Pi has no real time keeping hardware so the Raspbian OS has way of using the last known time and counting from there, this is relatively accurate if the Pi is running 24/7 and will only become inaccurate if there is downtime as it cannot time/count when shut down and/or any ungraceful shutdowns before saving ie if it last saved the current time 0.5hrs ago and it crashes, on reboot it will revert to the last saved time and be 0.5hrs "slow" or "behind" (plus any downtime).

This backing up of the time is effectively disabled by running raspbian read-only, therefore the time you see will be the time the image was written and it will remain at that time and date each time you reboot until the Pi has an internet connection at the same as being in read and write mode. This doesn't cause an issue in the majority of cases that have a permanent internet connection but needs a slight mod to accommodate the read-only OS. (You can read more on this in the 
Read-only image time issues thread should you wish to)

I would recommend installing "ntp-back-up" which will allow the OS's time keeping software to work as intended and the current time will be saved once per hour and at a controlled shutdown, depending on stability and your power supply this has the potential of being accurate to within seconds per year, and it will also allow the Pi to correct itself if an internet connection is detected at any time, 

This last point maybe of interest if you have a "hotspot" providing mobile phone and the emonPi has wifi dongle as anytime you visit the site you can enable the hotspot while you are there and the emonPi will update its time keeping automatically.

You could alternatively fit an RTC which has been documented (by Glyn I believe) but I cannot recall if it will still fit in the emonPi case off-hand, 

Having said all that I cannot be sure it is the cause of this issue as in theory it doesn't know it's not the right time as both emoncms and emonhub are using the same time (albeit wrong), the issue is more likely to show up when emonhub and emoncms are on different machines.

To eliminate this as a possible try rebooting with a (direct?) internet connection and recheck the time and see if that kick starts the logging.

Paul

wattsupdoc's picture

Re: emonpi not logging

Thanks for info. EmonPi works correct with direct wired internet connection.

I installed an outdoor client server wifi connected to home network and wired to emonpi. 

Now logging fine at location needed and I can monitor remotely on network.

May look into rtc and/or ntp-backup later, but I think the remote client server suits best right now.

Again, thanks for all info and help.

Regads, 

Tim

pb66's picture

Re: emonpi not logging

Glad you got it sorted, BUT unless the "saved time" is updated the issue is only gone for as long as the Pi can boot with a active network connection, eg a power disruption where the Pi recoveres before your router has established a connection will result in the last recorded time (image creation?) being used and if it is too far in the past an active internet connection coming online will not correct it so it will be faulty until the pi is rebooted again.

The Raspbian OS has the fake-hwclock to prevent these problems but the "read-only" breaks it, the ntp-backup only allows the original OS stuff to do its thing as intended, nothing more. If running read-only you should have the ntp-backup installed. ntp-backup is a bit like the insurance policy you wish you had taken out beforehand,

Paul

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.