Rasberry Pi weather station with anemometer and camera only

508 views
Skip to first unread message

Sean Jahnig

unread,
Sep 14, 2019, 8:35:45 AM9/14/19
to weewx-user
Hi,

I'm new here so if this has been answered before, please just direct me to the article.

I am fairly IT competent but i am not a coder. However, i can read through tutorials and hack my way most the time.

A bit of background:
I am a surfer and kitesurfer and i live in the UAE. We do not have as much wind and waves as other countries, but if you watch the weather closely and make good, informed decisions - you can can get some nice ocean conditions here for surfing and kitesurfing... and it usually disappears as quickly as it arrives so timing is key. Following the charts and being informed is tricky business because there are not many accurate forecasting websites or stations. Firstly, knowing that the wind/waves is coming is not accurate, and secondly knowing if it has arrived is not accurate. Being informed can really save long drives etc. so what i'm really hoping to do is to build an affordable little station that i can install at a few locations in order to monitor live wind (via windguru) and wave conditions (twitch, streaming).

At our local kite surfing spot i have setup a wind meter and a webcam but it is not an efficient solution. We are currently using a full weather station and a separate mac mini just for handling the web cam stream. It is not an efficient or affordable solution. You can see the wind meter here: https://www.windguru.cz/station/1083 and the webcam here: https://www.twitch.tv/kitebeachcenteruaq ... What i am really hoping to do is build something smaller and cheaper that can achieve the same thing - and also in a smaller package like a waterproof box so that i can approach hotels and use a small footprint (and their internet) to have a little station to monitor the wind and waves at their condition.

I have been doing a lot of reading and i do believe the rasberry pi has all the functionality i need. It is just the exact process of getting everything to talk to each other that i need some help with. Also, because i am funding this myself i really need to try and keep the cost down. I only need an anemometer for wind speed and direction + a 1080p weather proof outdoor camera. Nothing else.

In my head, this is how i imagine it will work:
  1. Buy an anemometer like - Davis Instruments 6410 https://amzn.to/2kBgCTh
  2. Buy a 1080p camera, whether usb or ethernet. It just need to be weatherproof and compatible
  3. Buy Rasberry pi and load weewx which will talk to windguru
  4. Setup the Rasberry pi with something like https://www.noip.com/ so that i can access it remotely for maintenance
