Always broken data after restarting weewx

400 views
Skip to first unread message

Jochen Zink

unread,
Jul 3, 2018, 2:54:34 PM7/3/18
to weewx-user
Hello,

I have a vantage pro 2. It is connected via USB to a raspberry pi, running weewx 3.8.0. Everything runs normal. But, if I shutdown the pi (before I stopped weewx) and start it again a little bit later

1) After restart, I can see on the davis console, that the clock is out of tune
- clock was ok, before starting weewx
- raspberry time was ok

2) In the logs some strange messages appear:

Jul  3 20:26:24 nexus weewx[422]: vantage: LOOP try #1; error: Expected to read 99 chars; got 0 instead
Jul  3 20:26:24 nexus weewx[422]: vantage: Requesting 200 LOOP packets.
Jul  3 20:26:24 nexus weewx[422]: vantage: Rude wake up of console successful
Jul  3 20:26:28 nexus weewx[422]: vantage: LOOP try #2; error: Expected to read 99 chars; got 0 instead
Jul  3 20:26:28 nexus weewx[422]: vantage: Requesting 200 LOOP packets.
Jul  3 20:26:28 nexus weewx[422]: vantage: Rude wake up of console successful
Jul  3 20:26:32 nexus weewx[422]: vantage: LOOP try #3; error: Expected to read 99 chars; got 0 instead
Jul  3 20:26:32 nexus weewx[422]: vantage: Requesting 200 LOOP packets.
Jul  3 20:26:32 nexus weewx[422]: vantage: Rude wake up of console successful

3) no more records are added to the database

To solve the problem, I do the following
- stopping weewx
- correcting the time on the vantage pro
- using wee_device --dump to ensure, that all data is written to the database
- using wee_device --clear-memory to reset the state -> After that, weewex works like normal

The console was never restarted. It is reproduceable all the time, if I restart the pi

Does someone knows, what is wrong with my setup?

Thanks a lot
Regards
Jochen

Thomas Keffer

unread,
Jul 3, 2018, 3:04:48 PM7/3/18
to weewx-user
Hello, Jochen

There are many, many threads on this topic, as well as a Wiki entry.

In short, RPi's do not have a real-time clock. If you pull the plug on one it will, at best, restart with the last time it knew about or, at worst, a very old time. This can mess up the VantagePro's logger, requiring that the memory be cleared.

Follow the suggestions in the Wiki entry to get around this problem.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Beach

unread,
Jul 4, 2018, 9:44:58 AM7/4/18
to weewx-user
I'm new at this, too, but I had a similar problem. The Wiki post TK refers to is very useful. This this thread: Raspberry Pi 3, Time Set Wrong On Power Up Vantage Pro2 which started a long time ago will help, too. I restarted it because of time issues with my RPi Zero W and received lots of explanations and helpful suggestions. 

My summary: The easiest thing to do is use a RTC but I was keen on trying to get a software solution and, using suggestions in the thread, things seem to be working well now.

Best of luck. I love using the RPi since is draws about 50 mA of power when running. No need to keep a 'real' computer going.

David

David Beach

unread,
Jul 4, 2018, 9:49:18 AM7/4/18
to weewx-user
Small technical clarification/correction for the electrically astute: my RPi uses about 50 mA or so of current, not 'power'! Power, of course, is watts. So, at 5V the RPi power consumption seems to average around 1/4 of a watt.

David
Reply all
Reply to author
Forward
0 new messages