Author Topic: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station  (Read 1429 times)

0 Members and 1 Guest are viewing this topic.

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
I guess I'm late to the party, but recently got caught up enough with life to get a Rasp Pi 4 to play with and what better way to learn more about the little critter than to set up WeeWx on it.

So far, choosing standard config values, entering my personalization such as address, lat, long, elevation, tz, etc all are easy.

I've let it run on simulation to get some graphs to look at.

I next plan to figure out how to ftp those charts and data to my web site.  Once that's working, I want to take one of my stations and hitch it to WeeWx to get it working.

However, all my stations use an RS232, which I currently run through a USB to RS232 dongle, then feeding Weather  Display on a Win  7 machine.

Something I had to do was to install a usb driver for the dongle so that windows associated it with a simulated port.

I've looked through a bunch of stuff for WeeWx and also RaspPi sites and do not see how to install a driver for the usb-rs232 dongle.

To be frank, most of the stuff I've done with hardware with the Pi is by pointing at GitHub and letting the installation scripts it finds there do their stuff.

Not wanting to screw up anything, I've not just tried plugging in a dongle to see what happens, and was hoping I could find something to reference as to this sort of missing step in my mind.

Anyone who's got WeeWx on a Pi running help me understand this step?
Dale


ECWx.info
&
ECWx.info/t/index.php

Offline jantoni

  • Member
  • *
  • Posts: 4
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #1 on: March 13, 2020, 01:26:20 PM »
Raspbian have drivers for most USB-RS232 dongles

Insert the dongle into a USB port and write:

Code: [Select]
dmesg
If Raspbian detect your dongle, you can view something as this:

Code: [Select]
[   14.742336] usbcore: registered new interface driver usbserial_generic
[   14.742480] usbserial: USB Serial support registered for generic
[   14.992480] usbcore: registered new interface driver ftdi_sio
[   14.992640] usbserial: USB Serial support registered for FTDI USB Serial Device
[   14.993173] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[   14.993502] usb 1-1.3: Detected FT232RL
[   15.080499] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

Try it, you can't break anything.
Davis Vantage Vue
GW1000
WH2650
WH65
3 x WH31 + WH32
WH41 air quality sensor

Offline Storm017

  • Senior Contributor
  • ****
  • Posts: 172
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #2 on: March 13, 2020, 03:49:16 PM »
What type of station?

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #3 on: March 13, 2020, 07:16:16 PM »
Jantoni:  I will give it a try.  Being an incredibly newbie with Rasp and Linux, had no clue that one could try something only to find out later that one really should not have done that!

So far I'm impressed by the environmental awareness that the OS has, and grabs what it needs.

Storm017:
I would probably try a working Texas Weather Instruments 8000 first, since it is up and running for years.  After that I have an urge to try to get one of my RM Young 26800s configured to output a serial data string that one of the drivers of WeeWx can recognize and then expand by adding several sensors that most stations don't have.  One that seems lacking is a solar radiation for a Rainwise Mk III, and it seems from a discussion at https://github.com/weewx/weewx/wiki/intake-strategies there are things called Services that can run on Linux to gather data from sensors not supported by a station, and expand capabilities.  Exactly what they state there is what I'd like to do with snow depth sensors, solar radiation, etc.  " A weeWX data collection service can add observations to each LOOP or archive record. So you can add data from a snow depth sensor and a tide level sensor to data from an Acurite 5in1 station, then the reports will show integrated data. "

Have you ever added a WeeWx data collection 'service' and merged the data?  I hope there may be some info that I can study to see if I'll be able to do it.
Dale
ECWx.info
&
ECWx.info/t/index.php

Offline Storm017

  • Senior Contributor
  • ****
  • Posts: 172
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #4 on: March 13, 2020, 09:57:25 PM »
Dale:

The BME280 I2C sensor I’m using for pressure and indoor temperature runs as a data service.  Its data is placed in the loop approximately every 3 seconds, then archived every 5 minutes. Additionally, I have AS3935 module which its data is archived every 5 minutes.

