One more option for Build Your Own enthusiasts

725 views
Skip to first unread message

Louis De Lange

unread,
Dec 11, 2018, 10:53:25 PM12/11/18
to weewx-user
I recently came across a really excellent solution for putting together your own weather station on the cheap with high quality sensors - and most importantly a very useful weather HAT to use with a Raspberry PI to connect all the sensors.

It comes complete with a 4 part step by step tutorial to assemble the whole station, and basic code to upload the data to and online service - see link below:


I completed my own installation based on the instructions in the tutorial and my station running on weewx is active at the link below


For the outdoor portion I used a Raspberry Pi Zero W, with the weather HAT.  Weewx is running indoors in a FreeBSD jail, using a stock Interceptor driver.  I modified the basic upload code provided in the tutorial quite extensively to generate upload loops that matched the Observer URLs supported by the Interceptor driver, and also to produce derived observations not included in the original code.

The upload code is attached for anyone who might be interested in trying to assemble their own.

I   tested the results from using the station against my Vantage Pro 2 and so far it seems to be pretty close - for less than 20% of the cost of a Vantage Pro.
mystation.py

P Simmons

unread,
Dec 12, 2018, 11:24:48 AM12/12/18
to weewx-user
Please define "pretty close".
Thanks!

Louis De Lange

unread,
Dec 12, 2018, 2:45:17 PM12/12/18
to weewx-user


On Wednesday, 12 December 2018 08:24:48 UTC-8, P Simmons wrote:
 
Please define "pretty close".
Thanks!
 
Check it out for yourself on the website below.  

The only thing that is slightly off is the humidity and this is due to the mounting of the sensor in a box that allows the temperature inside the box to be about 2 - 3 Celsius higher than the true outdoor temp.  When I take the lid off the box and expose the sensor to the proper outdoor temperature, the humidity reading is within 1% of the Vantage reading, with no calibration.  I have a new Stevenson screen on order to improve the sensor location, so that should fix the humidity issue.  I could fix it through calibration but I prefer to do it properly.

Reference Weather Station - Vantage Pro 2

New homebrew station

Colin Larsen

unread,
Dec 12, 2018, 3:13:42 PM12/12/18
to weewx...@googlegroups.com
Yeah the BME280 is usually very accurate in my experience. There is no reason for this station not to perform as good as any other. The only initial item I would add would be outdoor humidity, rather than indoor or as well as. The DS18 temp sensor is an oldy but a goody but an SHT31 or similar would be better I think. Although you may need I2C bus extenders to take that outside.

I'm using a WeatherDuino kit which is Arduino based but really easy to get up and going and very flexible. It also includes options for solar and UV which I wanted


Cheers
Colin

--
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.

Pat

unread,
Dec 12, 2018, 8:05:20 PM12/12/18
to weewx-user
This looks like a great kit! I have the start of a DIY kit that I look at every now and then but haven't done anything with it. I bought a Davis VP2+ instead :) 

This makes me think about picking up the kit to tinker around with

Louis De Lange

unread,
Dec 13, 2018, 9:37:20 AM12/13/18
to weewx-user
Pat, one more thing that's is really useful is that the weather board has an extra RJ11 connector with 3 spare analog input channels that can me used for additional sensors such as solar, etc.

Pat

unread,
Dec 13, 2018, 7:37:05 PM12/13/18
to weewx-user
The only downside I can see to this is that the BME280 is above the Pi, so it's gotta be picking up ambient heat coming off the Pi itself. I noticed that with my setup I have now - I'm using a Moteino to receive Davis ISS packets (a very involved DIY project), and when I had the Moteino and BME280 on top of the Pi the temperature was off from the console. As soon as I moved it to the side away from the Pi it matched the console exactly. 

The BME280 is a very sensitive device. Surprisingly enough I have 2 from Adafruit which were bad. I bought a cheapo $9 off Amazon and it's been perfect (in that it matches the Davis console exactly on temp/humidity/barometer).

Photo attached of the Pi and Moteino. It's not on the window sill anymore.. it's on my desk which is further away, but still works great! 
moteino.png

Wes Witt

unread,
Dec 13, 2018, 7:55:39 PM12/13/18
to weewx-user
Pat is totally correct. I have an indoor weather display using a 7" LCD display with a Pi attached to the back. I started out with a BME280 attached to the back of the Pi and connected via GPIO. It worked great but the temp was always high. I tried many things to make it accurate but in the end decided that it was not possible. I ended up building a remote sensor board using an ESP8266. This works flawlessly and yields a very accurate reading always.