Questions i have:
  1. Can i buy only the anemometer above and connect it into the rasberry pi (about $120) ? or do i need to invest in the whole station (about $600) in order to have it readable by the rasberry pi ?
  2. Is anyone successfully streaming a webcam via twitch using a rasberry pi? (ref - https://www.youtube.com/watch?v=ob-V1xI7c8I)
Appreciate anything that can be added to my project.

Thanks,
Sean.


p q

unread,
Sep 14, 2019, 10:18:08 AM9/14/19
to weewx...@googlegroups.com
You might look at some of the non-commercial weather station hardware like  https://www.raspberrypi.org/blog/build-your-own-weather-station/ or  https://www.instructables.com/id/DIY-Anemometer-and-Windvane-for-Standalone-Weather/ https://projects.raspberrypi.org/en/projects/build-your-own-weather-station/6  https://www.raspberrypi.org/forums/viewtopic.php?t=37379

I'm not sure you want to spend what a Davis costs for an anemometer. 

I run a Acurite weather station connected to a older Raspbery Pi 2B running Weewx with no problems. I've messed around with cameras connected to other raspberry pi's and I'm not sure your going to get 1080p streaming. Maybe with a new Raspberry Pi 4, but you're going to use some bandwidth. Maybe a 30 second gif from the web cam updated every 5 minutes would do what you need with tons less bandwidth. Just a thought.



--
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/70de09ee-25a1-4c64-8591-26af3a4e6b98%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Jardi Martínez

unread,
Sep 15, 2019, 1:33:35 AM9/15/19
to weewx-user
Hi Sean,

I can't comment on the camera but I wrote a weeWX driver based on the  Build Your Own Weather Station instructions, you don't need to assemble all the parts described there to use the driver, you could set it up with just an anemometer. I agree in that you might not want to spend that money for a Davis anemometer if that's all you want.

The driver code is here: https://github.com/jardiamj/BYOWS_RPi

I wrote the driver without having the hardware to test it. Patrick requested it in this forums a few months ago so I put it together, he tested it and has been running it for a while now without many issues.

Jardi.

Sean Jahnig

unread,
Sep 15, 2019, 1:34:30 AM9/15/19
to weewx-user
Hi Peter,

Thanks a lot for the reply. I've taken a look at those links and i think you're right, it's more than enough for what i will need. At first anyways.

Acurite seem to have a 3-in-1 station but it lacks a wind vane so i think the 5-in-1 is my only option. I will try that along with the rasberry pi and i believe that will fulfill my requirement for the wind part. Regarding the video part - 1080 is actually not necessary. 720 would be enough - or else, as you say reducing the frame rate or even having a static image every 30 seconds would be enough.

From what i can gather i am on the the right track here with the acurite and the rasberry pi - correct? I think it makes sense to invest in some equipment and start fiddling.

Thanks again,
Sean.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.


--
Peter Quinn
(415)794-2264

Sean Jahnig

unread,
Sep 15, 2019, 2:27:05 AM9/15/19
to weewx-user
Hi Jardi,

Thanks a lot for the reply - much appreciated.

I'm quite new to this whole world of rasberry pi so please forgive my ignorance. The reason why i was looking at that Davis anemometer and wind vane is because it is one of the few sets that i've seen which have a wind vane and anemometer in one. It is also popular in the kitesurfing world because it is strong - as you can imagine things that live at the ocean tend to rust and seize up quicker than usual.

It appears that the Davis anemometer (https://www.google.com/url?q=https%3A%2F%2Famzn.to%2F2kBgCTh&sa=D&sntz=1&usg=AFQjCNEbQn_pq_hx9UCYynPH_2mJVLGu9g) has an RJ11 plug on the end so i don't know how that would work with a rasberry pi? Is that where your driver would help? The obvious solution is to buy the Davis vantage weather station which the anemometer plugs into but that is 4x the price and not necessary since i don't need rain, temp, humidity sensors etc.

If you think that it is way to technical to try get that Davis anemometer working without it's vantage master unit then please tell me and i'll let that idea go.

Many thanks,
Sean.

Jardi Martínez

unread,
Sep 15, 2019, 4:27:57 AM9/15/19
to weewx-user
Hi Sean,

I don't have access to one of these anemometers but if it is a regular cups anemometer, they are quite simple devices. They have a magnet that activates a reed sensor at every turn, some of them twice per rotation. If that's the case, you will only need two of the wires in the connector one connected to ground and the other one to an input pin in the Pi that will be use to count the clicks, the other info you'll need is the diameter of the anemometer and a calibration factor that might come or not in the device's technical reference.

But then again, I don't have access to one of those to examine it. If you can get a hold of any documentation about it I could take a look. If you have access to one, I would use a multimeter on the continuity test setting and try the pins on the rj11 in pairs while the device is turning, if you hear the beeps as it turns you can easily make it work with the driver I wrote and you would have found the 2 needed pins.

Jardi.

Andy

unread,
Sep 15, 2019, 9:20:57 AM9/15/19
to weewx-user

Kevin Hedgepeth

unread,
Sep 15, 2019, 8:08:52 PM9/15/19
to weewx-user
Hi Sean,

I run an Accurite 5 in 1 wx station here connected to a Raspberry Pi that uses Weewx to put the wx info on the internet and WeatherUnderground.  It works very well.  I also use a usb cam aimed through our back patio door to show the wx conditions to people who are interested in "seeing" the weather.  The USB cam is controlled by software called Motion.  Motion gives real time slow speed video and does an image capture on a scheduled basis.

I have written an instructable for setting this up and you can see the wx and camera results at:


There is a menu on the left side.  the wx info is the top menu item, the camera images are a few menu items down, and the instructable is a little further down.

kevin
Hermiston, Oregon, USA

Jardi Martínez

unread,
Sep 15, 2019, 9:15:32 PM9/15/19
to weewx-user

On Sunday, September 15, 2019 at 6:20:57 AM UTC-7, Andy wrote:
Davis sensor connection info is here http://cactus.io/hookups/weather/anemometer/davis/hookup-arduino-to-davis-anemometer

 Awesome!

So, yeah. Based on that information it would be easy to adapt the driver to work with the Davis anemometer, for this you will only need to connect the ground and wind speed pins of the rj11 as described in Andy's link, you don't need to add an external pull-up resistor since that Pi has an internal one that can be activated. If you also want to get the direction you would need to get an Analog to Digital converter like the MCP3008, since the Raspberry Pi doesn't have any analog pins.

If you decide to go this route let me know since I will have to modify the driver a little bit to make it work with that anemometer/wind vane.

Jardi.

Steve2Q

unread,
Sep 16, 2019, 11:11:20 PM9/16/19
to weewx-user
Hi Kevin..Steve, N2QLQ here. I could not find the instructable you referred to regarding adding the web cam. Very nice and informative site.

73 Steve

Sean Jahnig

unread,
Sep 17, 2019, 6:35:55 AM9/17/19
to weewx-user
Hi Jardi,

Thanks for the info. I'm feeling like the acurite solution might be a better starting point for me and then i'll expand from there. Will let you know, thanks!

Sean Jahnig

unread,
Sep 17, 2019, 6:37:02 AM9/17/19
to weewx-user
Hi Kevin,

This is awesome and i think you've achieved exactly what i want to do with your setup. I'm going to invest in the necessary equipment and put it together,

Will let you know how it goes!

Thanks, 
Sean.

Kevin Hedgepeth

unread,
Sep 17, 2019, 9:07:44 PM9/17/19
to weewx-user
You are correct.  there is not one for the web cam.  The instructable I was referring to is for the Wx station and the Raspberry Pi.

I am writing the web cam document now.

Keep tabs on the web site.  I hope to have it up no later than thursday.  It is mostly written.  I want to do a step by step install following what is written to make certain I did not miss a step.

Kevin/NB7O

Kevin Hedgepeth

unread,
Sep 17, 2019, 9:10:37 PM9/17/19
to weewx-user
Hi Steve,  Me again.  I just re-read what I wrote to Sean.  I see where you, and probably others, thought I was talking about the cam app.  I wrote the reply based upon his question about using a Pi and a Wx station that can be promulgated over the internet.  The camera was a secondary thought because he also wanted to show the surf conditions present.  Give me a little time and I will have it up there.

Kevin/NB7O

On Monday, September 16, 2019 at 8:11:20 PM UTC-7, Steve2Q wrote:

Kevin Hedgepeth

unread,
Sep 17, 2019, 9:12:44 PM9/17/19
to weewx-user
That is great.  If you hit a snag get in touch and I will try to mentor you via long distance.  If you want a copy of my SD card we can work that out too.  that will save you lots of work.

Kevin/NB7O

Sean Jahnig

unread,
Sep 18, 2019, 12:02:30 AM9/18/19
to weewx...@googlegroups.com
Thanks a lot Kevin,


Will it connect to the rasberry pi as is or do I need to buy any other hardware?

Thanks,

Sean Jahnig

m.  +97150 475 4234
e.  seano...@gmail.com

--
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/5c790b78-5939-4bfa-b13c-b2b8b9454480%40googlegroups.com.

p q

unread,
Sep 18, 2019, 9:10:03 AM9/18/19
to weewx...@googlegroups.com
That's the one I have. It connects to your raspberry pi with a USB cable connected to the back of the display. No other hardware on the computer side. You'll need mounting hardware to install the sensor, or course.

The one thing that I don't like about this unit is the thermometer is packaged in with the wind and rain gauge. If you pick a good place to measure wind and rain, it's in the sun and that leads to abnormally high and low temperature readings. In your case, you probably don't care. For me, I had to add a second temperature sensor.



--
Peter Quinn
(415)794-2264

Steve2Q

unread,
Sep 18, 2019, 4:57:09 PM9/18/19
to weewx-user
Thank, Kevin

Sean Jahnig

unread,
Oct 5, 2019, 10:59:33 AM10/5/19
to weewx...@googlegroups.com
Hi Kevin,

Quick question, my acurite station just arrived and when i remove the panel at the back there is no usb port. I wonder if they've updated it and removed that port? Maybe i need to buy the pc connect device as well?


Would appreciate any suggestions.

Thanks,
Sean

p q

unread,
Oct 5, 2019, 11:11:47 AM10/5/19
to weewx...@googlegroups.com
Looks pretty much the same as the one I have. Right next to the place where you plug in the 4.5vDC power supply, there is a mini-USB port on mine. There is the little USB symbol above it. 
image.png

They could have removed it, but it would make no sense.



--
Peter Quinn
(415)794-2264

Sean Jahnig

unread,
Oct 5, 2019, 12:55:48 PM10/5/19
to weewx...@googlegroups.com
Thanks Peter,

It seems like i purchased the one without 'PC Connect' - very frustrating.

I have already brought the device with me to my home in Dubai so no chance to return to Amazon.com - i think the cheapest is going to be to buy a new display that includes pc connect.



p q

unread,
Oct 5, 2019, 1:06:22 PM10/5/19
to weewx...@googlegroups.com
Crap. I'm sorry. I didn't notice that there were two different versions.



--
Peter Quinn
(415)794-2264

Sean Jahnig

unread,
Oct 5, 2019, 1:11:15 PM10/5/19
to weewx...@googlegroups.com
Nah it's my fault. I thought i had researched it properly but clearly not. Let's hope the new display that I've bought will solve the problem.

Thanks again for the help.


Thanks,

Sean Jahnig

m.  +97150 475 4234
e.  seano...@gmail.com

Liz

unread,
Oct 6, 2019, 1:47:54 AM10/6/19
to weewx...@googlegroups.com
On Sat, 5 Oct 2019 21:10:59 +0400
Sean Jahnig <seano...@gmail.com> wrote:

> Nah it's my fault. I thought i had researched it properly but clearly
> not. Let's hope the new display that I've bought will solve the
> problem.
>
> Thanks again for the help.
>
> Thanks,
>
> Sean Jahnig

Is this a device which is compatible with an interceptor?
If you are not intending to return it, have you looked inside the
plastic box to see if the port is actually there, just hidden?

Liz

Sean Jahnig

unread,
Oct 7, 2019, 1:00:24 PM10/7/19
to weewx...@googlegroups.com
Thanks for the suggestion Liz,

I tried to open it but i didn't find any hidden usb port... worth a try.

I ordered a display that is labelled as having ' PC connect' so i'm hoping that one will be right.


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

Sean Jahnig

unread,
Oct 13, 2019, 5:17:45 AM10/13/19
to weewx...@googlegroups.com
Hi all,

I have successfully setup the rasberry pi with weewx and my acurite 5-in-1 weather station. I can see the live feed using the web browser at http://localhost/weewx

At first, after the installation it was not working but i fiddled a bit and changed USB ports etc. and then it began working.

After a restart of the pi (nothing else changed), it stopped working. When i run sudo service weewx status i see the attempts at connecting to the device with an error LOOP Errno 110. I believe this is a problem with the driver seeing the device over USB. If i troubleshoot by changing the 'USB Mode' on the acurite display from 4, to 3, then back to 4. As well as changing the port that the device is plugged into on the pi - then it connects successfully again.

Any ideas on how to fix this problem so that it can just reconnect successfully after a reboot?


Thanks,


mwall

unread,
Oct 13, 2019, 8:23:13 AM10/13/19
to weewx-user


On Sunday, October 13, 2019 at 5:17:45 AM UTC-4, Sean Jahnig wrote:

Any ideas on how to fix this problem so that it can just reconnect successfully after a reboot?

some consoles with usb are *always* in mode 4.

for the consoles that have user-configurable mode: after power cycle, the acurite console starts up in mode 2.  so there is no way to collect data from it until you physically punch the buttons to put it into mode 4

you can read about this in the weewx hardware guide:


for unattended operation, there are three options for reliable unattended data collection from acurite hardware:

1) get a console that does not have manual changing of usb bode (e.g., 02064 or 01536)

2) find an old acurite bridge and use the weewx-interceptor driver

