[RELEASE] FREE Meteobridge/Weatherbridge Weather Station v 1.1.*

Meteobridge Weather Station v1.1.28 released on June 26, 2019

Overview

Meteobridge (www.meteobridge.com) is an inexpensive Linux-based server that is used by many to collect data from your local weather station and distribute it to one or more public weather sources (including Weather Underground, for example). It supports data collection from a large number of popular weather stations, and it offers a local API that allows clients/applications to retrieve the latest weather station data on demand.

This weather station DTH uses local hubAction() calls to provide pretty much all information exposed by The Meteobridge Template HTML API, which it retrieves as a JSON formatted map. While the DTH is optimized for Davis Vantage Pro2 Plus stations, it will report whatever subset Meteobridge provides for any connected weather station.

This device also (optionally) calculates and displays Purple Air Air Quality Index from a specified PurpleAir sensor. If you don't have one of your own, you will need to do a little research on the PurpleAir.com website to find a sensor nearby and then find its device ID from their JSON repository (search the repository for the name displayed for the sensor on the sensor map, then enter the numerical ID of that sensor into Preferences).

As most weather stations do no provide forecast details (hi/lo temps, humidity, probability of precipitation, etc.), this DTH allows selection from 1 of 3 sources for forecast data:

  • Dark Sky: probably the best forecast source for PWS owners, as they provide hyper-local forecast data that probably includes data from your weather station (if you send to CWOP). Note that to use Dark Sky, you will need an API key, available on their web site - this DTH will use about 96 Dark Sky API calls per day;
  • The Weather Company: now owned by IBM, and now the official SmartThings weather service, with location-based forecast data that probably does not include any input from your weather station;
  • MeteoBridge/Davis: Davis Vantage Pro weather stations do provide a calculated forecast string; the code will drop back to use TWC for the rest of the forecast data if you choose this option
  • Weather Underground support has been removed, because SmartThings has replaced the getWeatherFeature() linkage to WU in favor of the above-mentioned TWC support.

Significantly, EVERYTHING that this DTH displays in Tiles is also available programmatically to other SmartApps and WebCoRE pistons. You can thus build apps and integrations based off of changes in any attribute, from temperature and humidity to air quality, lunar phase, wind speed and the like. If interested, have a look at the attributes listed at the top of the source file for the names of the available data points.

Hubitat Compatibility

Thanks to the assistance of @staze and the Hubitat Community plus some code borrowed from Echo Speaks (thanks @tonesto7) this DTH can be used on Hubitat without modification! It will auto-detect the hub platform, and adjust its calls, classes and parameters appropriately for each platform. There are lots of incompatibilities between the two platforms, but clever utilization of Groovy allows a single code base to support both. Of course, on Hubitat there is no UI, but all of the attributes are programmatically available to apps and Rules Engine on that platform.

New in version 1.1.28

MeteoWeather now fully supports the native Hubitat Dashboard Weather Tile. Assigning this device to the Weather Tile will result in this:

MeteoWeather also generates an HTML weather snapshot, designed for use with the HE Dashboard. To access it, create a 2x2 tile in the Dashboard, first select your MeteoWeather device. Then select the "Attribute" template, and assign it to the "myTile" attribute. The resulting display looks like this:

Note that the above display just barely fits within the 1024 character size limitation of the "myTile" attribute.

Important Note for All Users

Since this DTH uses hubAction() for the MeteoBridge data, it will work only when your SmartThings/Hubitat hub and your MeteoBridge/WeatherBridge server are on the same (local) IP network. This approach keeps your password safe(r), but doesn't handle remote IP addresses. On the plus side, it is pretty lightweight to get updates from your meteobridge every minute, unlike using the WeatherUnderground data source.

The GiThub repository for MeteoWeather is here:

Installation

You can either manually copy/save the DTH code, or you can use the following for SmartThings' Github integration:

Owner: SANdood
Name: MeteoWeather
Branch: master

