[UPDATED] Weewx Weather Driver With External Forecasting

community_driver

#203

@Cobra I think the biggest issue is the fact that the driver file is not being saved as UTF8 and thus not reading my weewx daily.json which is being outputting as UTF8 and the &deg is not present but the actual unicode character is.

  "outTemp":"46.8°F",
  "windchill":"46.4°F",
  "heatIndex":"46.8°F",
  "dewpoint":"41.2°F",

#204

You can change your weewx template to output without degrees by adding .formatted to the end of the variable, but this still won’t fix the display issues.


#205

I did that. It got even worse so I removed the driver until @Cobra has a better version ready.

What sucks is that I deleted his beta version I had been using which worked great.


#206

Hey, that looks familiar! :stuck_out_tongue:


#207

Does this error mean anything to anybody?

2019-03-28 02:38:15.760 pm errorsomething went wrong: groovy.lang.MissingMethodException: No signature of method: java.lang.String.round() is applicable for argument types: (java.lang.Integer) values: [2] Possible solutions: count(java.lang.CharSequence), find(), toURI(), toURL(), toURL(), toURI()


#208

Is this from the weewx driver?


#209

Yes, I see it in the Hubitat log when I poll the station.


#210

Does it show any line number in the error?
I would suspect that the station is not providing some data the driver wants


#211

better pic...


#212

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


#213

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


#214

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.


#215

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%"
}
}
}


#216

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!


#217

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.


#218

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.


#219

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


#220

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


#221

Andy any work done on this yet ?


#222

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