3) buy a $20 SDR with weewx-sdr driver (but you need to create your own pressure sensor or use a fine offset wireless pressure sensor)

m

Sean Jahnig

unread,
Oct 13, 2019, 8:52:48 AM10/13/19
to weewx...@googlegroups.com
Thanks for the reply.

Is the RPi rebooting considered a power cycle? Or is the acurite display turning on and off considered a power cycle?

To clarify - the acurite display is remaining powered on at all times. Even if i push the settings button for USB Mode it appears to still be on mode 3 or 4 - wherever i left it.

Appreciate your help.

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.

Sean Jahnig

unread,
Oct 13, 2019, 11:04:36 AM10/13/19
to weewx...@googlegroups.com
And now, for some reason i've done multiple restarts and it weewx connects via usb every time. The only thing i've done differently is remove the keyboard and mouse from the USB ports, so i guess that was confusing the driver because there were multiple USB devices plugged in?

Seeing as the display is staying on during the reboot i don't think this problem is the case of the USB Mode resetting. It's almost like the weewx driver is not able to find the usb device in some instances.

Thanks,


mwall

unread,
Oct 13, 2019, 11:12:36 AM10/13/19
to weewx-user


On Sunday, October 13, 2019 at 11:04:36 AM UTC-4, Sean Jahnig wrote:
And now, for some reason i've done multiple restarts and it weewx connects via usb every time. The only thing i've done differently is remove the keyboard and mouse from the USB ports, so i guess that was confusing the driver because there were multiple USB devices plugged in?

