Weewx on RPi Zero

251 views
Skip to first unread message

peter

unread,
Nov 18, 2019, 12:09:47 AM11/18/19
to weewx-user
Does weewx run OK on RPi Zero W? I want to connect a Vantage Envoy to the USB-on-the-go port.
Thanks!

Andrew Milner

unread,
Nov 18, 2019, 12:42:02 AM11/18/19
to weewx-user
see the wiki pages regarding RPi and weewx - especially with regards to RTC.

David VE3STI

unread,
Nov 18, 2019, 7:24:08 AM11/18/19
to weewx-user
I have been running WeeWX on an RPi Zero W connected to my Davis Vantage Vue for a couple of years. It is plenty fast enough for the modest processing requirements of WeeWX and can also run a web server for local network viewing of data. (I use NGINX.) It is very miserly on power (50-70 mA at 5V, as I recall) and has generally been reliable. The RTC issue has been an annoyance but I think this affects all RPi models and is not specifically a RPi Zero W issue. I eventually solved/avoided the problem with a UPS.

Do read the wiki pages.

David

peter

unread,
Nov 18, 2019, 7:32:18 AM11/18/19
to weewx-user
Thank you both for your answers, I'm sorry for my ignorance but by RTC you meant the realtime clock, or?
Maybe I'm wrong but my Pi zero w holds the time quite well. The one I intend to install for the Vantage station is going to be on the UPS anyway so no reboots are foreseen (hopefully).
I have a standard RPi 3 working with Vantage Vue for months and also one with WeatherFlow with no issues.

I'll definitely check the wiki pages once more (y).

Thanks.

Dne ponedeljek, 18. november 2019 13.24.08 UTC+1 je oseba David VE3STI napisala:

David VE3STI

unread,
Nov 18, 2019, 7:52:38 AM11/18/19
to weewx-user
The problems occur during the startup, before the RPi sets its clock from the Internet, and appear to be issues with the RPi and the Davis equipment disagreeing on the time and getting muddled. It has been the topic of much discussion and you can read the gory details in the wiki. I won't go into the details here. If you have a UPS and rarely reboot, it becomes almost a non-issue.

David

Leon Shaner

unread,
Nov 18, 2019, 9:29:12 AM11/18/19
to weewx...@googlegroups.com
Runs great on my RPI Zero W(H).
Only issue is the rampant memory leak plaguing many will manifest more frequently on a RPI Zero W because it only has 512MB RAM. Hopefully the leak will be fixed soon.

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)

> On Nov 18, 2019, at 12:09 AM, peter <pete...@gmail.com> wrote:
>
> Does weewx run OK on RPi Zero W? I want to connect a Vantage Envoy to the USB-on-the-go port.
> Thanks!
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1531b2f1-fcc3-4c34-bfa2-b07a5b0b4283%40googlegroups.com.

Thomas Keffer

unread,
Nov 18, 2019, 9:39:32 AM11/18/19
to weewx-user
Only issue is the rampant memory leak plaguing many will manifest more frequently on a RPI Zero W because it only has 512MB RAM.  Hopefully the leak will be fixed soon.

Just for the record: the leak is in the underlying Debian drivers or, possibly, Python 2.7 --- not in WeeWX. 

Upgrading operating systems can definitely help. Upgrading my OS from Debian 9.8 to 9.11 fixed my problem.

-tk

Leon Shaner

unread,
Nov 18, 2019, 12:26:15 PM11/18/19
to weewx...@googlegroups.com, Thomas Keffer
Tom,

Did I also see a reference to refactoring some SQL connection code, also having a positive effect on the memory leak?

Regards,
\Leon

Thomas Keffer wrote:
--
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.

Thomas Keffer

unread,
Nov 18, 2019, 12:32:59 PM11/18/19
to Leon Shaner, weewx-user
Yes. See PR #467, to appear in V4.0.

-tk

vince

unread,
Nov 18, 2019, 1:45:59 PM11/18/19
to weewx-user
On Monday, November 18, 2019 at 6:39:32 AM UTC-8, Thomas Keffer wrote:
Upgrading operating systems can definitely help. Upgrading my OS from Debian 9.8 to 9.11 fixed my problem.