After loading and publishing the DTH, you will need to manually create the device from the Devices page in your IDE. Once created, use your Mobile App to configure the preferences for your new Meteobridge-based Weather Station!

Donations

This work is fully Open Source, and available for use at no charge.

While not required, I do humbly accept donations. If you would like to make an optional donation, I will be most grateful. You can make donations to me on PayPal at https://paypal.me/BarryABurke

Attributions

Powered by DarkSky

Weather forecasts and somne current conditions data (e.g., cloud cover) provided by https://darksky.net/dev

VClouds Weather Icons

Icons provided by VClouds Weather Icons by VClouds VClouds Weather Icons© Created and copyrighted© by VClouds - http://vclouds.deviantart.com/

The icons are free to use for Non-Commercial use, but If you use want to use it with your art please credit me and put a link leading back to the icons DA page - http://vclouds.deviantart.com/gallery/#/d2ynulp

*** Not to be used for commercial use without permission! if you want to buy the icons for commercial use please send me a note - http://vclouds.deviantart.com/ ***

Change Log:

* 1.1.10 Initial Release (March 20, 2019)
2019-03-24 1.1.15 New SmartThings/Hubitat Portability Library, Bug fixes
2019-03-24 1.1.16 Fixed TWC error (state.isHE)
2019-03-26 1.1.17 Major bug fixes, new icons, new myTile attribute for Hubitat Dashboard
2019-03-27 1.1.20 Improved handling of non-existent sensors and missing data
2019-04-02 1.1.23 Major overhaul of template structure for better error handling & efficiency
2019-04-22 1.1.25 Option to use data averaged over the update cycle instead of actual reading

Screen Shot:

6 Likes

Thanks @storageanarchy!

Now if I can just figure out what's freaking out my Meteobridge Nano... =P

Actually, I think there's a bug in my latest meteoTemplate - seems the Nano is very sensitive about these things...I'm workin on it with another user...

any other info?

I've got a thread going here: Buffer filling to 100% after about 36h - Page 2 - meteohub.de

I sent you a PM...

Very cool. I've been thinking about getting a PWS for a while and have been researching, so this is timely for me.

MeteoWeather Station Update, v1.1.20 released on 27 March 2019 @ 6:45pm EDT

Fixes include:

  • Much better handling of non-existent sensors and missing data

NOTE: If the DTH stops updating, please re-save the preferences on the Hubitat device page (open/save preferences on your mobile device for SmartThings).

This update is recommended for ALL users of this DTH.

1 Like

MeteoWeather Station Update, v1.1.23 released on 2 April 2019 at 5:30pm EDT

This release embodies a major overhaul of the MeteoWeather template infrastructure used to gather data from your MeteoBridge/WeatherBridge (et al). Now handles weather stations that do not have the complete complement of sensors. Reduces significantly the amount of data transferred for improved efficiency and reliability (I had reached the maximum string size for the current MeteoBridge devices).

Fixes:

  • Now properly handles missing/uninstalled sensors
  • Shorter communication strings means faster updates

This updated is recommended for ALL MeteoWeather users!!

Where do you get an inexpensive Meteobridge? I was able to flash it to a TP-Link Travel Router once and played around, only to find out that they wanted 90 euro for the license, and because I have an Ambient Weather station, and Ambient Weather didn't sell me the bridge, they (Ambient Weather) wanted $120 US for the right to upload to their server.

I'm now using a different method. Great that you did this for those that already own Meteobridge. I thought it was going to be a great solution for me because it so easily could communicate with both my Ambient Weather bridge and the Accurite brick (Oh, I mean bridge :stuck_out_tongue_winking_eye:) that I no longer use. But the sticker shock sent me looking elsewhere.

MeteoWeather Station Update v1.1.25 released 22 May 2019 at 9:15am EDT

  • Adds a new preferences option to have all values averaged over the last update cycle period
    • Values are optionally averaged over the length of the update cycle.
    • Effectively smooths out the changes, but values get skewed forward in time
    • Really helps stop the "chatter" of wind speed and wind direction
    • Default is no averaging (all actual values) as before - change in device Preferences

