Installation/configuration issues (WeeWx on a Raspberry Pi4)

265 views
Skip to first unread message

Stuart Beaumont

unread,
Jun 16, 2020, 11:14:13 AM6/16/20
to weewx-user
Evening all

I'm having a few challenges with an installation and configuration of weewx on a Raspberry Pi. Here is an overview of what im trying to do and what ive done:

Ive got a WH6006 Weather Station. It is a cellular system in that it connects to the internet with mobile data. I'm wanting to connect it to a Pi4 running Weewx. Initially i want to be able to monitor the weather using Weewx, but ultimately i need to get the data off the weather station in excel or csv format and save it to OneDrive. From there i'll use Power Query to process it.

After a few attempts i had managed to get Weewx running on the Pi with the Simulator (but now that seems to have stopped too??). I have installed the Interceptor driver, but at that time i was still getting Simulator data, despite making the necessary changes to the config file. (station-type = interceptor)

I've set up a (temporary) DNS and configured the router/modem.

I've set up port forwarding on the router for the Pi. Also added port = 8000 to the config file.

The challenge i'm having is i still cant get the console to talk to Weewx.

Ive set device_type = observer

I stopped and restarted weewx a number of times to effect the changes.

I'm a novice with this stuff but got some great help from gelfert back on the wxforum. He's been great.

Lastly, i have managed to get the station to upload to WU and retrieve the data with the API. Its works, but not the ideal system. Its fine for a backup.

Any help in completing my configuration would be really great.

G Hammer

unread,
Jun 17, 2020, 6:18:28 AM6/17/20
to weewx-user
You say the PWS connects via cellular data.
That precludes using anything to capture/sniff the data.
You'll have no options except for getting a GW1000 if it supports your sensors.

galfert

unread,
Jun 17, 2020, 12:25:20 PM6/17/20
to weewx-user

The WH6006 is pretty much the same as any other Fine Offset clone console. It directly uploads to Ecowitt.net, WU, WeatherCloud, and "Customized" server upload. It just does it all via built in cellular modem. So no, you don't need a GW1000.

On the WH6006 "Customized" server upload is actually called "New Web" and you can enter in any IP server address you want and specify the port and upload interval. It is the same as "Customized" server upload although it looks slightly different but it's doing the same thing. It will send the data to your server in WU protocol format.

G Hammer

unread,
Jun 17, 2020, 12:35:33 PM6/17/20
to weewx-user
So, a public IP from a cell is going to be intercepted by the Pi?

Stuart Beaumont

unread,
Jun 17, 2020, 2:41:40 PM6/17/20
to weewx-user

I've made a few changes to the config file based on a recommendation. I've set device_type = wu-client. Below is the "station" part of the config file:

#   This section is for information about the station.

[Station]

    # Description of the station location
    location = KwaWula Game Estate

    # Latitude in decimal degrees. Negative for southern hemisphere
    latitude = -29.461403
    # Longitude in decimal degrees. Negative for western hemisphere.
    longitude = 30.258868

    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = 1156, meter

    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = Interceptor

    # If you have a website, you may specify an URL
    #station_url = http://www.example.com

    # The start of the rain year (1=January; 10=October, etc.). This is
    # downloaded from the station if the hardware supports it.
    rain_year_start = 1

    # Start of week (0=Monday, 6=Sunday)
    week_start = 0


#############################################################################

[Interceptor]
    # This section is for the network traffic interceptor driver.

    # The driver to use:
    driver = user.interceptor

    # Specify the hardware device to capture.  Options include:
    #   acurite-bridge - acurite internet bridge, smarthub, or access
    #   observer - fine offset WH2600/HP1000/HP1003, ambient WS2902
    #   lw30x - oregon scientific LW301/LW302
    #   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
    #   ecowitt-client - any hardware that uses the ecowitt protocol
    #   wu-client - any hardware that uses the weather underground protocol
    device_type = wu-client
    port = 8000

##############################################################################

[Simulator]
    # This section is for the weewx weather station simulator

    # The time (in seconds) between LOOP packets.
    loop_interval = 2.5

    # The simulator mode can be either 'simulator' or 'generator'.
    # Real-time simulator. Sleep between each LOOP packet.
    mode = simulator
    # Generator.  Emit LOOP packets as fast as possible (useful for testing).
    #mode = generator

    # The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default 
    # is to use the present time.
    #start = 2011-01-01T00:00

    # The driver to use:
    driver = weewx.drivers.simulator

##############################################################################

I've set the port = 8000 in the console and correspondingly setup Port Forwarding on the router/modem.

Can someone have a scan and tell me if ive got this right? Is there a test i can run to see where the problem might be?

I've set up a NDS and tested it with ping. All seems to be working fine there.



galfert

