[UPDATED] Weewx Weather Driver With External Forecasting

Where the driver stopped seems to be wind gust
Is your station providing this data?

Yes, as shown in the above jpg. windGust 4km/h

Maybe the driver is not stripping off the units before it tries to do the calculation.

I'm sorry but this driver needs to be rewritten as soon as I can get to it
WU has changed all the api calls so I have to rewrite it for that.
I'll have a look at any other errors when I do.

OK, Thanks.
Here's my json output for future reference.

Thanks
Mike

{
"title":"Current Values",
"location":"xxx",
"time":"28/03/19 15:45:00",
"lat":xxx",
"lon":"xxx",
"alt":"72 meters",
"hardware":"WS8681",
"uptime":"0 days, 1 hour, 13 minutes",
"serverUptime":"0 days, 1 hour, 13 minutes",
"weewxVersion":"3.9.1",
"stats": {
"current": {
"outTemp":"16.2°C",
"windchill":"16.2°C",
"heatIndex":"16.2°C",
"dewpoint":"1.8°C",
"humidity":"38%",
"insideHumidity":"27%",
"barometer":"1035.5 mbar",
"barometerTrendDelta":"3 hours",
"barometerTrendData":"-1.7 mbar",
"windSpeed":"1 km/h",
"windDir":"165°",
"windDirText":"SSE",
"windGust":"6 km/h",
"windGustDir":"135°",
"rainRate":"0.00 cm/hr",
"UV":"0.0",
"ET":"0.00 cm",
"solarRadiation":"440 W/m²",
"insideTemp":"26.4°C"

},

"sinceMidnight": {
"rainSum":"0.00 cm",
"maxtemptoday":"16.9°C",
"mintemptoday":"4.1°C",
"maxinsidetemptoday":"26.4°C",
"mininsidetemptoday":"18.5°C"
}
},

"almanac":{
"sun":{
"sunrise":"05:39:33",
"sunset":"18:22:55",
},
"moon":{
"phase":"Last quarter",
"fullness":"45%"
}
}
}

Just piling on here to say I'm following this thread with great interest. I have a Davis VantagePro2 monitored by weewx on r-pi, like many others. I found this thread when searching for ways to do two things:

  1. Mine weewx for stats on my local weather station's rain, temp, wind and solar data for display on tiles on dashboards
  2. Use change in status of weewx stats, like rain has started or wind is gusting, to trigger other events such as voice notifications.

The approach seems to be a combination of adding a 'skin' to weewx (from cobra and sgrayban) that isn't meant to be viewed by people but read by an App as a Device in Hubitat. You add a Device and App in Hubitat (from cobra) which is a framework for devices, including one (Weather Switch) that knows how to read and format weather info in dashboard tiles. weewx data can be mined and presented thru this Weather Switch App/Device. Hope I have this right.

My read on the above is that the first attempt at adding weewx as a device were working ok but needs more work due to API changes to be ready for broader use. Please add my vote to those with high interest for this feature to expand Hubitat into local weather monitoring.

Thanks for all your work!

1 Like

Welcome to the Hubitat Community!

How did you get from Davis to Weewx on the RPi? Are you using the USB data logger?
I just ordered a hub for may Dad on the Easter Weekend Sale that @patrick posted.

Planning to merge temp/humidity data from my old Acurite Bridge I'm sending him, together with wind and rain data he's getting from his Vantage Vue 2, so instead of the Vantage Vue console, he'll be able to view it locally from their computers, tablets and phones in the HE Dashboard app using @Cobra's Weewx driver. He's been experiencing the annual failures with both Davis and aftermarket temp/humidity sensors due to salt air (apparently common with those). We replaced the temp/humidity sensor while I was there and didn't even work for 24 hours before failure.

Correct, I have a VantagePro2 "Envoy" (the weather receiver without a display) and the Davis USB data logger installed. That is cabled to a RPi dedicated to running weewx and uploading stats to various sites. Weather Underground is the prime site for stats (KTXFLOWE40 is the station name) but it seems silly to bounce out to the Internet for local weather stats when they're available on the LAN.

One idea I have for this is to use temp/humidity data to trigger runs of an attic fan on a z-wave switch.

1 Like

Due to the WU changes, my weewx driver is not running too well atm :slight_smile:
The Weewx part works ok it’s just the connection to WU to get the forecast data
I’ve prettry much completed the stand alone WU driver and I’ll be posting an update to that probably tomorrow. (Work and real life permitting)
The weewx & external driver is a bit more complicated so will take a few days for me to sort out (as soon as I can fit it in with all the other stuff I’m doing)

I’m hoping to add dark sky as an external option as well as recoding it for the new WU api as the new WU api does not appear to do alerts.

I’ll probably have to give the ability to use bits from WU and alerts from dar sky.

Andy

2 Likes

Let me know if you need a beta tester :slight_smile:

Andy any work done on this yet ?

Not had a moment to look at it yet.
I’ve been really tied up with other stuff.
Currently, I’m just using the standard WU driver and ignoring weewx.
I know, very bad of me! :slight_smile:

Andy

Hopefully you can bring back the alerts. Thanks for all your work..

You mind if I rip out the weewx and create a new driver with it ?

Carry on, and thanks for asking.
My dev / support time is really limited atm

Andy

1 Like

Thanks mate !

So I installed Weewx on RPI and added the Netatmo extension. I now installed your driver and pointed the IP at my local weewx IP address (RPI).

I receive the following error:

[dev:3173](http://192.168.7.201/logs#dev3173)2019-06-16 10:34:10.143 am [error](http://192.168.7.201/device/edit/3173)something went wrong: org.apache.http.conn.HttpHostConnectException: Connect to 192.168.7.220:800 [/192.168.7.220] failed: Connection refused (Connection refused)

I'm thinking it is the port?

I would think so.
Do you have weewx installed on port 800?
The easiest way to check is to try it in a browser first.

Andy

I can view it in a browser at port 80 and via ssh at port 22.

When I try port 80 in the driver I get the following log:

[dev:3173](http://192.168.7.xxx/logs#dev3173)2019-06-18 07:03:04.037 am [error](http://192.168.7.201/device/edit/3173)something went wrong: groovyx.net.http.HttpResponseException: Not Found

[dev:3173](http://192.168.7.xxx/logs#dev3173)2019-06-18 07:03:04.018 am [debug](http://192.168.7.201/device/edit/3173)Weewx Driver - DEBUG: Weewx: ForcePoll called

When I try port 22 I get the following log:

[dev:3173](http://192.168.7.xxx/logs#dev3173)2019-06-18 07:03:56.132 am [error](http://192.168.7.201/device/edit/3173)something went wrong: java.net.SocketException: Connection reset

[dev:3173](http://192.168.7.xxx/logs#dev3173)2019-06-18 07:03:55.771 am [debug](http://192.168.7.201/device/edit/3173)Weewx Driver - DEBUG: Weewx: ForcePoll called

I would not expect it to work on port 22 unless your weeewx is configured to present webpages on that port.
Looking at the error message it's saying that it can't find the page it wants (the json file)
It doesn't look like that it is pointing to the correct path?

This doesn't look correct..
http://192.168.7.xxx/logs#dev3173

The error looks like you are trying to connect to maker api

My settings are the same as yours (except the local ip)

Standby — I need to install the Hubitat weewx driver.

BRB