This update is not required, but it is recommended

1 Like

MeteoWeather Station version 1.1.28 released 26 June 2019 at 9:55pm EDT

  • Fixes icon display during transition period between night/day and day/night
  • Now displays properly in the Hubitat Dashboard's Weather tile template
    • Wind speed and wind direction fixed. NOTE: this fix required changing the meaning of two attributes:
      • windDirection is now the direction the wind is coming from in degrees (0-360) - was direction text, i.e. NNW
      • windDirectionDegrees is no longer updated
      • windDirectionText is now the wind source direction text (NNW) - was direction degrees, i.e.,
        345
    • Now displays proper weather icon (translated to OpenWeatherMap icons)
  • Now fully supports an "optimized" template call to the MeteoBridge (new preferences option)
  • Use of averaged values is now a preferences option

NOTE: If you have problems getting data to display, please try updating your MeteoBridge system software - there have been fixes made to the MeteoBridge software to address issues discovered with the optimized template and averaged values.

This update is recommended for all users

1 Like

hey @storageanarchy,

Any idea what might be throwing an "read timed out" in my logs recently?

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:26:00.228 am [warn](http://10.0.6.4/device/edit/293)Read timed out

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:25:50.178 am [info](http://10.0.6.4/device/edit/293)getMeteoWeather() completed

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:25:50.067 am [trace](http://10.0.6.4/device/edit/293)getMeteoWeather( yesterday = false )

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:24:17.398 am [info](http://10.0.6.4/device/edit/293)purpleAirResponse() finished

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:24:17.379 am [info](http://10.0.6.4/device/edit/293)purpleAirResponse() status: 200

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:24:17.066 am [info](http://10.0.6.4/device/edit/293)getPurpleAirAQI() finished

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:24:17.056 am [info](http://10.0.6.4/device/edit/293)getPurpleAirAQI() entered

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:34.195 am [warn](http://10.0.6.4/device/edit/293)Read timed out

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:24.112 am [info](http://10.0.6.4/device/edit/293)getMeteoWeather() completed

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:21.600 am [trace](http://10.0.6.4/device/edit/293)getMeteoWeather( yesterday = false )

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:16.440 am [info](http://10.0.6.4/device/edit/293)Initialization complete...

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:16.379 am [debug](http://10.0.6.4/device/edit/293)Using DarkSky

[dev:293](http://10.0.6.4/logs#dev293)2019-08-26 11:23:16.321 am [info](http://10.0.6.4/device/edit/293)scheduling for every 5 minutes

Usually it is your MeteoBridge/WeatherBridge - I suggest rebooting it to see if that clears things up...

giving that a shot. should I be using the "optimized" option in the driver? it's weird the read time out comes after the "complete" message.

"Complete" means the request has been sent and we are waiting for a response. Timed out only happens on Hubitat (not ST) because they have set an arbitrary 10-15sec timeout on async GET requests.

FWIW - I'm pretty sure that there is either a memory leak or a locked socket on MB and it causes the MB to stop responding to template.cgi requests.

And yes, I advise using the optimized option - it cuts the number of characters sent/received from the MB/WB by 80-90%, and reduces the timeouts somewhat.

1 Like

cool. reboot of MB seems to have fixed. And flipped on Optimized. Why is it not the default if it's such a boon? just lack of extensive testing?

No real reason other than it was added recently and I wasn't sure if it was a) stable, and b) consistently accurate (it is).

I'll probably make it the default for new installations in the next release (I don't like silently changing the way something works...)

1 Like

cool. I like the added response time metric. Does around 8s seem reasonable?

Yep, my Hubitats run 7-9 seconds. My SmartThings runs in the 2-4 second range (and that's with requests beinggenerated in the cloud, and responses being returned to the cloud :astonished:

wow. that seems ripe for some debugging by Hubitat... the Hubitat hub should be at least as fast, if not significantly faster...