unread,
Jun 17, 2020, 7:15:17 PM6/17/20
to weewx-user


On Wednesday, June 17, 2020 at 12:35:33 PM UTC-4, G Hammer wrote:
So, a public IP from a cell is going to be intercepted by the Pi?

Yes, why not? If you can send data to WU why can't you send the same data to your own server (directly)? I can see where your confusion may be in the way that you use the Interceptor driver, if you are one of those users that actually "intercepts" data on its way to WU servers. But with recent generation Ecowitt and other Fine Offset clones there is not need to intercept WU server bound traffic, because you can specify the IP address of your own server.

Stuart Beaumont

unread,
Jun 19, 2020, 3:38:08 PM6/19/20
to weewx-user
I've made some good progress here. I've set up a Public IP and configured the console with it. The data is now reaching the pi and updating the weewx.sdb file. I confirmed this by looking at the file with DB Browser.

I then installed the Apache web server. (was this necessary?)

When i open the station webpage via file:///var/www/html/weewx/index.html or via http://localhost/weewx i dont get any data being reported. Current Conditions are all N/A.

To recap, i have set the device_type = wu-client

Attached is my weewx.sdb file

As a double check i have configured the weewx.conf file to send the data to Wunderground to a dummy station. The station is live, so the data is being sent there, but again, there is no data populating the charts etc.

Any suggestions? I feel i'm really close now.
weewx.sdb

Garry A Lockyer

unread,
Jun 19, 2020, 3:57:25 PM6/19/20
to weewx...@googlegroups.com
I think you should post your weewx.conf, without any passwords. It should provide the information needed to assist you.

Regards,

Garry Lockyer
E: Ga...@Lockyer.ca


On Jun 19, 2020, at 12:38, Stuart Beaumont <snbea...@gmail.com> 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1e28eed4-5d5c-43ce-92fc-eec3224754dbo%40googlegroups.com.
<weewx.sdb>

Stuart Beaumont

unread,
Jun 19, 2020, 4:07:51 PM6/19/20
to weewx-user
Here you go Garry. Thanks.


On Tuesday, June 16, 2020 at 5:14:13 PM UTC+2, Stuart Beaumont wrote:
weewx.conf

garrya...@gmail.com

unread,
Jun 19, 2020, 6:05:09 PM6/19/20
to weewx...@googlegroups.com

Thanks.

 

I don’t see anything obviously wrong.

 

I would:

 

  • Go back to using the Simulator
    • In weewx.conf, change station_type to Simulator.

 

  • Verify that weewx is starting correctly:
    • sudo /etc/init.d/weewx start
    • tail -f /var/log/syslog
      • Fix any errors reported in syslog

 

  • Verify that web page are being generated
    • 2 -5 minutes after starting WeeWX, depending up the driver/device settings, you should see log entries indicating that reports are being generated.
    • Open /var/www/html/weewx/index.html in a web browser on the same system (so that a web server is not required).
    • Refresh webpage after 2-5 minutes (or when syslog indicates WeeWX has started up another reporting cycle) to verify the web pages are being updated/regenerated.

 

  • After getting webpages reliably generated and updated, change to the desired driver
    • sudo /etc/init.d/weewx stop
    • In weewx.conf, change station_type to “some other driver”
    • sudo /etc/init.d/weewx start
    • monitor syslog: tail -f /var/log syslog
    • If web pages do not get generated, there’s a problem with the driver, or more likely, it’s set up.

 

You only need a web server such as Apache and to open ports on your firewall if you want that system to serve pages to the public side of your firewall.  If you want another server to serve the pages, you FTP the pages from /var/www/html/weewx to the other server.

 

You can delete everything in /var/www/html/weewx – files there are regenerated every reporting cycle.  If you delete everything and they reappear, you know that WeeWX is at least generating and moving some files.

 

Regards,

 

Garry

--

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.

Stuart Beaumont

unread,
Jun 20, 2020, 4:40:46 PM6/20/20
to weewx-user
Thanks Garry

I followed those steps with no joy. Then uninstalled and reinstalled. Same result.

Seems to me there is a driver issue. The interceptor driver with either wu-client, observer or ecowitt as the device type doesn’t show any results.

The weewx.sdb file is being updated so the connection is working.

Anyone with any ideas on how to solve this one?

Garry A Lockyer

unread,
Jun 20, 2020, 4:46:01 PM6/20/20
to weewx...@googlegroups.com
Did you get webpages with the Simulator? Any errors in says log?

Regards,

Garry Lockyer
C: +1.250.689.0686
E: Ga...@Lockyer.ca


> On Jun 20, 2020, at 13:40, Stuart Beaumont <snbea...@gmail.com> wrote:
>
> Thanks Garry
> --
> 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/8f5538c7-5b53-4347-aa55-968ab01253dfo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages