DIY weather station + Weewx on Raspberry Pi - how to join them?

713 views
Skip to first unread message

Tomasz Lewicki

unread,
Jul 24, 2020, 4:03:15 AM7/24/20
to weewx-user
Dear Weewx users.

It's my first post. I looked into wiki and docs but still are stuck so I ask here.

My configuration is as follows:

1. DIY solar powered WiFi weather station (built from here: https://www.instructables.com/id/Solar-Powered-WiFi-Weather-Station-V20/ - the project known to some of you, I suppose), based on Wemos D1 Mini Pro (ESP8266) with own IP address in local network

2. Raspberry Pi 3 used as cheap airplane tracking station (ADS-B stick).

Now I want to extend RPi with Weewx fed and weather station data.

Because my station is hand-made, I can't use any of standard hardware drivers. As far I installed Weewx with Simulator driver and it works - http://stationIP/weewx shows many plots and data. I was even able to send it periodically to my other, public available, webserver by FTP.

But of course I don't need fake, static data. I want to RPi with Weewx to communicate periodically with weather station, grab the data (or weather station push it periodically to RPi, which is the same, I suppose) and view it live via the webserver.

So finally I come to the important question: is such connection possible? I suppose yes, but my experience with such hardware is very poor and I don't know where should I go. I'm experienced Linux user so it is no problem in this field. I only expect that someone will point me in the right direction, some keyword to look for. Maybe someone has similar configuration and could help?

Mike Harold Chan

unread,
Jul 24, 2020, 8:34:18 AM7/24/20
to weewx...@googlegroups.com
cool wx sensor, but I wish will also include Rain collector, Solar and UV sensor and can be read with weather display, these are my important part too

--
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/5af14a7b-ac3c-481e-ba57-d8cee15cf136o%40googlegroups.com.

Tomasz Lewicki

unread,
Jul 24, 2020, 9:57:33 AM7/24/20
to weewx-user


W dniu piątek, 24 lipca 2020 14:34:18 UTC+2 użytkownik Mike Harold Chan napisał:
cool wx sensor, but I wish will also include Rain collector, Solar and UV sensor and can be read with weather display, these are my important part too


I will add some of them for sure - maybe without LCD display because it will be remote station - but now I need to gain some knowledge about publishing the data with Weewx. Any ideas?

Tom Keffer

unread,
Jul 24, 2020, 10:01:50 AM7/24/20
to weewx-user
Did you read the section Porting to new hardware in the Customizing Guide?

-tk

--

Tomasz Lewicki

unread,
Jul 24, 2020, 10:30:56 AM7/24/20
to weewx-user
W dniu piątek, 24 lipca 2020 16:01:50 UTC+2 użytkownik Tom Keffer napisał:
Did you read the section Porting to new hardware in the Customizing Guide?

Yes, I saw this chapter yesterday when sailing through docs ocean but it is rather for developers, I think. Unfortunately, my Python knowledge and coding skills are very low.

Rob Shorrock

unread,
Jul 26, 2020, 2:09:59 AM7/26/20
to weewx-user
I have been running weewx on a zeropi with wifi connected to my home network . The zeropi gets the weather station data through a usb connection to a Acurite 5in 1 PWS and I can access the weewx dashboard from my browser.  The weewx also uploads the data to a PWSWeather.com to allow viewing on the web. Unfortunately my Acurite has ceased functioning and I need a new system. Could a zeropi w  run software to read the sensors and load the data into weewx also running on the zeropi w ?. The zeropi runs at low loads when running weewx but may need extra hardware to read the analog sensors??

Norbert F

unread,
Jul 26, 2020, 11:30:40 AM7/26/20
to weewx-user

Michael Bruski

unread,
Jul 27, 2020, 8:16:37 PM7/27/20
to weewx-user

First of all you need to write some code on the Raspberry to get your sensor data from the Thingspeak channel they are written to.   This link  will give you an idea how to do that on the pi.  Once you are able to read all of your channels, you can write them to a temporary file and use the WeeWX extension fileParser to pick it up.   Check out this link for details.   I used it to setup a fileParser to collect my sensor info so that WeeWX could reap it and found the method works well.   My setup is somewhat different than yours in that I have my sensors connected directly to the RPi so I simply use my sensor program to read the data and then write it to a file.   WeeWX knows where to find that file and grabs it at the interval specified.  The author gives you a sample python program to create a data file containing your sensor data.

Hope that helps.

Tomasz Lewicki

unread,
Jul 28, 2020, 6:42:29 AM7/28/20
to weewx-user
Thank you all for the answers and tips. The right answer was MQTT and topics around it :)