when you power cycle the acurite console, it will start up in mode 2.  you must punch its buttons to change it to mode 4.  so you must put it on battery backup or somehow ensure that it never powers off, otherwise weewx will not be able to get data from it until you punch the buttons.

having multiple devices plugged into the rpi might cause problems.  depends on what kind of pi it is, what kind of power supply you use, the other usb devices, electrical storm activity, static electricity in the air (i am not joking!)

 
Seeing as the display is staying on during the reboot i don't think this problem is the case of the USB Mode resetting. It's almost like the weewx driver is not able to find the usb device in some instances.

the usb on rpi is flaky - some rpi models are unable to maintain sufficient voltage, resulting in usb resets, corrupt usb data, etc.  the usb implementation on acurite consoles is flaky - very sensitive to changes in voltage, and very sensitive to pretty much anything that happens on the usb.

the safest way to go is to put a powered usb hub between the rpi and your weather station.  power it from a reliable source, such as a ups or a solar-backed battery bank with regulator/controller.

you might get lucky plugging the console directly into the pi.  but if you care about data consistency and quality, you'll have to do more.

m

Sean Jahnig

unread,
Oct 13, 2019, 11:36:32 AM10/13/19
to weewx-user
Thanks for the valuable advice Matthew, very much appreciated.

I will look into all of your suggestions. I will be installing the station into the remote location on Tuesday so from then on the testing begins.