Colin Larsen

unread,
Dec 13, 2018, 8:02:34 PM12/13/18
to weewx...@googlegroups.com
Yep I always mount them remotely too, even a few inches away is good

--

George Nimrodel

unread,
Nov 23, 2019, 4:06:57 PM11/23/19
to weewx-user
Hey Louis,

I'm trying to do exactly what you've done with the difference that I have weewx running on the RPi and I'm using only the BME280 for temperature in a separate enclosure.

I'm having a bit of a trouble with your code. I keep getting errors regarding the libraries.

I've noticed that you are not using the python 3 libraries from the tutorial.

I would appreciate it if you could tell me which steps you took that are not included in the tutorial in order for your code to work.

Any other pointers would also be appreciated

Thank in advance!

Louis De Lange

unread,
Nov 24, 2019, 12:15:17 PM11/24/19
to weewx-user
George,

At the time when I completed that project the tutorial on the BC-Robotics website was written in Python 2.7 so I used all the 2.7 libraries in my code.  With some research you should be able to convert the original code to work with python 3 libraries.

Sorry, I have not updated anything because if it works why break it.

LDL

George Nimrodel

unread,
Nov 24, 2019, 1:25:09 PM11/24/19
to weewx...@googlegroups.com
Louis,

thank you very much for your reply.

I didn't realize they first did it with Python 2.7. I though you used it in order for it to work with the interceptor driver.

I'll keep using python 2.7 and your code but it seems that I'm missing some libraries.

(I think I had them all but I keep getting a " BME280_OSAMPLE_8' is not defined " etc. errors) 

I'll try and find the original code and libraries for Python 2.7 and do the necessary adjustments.

Thanks again!

--
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/udZCCCJlNE8/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/db1a607e-3fb0-4ed1-974e-0930406e7e6a%40googlegroups.com.

rdud...@gmail.com

unread,
Feb 13, 2021, 9:02:37 AM2/13/21
to weewx-user
I am trying to install the WeeWX BC Robotics driver created by Davis Enst and it will not load.  Does anyone have detailed instruction on how to load this driver.
Thanks
Ray

gjr80

unread,
Feb 13, 2021, 12:54:34 PM2/13/21
to weewx-user
Hi,

If you give us a bit more info someone might be able to help you. Is the driver you are referring to the driver attached to the first post of this thread? Or something else? What version of WeeWX are you using and are you running WeeWX under python 2 or python 3? If you are getting errors when starting WeeWX can you post the log from WeeWX startup through until the error occurs?

Gary

rdud...@gmail.com

unread,
Feb 13, 2021, 4:28:57 PM2/13/21
to weewx-user
Thanks Gary,

I am using the latest Raspberry Pi OS, Python 2.7.16 and Weewx 4.4.0.

The driver that I am unable to install is for a BC Robotics HAT that interface various weather instrument to WeeWX and can be found here:
I am able to start  weewx using the simulator option.

I have tried to install the BC Robotic driver using the  "wee_extension --install BCRobotics.zip" command found in the read.me instructions.  Once I execute this command I do see a response which appears to be successful, however when I execute the  "wee_config --reconfigure" command which give me configuration options for various weather hardware the BC Robotic hardware is not available as an option...How do I invoke the BC Robotic driver?

gjr80

unread,
Feb 13, 2021, 8:23:27 PM2/13/21
to weewx-user
OK. Should work. Can you redo the install and reconfigure capturing and pasting here everything that you type and the exact responses you get.

Also be aware the driver makes some poor choices and forces your database to Metric units. This in itself is not a problem, but if you have installed and started WeeWX with another driver such as the simulator then you will likely have a US customary database and that will cause an error. Easy solution is to delete the database (if it exists) before starting WeeWX after installing the driver. The driver also forces the Standard skin to display obs with Metric units, if you are using the Seasons skin it will be unaffected but if using the Standard skin and you prefer other units that is just a cosmetic problem and easily fixed in weewx.conf under [StdReport] [[StandardReport]] [[[Units]]] [[[[Groups]]]].

Gary

D R

unread,
Feb 13, 2021, 9:29:13 PM2/13/21
to weewx...@googlegroups.com
I apologize for not having come up with the answer on my own.  I have
gone through the User and Customization guides and am just not finding
clear guidance as to what to do, despite there being a lot of info in
those documents.