FWIW, I recently instrumented my 4.0b1 pi4 running current Raspbian based on 10.0 and see 'no' memory leak in almost a day of uptime.

Susan Mackay

unread,
Nov 18, 2019, 9:31:59 PM11/18/19
to weewx-user
I use an RPi Zero W for Weewx and Nginx as well.
I use systemd to manage it and have pre-requisites that the 'ntp.service' and 'time-sync.service' have completed before it will start.
Susan

David Beach

unread,
Nov 19, 2019, 1:18:46 PM11/19/19
to weewx...@googlegroups.com
Susan: Do you have a Davis system? The reason I ask is that, from my reading of the comments over the last few years, this 'argument' between the RPi starting up and the weather station hardware may be limited to the Davis systems with their logging interface. Would you be willing to share your coding/scripts/etc with the rest of us? Although I have added an RTC and a UPS, I wish that my system was robust enough to reliably deal with power interruptions without these additions. (The RTC and UPS cost more than the RPi!)

David

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/I5C5Wqvtw7c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c6136128-8d33-450f-84b0-e70e75c49330%40googlegroups.com.

Andrew Milner

unread,
Nov 19, 2019, 1:35:51 PM11/19/19
to weewx-user
for what it is worth I do not use a UPS - and we get frequent power outages here.  I do use a usb hard drive though instead of the SD card on my rpi.  Weewx has always recovered the data from my current davis and my earlier fineoffset without any issues, so i see no need for a ups.  Anyways sometimes our outages are for 3,4,5 hours so it is doubtful the ups would keep things running anyway even if I had one.  I do have an RTC installed to make sure there are no hiccups in recovering the data from the station logger though!!

To unsubscribe from this group and all its topics, send an email to weewx...@googlegroups.com.

Les Niles

unread,
Nov 19, 2019, 4:14:49 PM11/19/19
to weewx...@googlegroups.com
Likewise — I have an RTC but no UPS on an RPi 3, and have zero problems with data loss or corruption due to power failures from a few seconds to several days in duration.  The only issue is if the RPi is down for the 10-15 days that it takes the Davis logger’s memory to overflow.  

Going back to the original question on this thread, the RTC should work just as easily with a Pi Zero as with a full-sized Raspberry Pi. IIRC the RTC module is about $4 so not a huge expense.

  -Les

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/44bc2cd3-0c5d-45d1-8f6d-1913424916d0%40googlegroups.com.

Susan Mackay

unread,
Nov 19, 2019, 8:54:42 PM11/19/19
to weewx-user
No - I have an HP1000 clone.

As for the systemd file (which is /etc/systemd/system/weewx.service on my RPi) it is:

# systemd configuration for weewx

[Unit]
Description=weewx weather system
Requires=syslog.service
Requires=ntp.service
Requires=time-sync.target
Requires=network-online.target
After=syslog.service
After=ntp.service
After=network-online.target
After=time-sync.target
RequiresMountsFor=/home
RequiresMountsFor=/home/weewx

[Service]
ExecStart=/home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
PIDFile=/var/run/weewx.pid
#User=weewx
#Group=weewx
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target


You can forget the lines about 'RequiresMountFor' - I have all of the weewx files held on a NAS (which also helps reduce the wear on the SD card in the RPi) and these just make sure that the NAS drive is mounted before it tries to access the files.
Also change the references to '/home/weewx/ to wherever your files are located.
Susan

peter

unread,
Nov 19, 2019, 11:30:54 PM11/19/19
to weewx-user
Thank you all for all suggestions and description.
From what I understand I can keep the original weewx running and just create another script, database and conf file. I have the WeatherFlow right now and will add Davis.
I’ll report how it goes.

Gary Laurance

unread,
Nov 22, 2019, 11:13:15 AM11/22/19
to weewx-user
I am thinking of doing the same, please let me know how it works for you and if you have any problems using the zero.

Gary Laurance

unread,
Nov 22, 2019, 11:14:44 AM11/22/19
to weewx-user
except mine will be with a Acurite 5in1 system.


On Monday, November 18, 2019 at 12:09:47 AM UTC-5, peter wrote:
Reply all
Reply to author
Forward
0 new messages