Thanks for everyone who can contributed and helped me on this project.

Thanks,
Sean.

Kevin Hedgepeth

unread,
Oct 13, 2019, 2:49:32 PM10/13/19
to weewx-user

Wade Graham

unread,
Oct 14, 2019, 8:52:28 AM10/14/19
to weewx...@googlegroups.com
Hi Sean

I am also a kiter.
I highly recommend using Weewx it is simply great software and extremely flexible.

I have setup three different remote weather stations each using a Raspberry Pi and Weewx.
I remotely control them with Real VNC, which is a free package on all Raspberry Pi's and no port forwarding is required on the Pi.
Some of my Pis have been running Weewx for years in harsh Canadian ambient conditions.

Although my stations use Davis VP2 and Vue you can cheaply and easily build just the sensors you want for the Raspberry Pi at the link below.

Very meagre (bits) bandwidth is used to transmit weather data to our club website, Wunderground and Windflow.ca.

Windflow.ca is owned by a kiter friend of mine.
A 60 second tweak to Weewx restx.py is required to transmit weather data to windflow.

My current Weewx sites:

Toronto Windsurfing Club
Beachcam: reverse time lapse

Downtown Toronto

Lake Simcoe Kite Weather




 

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

Kevin Hedgepeth

unread,
Oct 14, 2019, 3:20:57 PM10/14/19
to weewx-user

Sean Jahnig

unread,
Oct 19, 2019, 9:44:00 AM10/19/19
to weewx...@googlegroups.com
Hi Wade,

Thanks for the message and for the info, super helpful. I like the way you've setup the websites.

I have had great success with the pi 4 which is installed at the remote location along with a hikvision 1920x1080 ip camera and the acurite 5-in-1 weather station. I'm slowly experimenting and getting things working the way I want and the camera and pi setup have been really reliable. I can manage it via SSH and a static IP address and through tunneling I can vnc as well so I'm happy with that. The weather station is struggling with signal issues and it goes on and offline throughout the day so I need to look at that this week.

My 2 immediate challenges are to fix the signal issues of the station and to refine how the user logs in and sees the info. At the moment I have an ffmpeg code that runs every 10min to get a jpg image from the camera and then saves it into the /var/www/html/images folder and then using Apache, a basic webpage and the static IP address people can log into the pi directly and see the latest camera pic as well as the weather station info. Check it out http://weather4fuj.ddns.net it is still a work in progress but I'm slowly manipulating the page to contain all the right info.

Overall this has been a fun project and I'd love to install more of these stations around the UAE but I wish I could get the Davis anemometer and windvane working easily with the pi so that I could avoid using acurite. Not overly keen to spend a big amount on the whole Davis station, I don't need half of that stuff. Over the last 2 weeks of testing there have been a lot of hurdles with the acurite from usb issues, to signal issues and I feel like it needs constant monitoring to make sure it's working.

Do you have any other suggestions for a wind speed/direction and if possible temperature sensor that is a more reliable than the acurite? 

Thanks,

Sean Jahnig

m.  +97150 475 4234
e.  seano...@gmail.com
Reply all
Reply to author
Forward
0 new messages