What I want to do is add a line to the collection of items in the left
hand "Current Condtions" list.  This section preceeds the "Celestial"
and "High Low" portions of that column, and lies to the left of the
graphs for the day.

From my reading, I assumed that the area I was looking for would be in
the /etc/weewx/skins/Seasons directory, in the 'skins.conf' file.  Yet
as I scan through there I cannot find a series of entries that matches
the fixed output that would then have the data to display and formatting
info right after it.

I've looked at the Standard report, and the skins.conf there, and
haven't found what I'm looking for.

Despite fiddling with this for a couple weeks trying to figure it out on
my own, I'm just not making the connection or am really looking in the
wrong spot.


Where does this section of the home page get formatted and while I think
I know what I want to add so it shows up as the temperature change from
24 hours ago, don't just want to start changing things which would no
doubt give an error if not done carefully.

Can someone give me a hint as to what I'm missing to find the correct file?

Dale


Tom Keffer

unread,
Feb 14, 2021, 7:59:48 AM2/14/21
to weewx-user
The Cheetah template for "Current Conditions" is the file /etc/weewx/skins/Seasons.current.inc. When the processing of templates occurs, it will get "included" into index.html.tmpl.

So, if you wanted to add the current conditions for a new type, say something named 'myobs', to the bottom of the list of observations, you would add the highlighted lines

...
#if $day.extraTemp3.has_data
      <tr>
        <td class="label">$obs.label.extraTemp3</td>
        <td class="data">$current.extraTemp3</td>
      </tr>
#end if
      <tr>
        <td class="label">My new observation</td>
        <td class="data">$current.myobs
      </tr>
    </tbody>
  </table>


This assumes, of course, that the type 'myobs' exists in the database and/or the archive record.

-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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0aad41a8-e703-6a30-df85-e13811cd48fa%40gmail.com.
Message has been deleted

Tom Keffer

unread,
Feb 16, 2021, 6:19:04 PM2/16/21
to weewx-user
I'm sorry, but I'm not seeing the connection to adding new types to HTML pages. Am I missing something? Is a new type involved?

On Tue, Feb 16, 2021 at 3:15 PM Terry Steneker <terry.s...@gmail.com> wrote:
I just purchased the BCRobotics board and tried to install the required software for it. I ran into problems when I tried to test the BME280 using the Adafruit ADS1x15 library. Kept getting errors and the python Adafruit_BME280 library is deprecated. 

Instead of trying to fix the errors I went the hard way and upgraded to the adafruit-circuitpython libraries so I can also run Python3

sudo pip3 install adafruit-circuitpython-bme280

sudo pip3 install adafruit-circuitpython-ads1x15

I then modified the BCRobotics-test-app.py to run under Python3 and the upgraded Adafruit libraries.
Tested the program and it works!

I have attached the modified program.

I need to modify the driver to work the same as the updated code but not sure how to do that. Can I just substitute the same modifications that I made to the test program? 

Thanks
Terry

terry.s...@gmail.com

unread,
Feb 16, 2021, 6:21:18 PM2/16/21
to weewx...@googlegroups.com

Sorry – my post was supposed to be connected to an earlier post. Wasn’t supposed to be related to this.

--
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/udZCCCJlNE8/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/CAPq0zEDo9naPZDR_hktak9y3pehDYztUgkXMfM3uvK%2BD-x%3DfsA%40mail.gmail.com.

Terry Steneker

unread,
Feb 16, 2021, 6:26:46 PM2/16/21
to weewx-user

I just purchased the BCRobotics board and tried to install the required software for it. I ran into problems when I tried to test the BME280 using the Adafruit ADS1x15 library. Kept getting errors and the python Adafruit_BME280 library is deprecated. 

Instead of trying to fix the errors I went the hard way and upgraded to the adafruit-circuitpython libraries so I can also run Python3

sudo pip3 install adafruit-circuitpython-bme280

sudo pip3 install adafruit-circuitpython-ads1x15

I then modified the BCRobotics-test-app.py to run under Python3 and the upgraded Adafruit libraries.
Tested the program and it works!

I have attached the modified program.

I need to modify the driver to work the same as the updated code but not sure how to do that. Can I just substitute the same modifications that I made to the test program? 

Thanks
Terry

test_weather.py

p q

unread,
Feb 16, 2021, 7:53:24 PM2/16/21
to weewx...@googlegroups.com
What driver are you using?
It's going to be really tough to help with this because you have unique hardware and aren't asking a very answerable question. 

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/3ddea820-bf91-44ff-9a93-90a3214241c3n%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Terry Steneker

unread,
Feb 16, 2021, 8:46:11 PM2/16/21
to weewx-user
I am using the driver located here: https://github.com/David-Enst/WeeWX-BCRobotics

I am also attaching the file
BCRobotics.py

p q

unread,
Feb 16, 2021, 9:45:15 PM2/16/21
to weewx...@googlegroups.com
Driver looks like it's written for Python2 (the give away to me is the print statement on the last line), so you might have a bit of fun fixing python2/python3 issues. Not too terribly difficult. If you could get the test program to work, you can probably get the driver to work too.



--
Peter Quinn
(415)794-2264

Terry Steneker

unread,
Feb 17, 2021, 10:19:02 AM2/17/21
to weewx-user
Can I just modify the code of the already installed driver or would I need to repackage and reinstall it. I may do that later but its another piece I need to learn.

Also how do I ensure its all running Python3?

Thanks for all the help.

Terry

D R

unread,
Feb 17, 2021, 5:11:52 PM2/17/21
to weewx...@googlegroups.com
Thank you for the replies on my question.  I think I have figured it out
and now have a better understanding of how things work.


It is not always as one thinks it is!

Again, thank you for the replies and guidance.

Dale


D R

unread,
Feb 17, 2021, 5:18:17 PM2/17/21
to weewx...@googlegroups.com
I have made some changes to the current.inc skin generating file and now
want to tweak it just a smidge.


In the current conditions, listing the various values, I used the
($trend) operator to get the difference from 24 hours ago.

I had it in a line at the bottom of the listing of values, but see that
the barometer uses a (...) form to indicate change.  I stuck the
formatting for the temp difference after the current outside temp,
within () and it works. Now I'm feeling brave and would like to add the
capital Greek Delta symbol in front of the value.  I know it may be a
little odd for someone who might casually look at the page, but this is
for me.  I know in Word or Excel you can hold down the Alt key and type
in the value, but I don't know if that is exclusively for Windows
environments or not.


I looked in the skins.conf and also for the default values for the
database element values, but didn't find a delta that I could copy and
paste.

Is it possible to insert this character?  I know some special characters
do show up, like the degree sign in F and C, and wind direction, so the
Cheetah engine must be able to do it.

May I ask for what that might be, or point to an area that explains how
to do such insertions?

Thanks, Dale


Tom Keffer

unread,
Feb 17, 2021, 5:39:27 PM2/17/21
to weewx-user
Most of the skin templates use utf-8 encoding, so the formal answer is that special characters must be entered using that encoding. 

However, if you cut and paste from a source such as copypastecharater.com, 99% of the time the paste will use utf-8 and it will display properly.


--
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.

pred...@gmail.com

unread,
Feb 18, 2021, 9:21:04 AM2/18/21
to weewx-user
Hi Terry,

I'm trying to do exactly the same thing.

Did you have any luck with the driver?

Thanks in advance.

George

Terry Steneker

unread,
Feb 18, 2021, 2:28:44 PM2/18/21
to weewx-user
Hi George,

Yes I did manage to get it working!
I ended up just editing the driver and configuration files where they are located.

I installed all of the following libraries:
sudo pip3 install Adafruit-Blinka
sudo pip3 install adafruit-circuitpython-bme280
sudo pip3 install adafruit-circuitpython-ads1x15
sudo apt-get install python3-w1thermsensor

Change file located in  /usr/share/weewx/user/BCRobotics.py to what I have attached
Add the BCRobotics section to the weewx.conf file located in /etc/weewx
Attached is my config file for reference but it has some location specific information that you'll need to change.

I reran config and it works!


Let me know how you make out or if you have any questions.

Note for any experts: I tried to run the install.py with the modified driver file but got a "module setup not found"
Thought it may be a Python version issue but couldn't determine the Python3 equivalent. Appreciate any hints.
Maybe later I will add my changes to Github but thats a whole other learning session.  

Terry
weewx.conf
BCRobotics.py

pred...@gmail.com

unread,
Feb 19, 2021, 9:25:17 AM2/19/21
to weewx-user
Hey Terry,

I will try them out and let you know.

Thank you very much for the help!

Reply all
Reply to author
Forward
0 new messages