Rob Shorrock

unread,
Jul 28, 2020, 7:59:36 AM7/28/20
to weewx...@googlegroups.com
Thanks , now that you showed me it's possible to get data into weewx I feel a zeropi weather station is the way to go. The zeropi would have to be located outside on the mast  with  the sensors and powered with a solar battery.  It might be a challenge getting an indoor temp sensor connected.







--
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/MwNOPj7is6E/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/a72d2d1d-7852-4be0-a8a7-71cd6b8a7722o%40googlegroups.com.

Norbert F

unread,
Jul 28, 2020, 9:31:22 AM7/28/20
to weewx-user
I use a ESP8266 with "tasmota" for my homemade Weatherstation. Its easy to configure, didnt need much power, sends mqtt. Tasmota knows the most Sensors by default and send all mqtt via wifi to weewx-mqttSubscribe driver.

Tomasz Lewicki

unread,
Jul 28, 2020, 9:42:41 AM7/28/20
to weewx-user
W dniu wtorek, 28 lipca 2020 15:31:22 UTC+2 użytkownik Norbert F napisał:
I use a ESP8266 with "tasmota" for my homemade Weatherstation. Its easy to configure, didnt need much power, sends mqtt. Tasmota knows the most Sensors by default and send all mqtt via wifi to weewx-mqttSubscribe driver.

I use ESPEasy instead of Tasmota but basically it is the same. Is your station powered by USB or solar panel?

Norbert F

unread,
Jul 28, 2020, 9:49:24 AM7/28/20
to weewx-user
Its USB powered because in Winter there is snow on the panel in my area and so solar dosent work.

Tomasz Lewicki

unread,
Jul 28, 2020, 10:02:06 AM7/28/20
to weewx-user
W dniu wtorek, 28 lipca 2020 15:49:24 UTC+2 użytkownik Norbert F napisał:
Its USB powered because in Winter there is snow on the panel in my area and so solar dosent work.

Yes, I'm afraid of this too. But I will install the station in such manner that I could remove the snow easily from the solar panel. Now I'm testing it at home, in the room, trying to "deep sleep" ESP8266 for 1 minutre, then wake, send the data and sleep again.

spydr

unread,
Jul 28, 2020, 10:28:53 AM7/28/20
to weewx-user
I have a similar setup. Multiple esp8266’s. Posting data to mqtt broker hosted on the rpi. From there you need the mqtt driver to get the data into weewx. I can troubleshoot the mqtt data with MQTTool. There are others.

Norbert F

unread,
Jul 28, 2020, 10:29:06 AM7/28/20
to weewx-user
I dont think its enough if you are in a area with "Winter", you have very short and flat sun and sometimes weeks with cloudy sky and nebula. I think you need a big panel and strong akkus.

Tomasz Lewicki

unread,
Jul 28, 2020, 10:47:54 AM7/28/20
to weewx-user

W dniu wtorek, 28 lipca 2020 16:29:06 UTC+2 użytkownik Norbert F napisał:
I dont think its enough if you are in a area with "Winter", you have very short and flat sun and sometimes weeks with cloudy sky and nebula. I think you need a big panel and strong akkus.

I don't know yet how my setup will work during winter. I live on latitude of 51 N .

Greg Troxel

unread,
Jul 28, 2020, 11:54:08 AM7/28/20
to Tomasz Lewicki, weewx-user
Tomasz Lewicki <sta...@poczta.onet.pl> writes:

> I don't know yet how my setup will work during winter. I live on latitude
> of 51 N .

I'm only at 42N, but find that here (Massachusetts) there is plenty of
sun in winter. You do need a clear souhern horizon.

The advice that you may need a bigger panel is wise. If you have a
battery that will run the station for a week, and a panel that will
recharge the battery in one sunny day, you will probably be ok.

Ángel Alonso Tubía

unread,
May 14, 2022, 4:00:12 PM5/14/22
to weewx-user
Hellow Tomaz. How did you discard all the "fake data" the simulator driver creates? 
Thanks a lot

Glenn Vadney

unread,
May 14, 2022, 5:09:08 PM5/14/22
to weewx-user
Delete the database at /var/lib/weewx/weewx.sdb and then recreate an empty database with "sudo wee_database --create".
Reply all
Reply to author
Forward
0 new messages