![]() ![]() ![]() |
|
MickeyD: I’ll post how I got it running when I get home from work and finish my domestic duties :-)
Plus I’ll have to find it again. To be honest I set it up back in Feb and haven’t had to think about it since.
Thanks.
Sony Xperia XA2 running Sailfish OS. https://sailfishos.org The true independent open source mobile OS
Samsung Galaxy Tab S6
Dell Inspiron 14z i5
Here's how I set up weewx with my WeatherFlow Tempest.
I'm running on a debian virtual machine. The process should be almost identical on a raspberry pi.
To start, I installed weewx using the debian instructions on the weewx site. This starts the weewx daemon after it finishes installing.
When installing, you're prompted for location data. This can be located in the tempest app under Settings > Stations
I chose the simulator for the station type at this stage.
After installing weewx, download the weatherflow udp driver from https://github.com/captain-coredump/weatherflow-udp
Stop the service
service weewx stop
Install the driver using the instructions included.
wee_extension --install weatherflow-udp-master.zip
Edit your weewx.conf file (usually /etc/weewx/weewx.conf). Change the line from station_type = Simulator to station_type = WeatherFlowUDP
Paste the following above (or below) the [Simulator] section. You'll need to change ST-000000999 to your station ID (found in the tempest app under Settings > Stations > Manage Devices, or copy it from what's reported in the log file below)
[WeatherFlowUDP]
driver = user.weatherflowudp
log_raw_packets = True
#udp_address =
#udp_address = 0.0.0.0
udp_address = 255.255.255.255
udp_port = 50222
udp_timeout = 90
share_socket = False
[[sensor_map]]
outTemp = air_temperature.ST-00000999.obs_st
outHumidity = relative_humidity.ST-00000999.obs_st
pressure = station_pressure.ST-00000999.obs_st
#lightning_strikes = lightning_strike_count.ST-00000999.obs_st
#avg_distance = lightning_strike_avg_distance.ST-00000999.obs_st
outTempBatteryStatus = battery.ST-00000999.obs_st
windSpeed = wind_speed.ST-00000999.rapid_wind
windDir = wind_direction.ST-00000999.rapid_wind
#luxXXX = illuminance.ST-00000999.obs_st
UV = uv.ST-00000999.obs_st
rain = rain_accumulated.ST-00000999.obs_st
windBatteryStatus = battery.ST-00000999.obs_st
radiation = solar_radiation.ST-00000999.obs_st
Save and exit. Restart the weewx service
service weewx start
Check that the service is running and receiving data. You should see data being broadcast every few seconds
tail -f /var/log/syslog
Output looks something like:
Aug 23 22:17:35 debianBase /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address 255.255.255.255 on port 50222, with timeout 90 and share_socket False...
Aug 23 22:22:06 debianBase /weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'HB-00012345', 'type': 'hub_status', 'firmware_revision': '170', 'uptime': 3127304, 'rssi': -46, 'timestamp': 1629714125, 'reset_flags': 'BOR,PIN,POR', 'seq': 312510, 'fs': [1, 0, 15675411, 524288], 'radio_stats': [25, 1, 0, 3, 14968], 'mqtt_stats': [1479, 178]}
Aug 23 22:22:08 debianBase /weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00000999', 'type': 'rapid_wind', 'hub_sn': 'HB-00012345', 'ob': [1629714127, 0.19, 181]}
Aug 23 22:22:08 debianBase /weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00000999', 'type': 'device_status', 'hub_sn': 'HB-00012345', 'timestamp': 1629714127, 'uptime': 3518772, 'voltage': 2.681, 'firmware_revision': 156, 'rssi': -76, 'hub_rssi': -76, 'sensor_status': 0, 'debug': 0}
Aug 23 22:22:09 debianBase /weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00000999', 'type': 'obs_st', 'hub_sn': 'HB-00012345', 'obs': [[1629714127, 0.18, 0.2, 0.25, 180, 3, 1029.38, 9.88, 81.42, 0, 0.0, 0, 0.0, 0, 0, 0, 2.681, 1]], 'firmware_revision': 156}
Aug 23 22:22:14 debianBase /weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00000999', 'type': 'rapid_wind', 'hub_sn': 'HB-00012345', 'ob': [1629714133, 0.22, 180]}
If that's all working well, edit weewx.conf and change log_raw_packets to False. If not, try changing the udp address line to one of the other options and try again.
Next, I wanted to purge the data from the simulator from my weewx database and start fresh. To do that, delete weewx.sdb, and remove any generated content
rm /var/lib/weewx/weewx.sdb
rm -rf /var/www/html/weewx
Finally, I restarted the weewx service
service weewx restart
After about 5 minutes it should generate the reports in /var/www/html/weewx. Either point your webserver to that location and view it, or open the file directly.
You can choose to have weewx automatically upload data to various weather websites. I use Pwsweather and CWOP. Pwsweather is important to me because my irrigation system can connect to Aeris Weather for rainfall data. It took about 3-4 days after starting to send data for the website to change from reporting my status as "Bad data" to "Active".
I did have trouble to start with as I have a separate network for IoT devices with device separation. That meant that weewx wasn't receiving the broadcast packets until they were on the same subnet (obvious in hindsight, but I wasted an evening trying to figure that out).
Hopefully that helps others get started. I'm happy to post more detail around any of my setup, but the weewx config file has clear instructions. The hardest parts were working out which driver to use, what udp address to use, and setting up the sensor map.
And I think I found my problem:
I did have trouble to start with as I have a separate network for IoT devices with device separation. That meant that weewx wasn't receiving the broadcast packets until they were on the same subnet (obvious in hindsight, but I wasted an evening trying to figure that out).
May have to create my VM on the IoT network :) - thanks very much for posting this!
Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)
Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.
Sony Xperia XA2 running Sailfish OS. https://sailfishos.org The true independent open source mobile OS
Samsung Galaxy Tab S6
Dell Inspiron 14z i5
@MickeyD Have successfully got this running on a Raspberry Pi Zero on my IoT network - thanks very much for that!
A couple of things:
1) Am also using the Belchertown Skin: https://obrienlabs.net/belchertownweather-com-website-theme-for-weewx/
2) Successfully feeding into PWS Weather - you'll note your weather station goes into "Initiating" mode when data is flowing through to it.
There is also a Weatherflow UDP Listener which publishes to MQTT and even InfluxDB: https://github.com/vinceskahan/weatherflow-udp-listener (am running this on the same Pi Zero with a hole punched through the firewall for Home Assistant).
Lastly, am using https://github.com/jjvdgeer/weatherflow-udp instead of the above only because it backfills from the Weatherflow API meaning gaps are automatically filled - this however takes a little while to do running on a Pi Zero :)
Configuration for this plugin for the Tempest:
[WeatherFlowUDP]
driver = user.weatherflowudp
log_raw_packets = False
#udp_address =
#udp_address = 0.0.0.0
udp_address = 255.255.255.255
udp_port = 50222
udp_timeout = 90
share_socket = True
token = api-key-here-from-weatherflow
[[sensor_map]]
outTemp = air_temperature.ST-00048466.obs_st
outHumidity = relative_humidity.ST-00048466.obs_st
pressure = station_pressure.ST-00048466.obs_st
lightning_strikes = lightning_strike_count.ST-00048466.obs_st
avg_distance = lightning_strike_avg_distance.ST-00048466.obs_st
outTempBatteryStatus = battery.ST-00048466.obs_st
windSpeed = wind_speed.ST-00048466.rapid_wind
windDir = wind_direction.ST-00048466.rapid_wind
luxXXX = illuminance.ST-00048466.obs_st
UV = uv.ST-00048466.obs_st
rain = rain_accumulated.ST-00048466.obs_st
windBatteryStatus = battery.ST-00048466.obs_st
radiation = solar_radiation.ST-00048466.obs_st
Also replace ST-00048466 with your station ID.
Was pretty easy to get running once I was pointed in the right direction.
Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)
Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.
Nice work - this will be very useful for when mine arrives.
I just got an email from Tempest...
We have an important message to share with you regarding your Tempest device. In our production center in Daytona Beach, FL, our team will typically apply a wind direction offset of 180 degrees for every device being shipped to the southern hemisphere. It has come to our attention that your device may not have this configuration pre-loaded. The result would be a wind direction report that is 180 degrees off actual or to put it simply a backwards wind direction reading.
It looks like the offset needs to be applied in the app, which I presume means the local data feed will be 180 degrees out of sync?!
Will wait to confirm once I receive it, but won't be all that impressed if that is the case.
SumnerBoy:
Nice work - this will be very useful for when mine arrives.
I just got an email from Tempest...
We have an important message to share with you regarding your Tempest device. In our production center in Daytona Beach, FL, our team will typically apply a wind direction offset of 180 degrees for every device being shipped to the southern hemisphere. It has come to our attention that your device may not have this configuration pre-loaded. The result would be a wind direction report that is 180 degrees off actual or to put it simply a backwards wind direction reading.
It looks like the offset needs to be applied in the app, which I presume means the local data feed will be 180 degrees out of sync?!
Will wait to confirm once I receive it, but won't be all that impressed if that is the case.
I received the same email. If you read the rest of the email it does tell you how to go about correcting that problem...180deg offset
Cheers
Yes - but my concern is that the offset is only applied at their servers, rather than on the device itself - meaning any locally retrieved data (i.e. via UDP) will be incorrect.
SumnerBoy:Yes - but my concern is that the offset is only applied at their servers, rather than on the device itself - meaning any locally retrieved data (i.e. via UDP) will be incorrect.
Danite:
If it does end up being an issue, if you were interested you could put it to them that you will buy another one half price. I would be happy to pay the cost (around $250?) and you send on your original one and keep the replacement.
Will keep that offer in mind ;)
SumnerBoy:
Yes - but my concern is that the offset is only applied at their servers, rather than on the device itself - meaning any locally retrieved data (i.e. via UDP) will be incorrect.
I can confirm the offset is loaded onto the hub. Basically when you have the app open your phone will communicate directly to the hub over Bluetooth (it is very seamless). It is really no biggie.
Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)
Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.
Ah ok - that's fine then - thanks @michaelmurfy.
Sorry @danite - looks like you are out of luck this time!
It has come to our attention that your device may not have this configuration pre-loaded.
Reading between the lines this can be loaded at a later date. Which is what I understand Michael Murphy said in his post.
Sony Xperia XA2 running Sailfish OS. https://sailfishos.org The true independent open source mobile OS
Samsung Galaxy Tab S6
Dell Inspiron 14z i5
Yeah I was worried it was on the device (outside bit) itself which was not configurable once it left the factory, and any offsets would have to be applied at their servers.
But forgot about the hub which makes sense for the place where all post processing of data takes place.
|
![]() ![]() ![]() |