Mar 13 21:01:14 DavisSDR weewx[10852]: rtldavis: chan: 21:01:13.963487 Hop: {ChannelIdx:27 ChannelFreq:915966601 FreqError:1047}
Mar 13 21:01:16 DavisSDR weewx[10852]: rtldavis: data: 21:01:16.525335 E00686380200B67A 14861 0 0 0 0 msg.ID=0
Mar 13 21:01:16 DavisSDR weewx[10852]: bme280: BME280 data compensated_reading(id=12223927-88c4-478e-bba3-86d8b1198c5a, timestamp=2020-03-13 21:01:16.596241, temp=24.542 °C, pressure=958.22 hPa, humidity=0.00 % rH)
Mar 13 21:01:16 DavisSDR weewx[10852]: bme280: {'txBatteryStatus': 0, 'rain': 0.0, 'dateTime': 1584147677, 'windDir': 188.78656126482213, 'windSpeed': 3.1292722222222222, 'inHumidity': 0.0, 'inTemp': 24.542357759928564, 'usUnits': 17}
Mar 13 21:01:16 DavisSDR weewx[10852]: rtldavis: chan: 21:01:16.525992 Hop: {ChannelIdx:38 ChannelFreq:921485856 FreqError:-1100}
Mar 13 21:01:19 DavisSDR weewx[10852]: rtldavis: data: 21:01:19.087819 500487FF7100818C 14862 0 0 0 0 msg.ID=0
Mar 13 21:01:19 DavisSDR weewx[10852]: bme280: BME280 data compensated_reading(id=6b298b16-48b1-4547-bb5b-da5289e675b6, timestamp=2020-03-13 21:01:19.126320, temp=24.528 °C, pressure=958.12 hPa, humidity=0.00 % rH)
Mar 13 21:01:19 DavisSDR weewx[10852]: bme280: {'txBatteryStatus': 0, 'dateTime': 1584147679, 'windDir': 190.13833992094862, 'windSpeed': 2.2351944444444443, 'inHumidity': 0.0, 'inTemp': 24.52764487231616, 'rainRate': 0, 'usUnits': 17}
Mar 13 21:01:19 DavisSDR weewx[10852]: rtldavis: chan: 21:01:19.088838 Hop: {ChannelIdx:10 ChannelFreq:907436843 FreqError:1047}
Mar 13 21:01:21 DavisSDR weewx[10852]: rtldavis: data: 21:01:21.650837 400286FFC3005856 14863 0 0 0 0 msg.ID=0
Mar 13 21:01:21 DavisSDR weewx[10852]: bme280: BME280 data compensated_reading(id=5d60b377-9cf5-41af-b9f8-cffa096f13fb, timestamp=2020-03-13 21:01:21.706911, temp=24.523 °C, pressure=958.16 hPa, humidity=0.00 % rH)
Mar 13 21:01:21 DavisSDR weewx[10852]: bme280: {'txBatteryStatus': 0, 'dateTime': 1584147682, 'windDir': 188.78656126482213, 'windSpeed': 0.8940777777777777, 'inHumidity': 0.0, 'inTemp': 24.522740577027434, 'usUnits': 17}
Mar 13 21:01:21 DavisSDR weewx[10852]: rtldavis: chan: 21:01:21.651479 Hop: {ChannelIdx:49 ChannelFreq:927005112 FreqError:422}
Mar 13 21:01:24 DavisSDR weewx[10852]: rtldavis: data: 21:01:24.213602 8003861D4B001057 14864 0 0 0 0 msg.ID=0
Mar 13 21:01:24 DavisSDR weewx[10852]: bme280: BME280 data compensated_reading(id=f231c608-2416-4583-b7a9-028f00ab401a, timestamp=2020-03-13 21:01:24.263928, temp=24.537 °C, pressure=958.27 hPa, humidity=0.00 % rH)
Mar 13 21:01:24 DavisSDR weewx[10852]: bme280: {'txBatteryStatus': 0, 'pressure': 958.265786001613, 'dateTime': 1584147684, 'windDir': 188.78656126482213, 'outTemp': 8.222222222222221, 'windSpeed': 1.7881555555555555, 'inHumidity': 0.0, 'inTemp': 24.537453463766724, 'usUnits': 17}

Don’t know if you searched the following group but you might find useful information there
https://groups.google.com/forum/#!forum/weewx-development

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #5 on: March 13, 2020, 10:08:31 PM »
storm:   Thanks.  I'm making progress,and will study the info you sent.  I hope to look at the link for the group you sent, too.  I'm sure that by reviewing I can find a lot of clues.

Thanks for showing how you got set up. I'm not sure I grasp it yet, but will look to see if I can figure out how to insert the data once it is grabbed by the service.

Again, thx and I may be back!
ECWx.info
&
ECWx.info/t/index.php

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #6 on: March 14, 2020, 11:04:23 AM »

Code: [Select]
[   14.742336] usbcore: registered new interface driver usbserial_generic
[   14.742480] usbserial: USB Serial support registered for generic
[   14.992480] usbcore: registered new interface driver ftdi_sio
[   14.992640] usbserial: USB Serial support registered for FTDI USB Serial Device
[   14.993173] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[   14.993502] usb 1-1.3: Detected FT232RL
[   15.080499] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

From the above example, the device name that WeeWX needs is /dev/ttyUSB0 .  Adjust accordingly for whatever "dmesg" says on your Pi.....
WU Gold Stars for everyone! :lol:

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #7 on: March 14, 2020, 01:37:16 PM »
Thanks.

I am 'learning' or being exposed to a lot of Linux and the old fashioned way of interacting with the command line.  Not that I ever did know it well.

This is a great forum and even very basic questions like mine get answered, so thanks to all and to this forum and to not having snarky responses.

Oh, I got distracted reading through the extensive WeeWx documentation on line, and holy cow does that program do a lot behind the scenes.  I cannot believe it is that sophisticated.

I learned the answers to some other questions that relate to how some software does things, not necessarily in relation to weather and all.  Data base stuff in particular.

And I now have another area to look at for my own knowledge, a software engine called Cheetah, which seems to be extremely versatile.  Will this never end?

Wonderful riches to excess, I guess.

Dale
ECWx.info
&
ECWx.info/t/index.php

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #8 on: March 14, 2020, 07:40:01 PM »
And I now have another area to look at for my own knowledge, a software engine called Cheetah, which seems to be extremely versatile.  Will this never end?

If you want it to end, you should probably skip the built-in web pages/reporting and go straight to installing the Belchertown skin with MQTT doing live updates:

https://belchertownweather.com

Notice how you can "zoom" by dragging a mouse over the graphs while holding the left button down.  Belchertown is definitely the "killer app" that WeeWX has needed for a looooong time, IMHO.....
WU Gold Stars for everyone! :lol:

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #9 on: March 14, 2020, 07:53:47 PM »
Darn you, one MORE thing.  This is like Christmas, but I hope to get to play with the toys soon.

I assume from your comments that this is a skin that can be had, so I'm off to look for it, too.

Does anyone else have this implemented on WeeWx?

Thanks (really, I do mean it) for the info.  Dale
ECWx.info
&
ECWx.info/t/index.php

Offline Storm017

  • Senior Contributor
  • ****
  • Posts: 172
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #10 on: March 14, 2020, 09:47:32 PM »
Running the Belchertown skin with MQTT on two RPI's (One Davis and One Acurite 5+1) over my LAN. Plus using this skin as a Kiosk on an other RPI. When I find a host planning to run this skin.

Offline Storm017

  • Senior Contributor
  • ****
  • Posts: 172
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #11 on: March 14, 2020, 11:01:47 PM »
Additionally using the Belchertown skin, you can create numerous types of graphs ( https://github.com/poblabs/weewx-belchertown/wiki/Belchertown-Charts-Documentation ). Here is two showing my Davis temperature and humidity from 2014 to present day.  I'm currently in the process of converting over my Mesowest data from 2009 through 2014 to be included in my database.

Edit:
I run multiple RPI3B+'s headless (6 total plus a  RPI4 (earmarked for decoding GOES 16/17 data)); each having a static IP address. 
« Last Edit: March 14, 2020, 11:22:46 PM by Storm017 »

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #12 on: March 15, 2020, 08:57:31 AM »
Well, Pi day has come and gone and I only got to play with learning my RaspPi a few hours. 

Those projects show that it can be done.  With all those PIs running you need to have the remote access set up.  I'm learning every day.

Keep the updates coming.  It's likely I won't be sharing much for awhile, but really enjoy hearing other's work and screenshots.
Dale
ECWx.info
&
ECWx.info/t/index.php

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #13 on: March 15, 2020, 09:16:00 AM »
My MQTT feed doesn't leave my house (no 2.5 second updates from outside), but this is my hacked-up early Belchertown page that runs 24/7 on a wall-mounted Amazon Fire HD 10" tablet as my primary weather console:

http://home.hvtraffic.com:845/weewx/live/

The Android Fully Kiosk Browser app is the last piece of the puzzle.....
WU Gold Stars for everyone! :lol:

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2002
    • Weather at Eau Claire, WI
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #14 on: March 15, 2020, 11:02:04 AM »
Chaser:
This is a nice skin and the configuration is also nice.
Thanks for sharing.  I didn't know a lot of these options were out there.  First I'll see if I can get WeeWx seeing my Rainwise IP-100 this afternoon with the basic configuration (and less stringing of more wires) and then if the basic or default graphs show, load them to a test area on my web server and then start fiddling more.

You guys have cleared the path, I just need to walk down it.

Thx.
Dale
ECWx.info
&
ECWx.info/t/index.php

Offline Storm017

  • Senior Contributor
  • ****
  • Posts: 172
Re: Installing a usb driver for Rasp Pi 4 so weewx can 'see' my station
« Reply #15 on: March 15, 2020, 01:12:56 PM »
If you run into any issues you can post questions over at https://groups.google.com/forum/#!forum/weewx-user.

 

anything