[DEPRECATED] Free Meteobridge Weather Station 1.0.*


(Barry) #1

As of March 20, 2019, this version is no longer supported

Please see here for the latest version:

([RELEASE] Meteobridge/Weatherbridge Weather Station v 1.1.* - Now Also Hubitat-compatible)

Meteobridge Weather Station v1.0.28 updated on January 10, 2019

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).

As most weather stations do no provide forecast details (hi/lo temps, humidity, probability of precipitation, etc.), this DTH allows selection from 1 of 4 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);
  • The Weather Company: now owned by IBM, and now owners of Weather Underground, a reasonable source for forecast data that probably does not include any input from your weather station;
  • Weather Underground: Soon to be retired API can be used to get data specific to your PWS (but only until Feb 15, 2019 as of their latest decision on Jan 1 2019).
  • MeteoBridge: Davis 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

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.

New Features 29 July 2018

MeteoWeather now displays forecast details (hi/low temps & humidity, plus rainfall forecast) for the rest of today and tomorrow, along with historical data for yesterday. This data is sourced from Weather Underground via the built-in SmartThings integration, or (optionally) from Dark Sky, if you have a Dark Sky api key. Open the preferences to configure these new options.

Also, you can choose the source for the daily forecast text (above sun/moon rise/set info). The default is to use whatever Meteobridge returns, but for non-Davis weather stations, this can be blank. Preferences options allow you to select the Weather Underground daily forecast, or the Dark Sky forecast (if Dark Sky is configured).

Updates 05 January 2019

  • Now gets the “yesterday” data separately from the "current’ data, reducing the load on your MeteoBridge (which could occaisionally time out)
  • Added more detail for the current weather indication on the main tile
  • Several ther minor tweaks and optimizations

Updates 10 January 2019

  • Added option to use the new getTwcConditions() and getTwcForecast() call from SmartThings for the forecast data

Note: since this uses hubAction() for the Meteobridge data, it will work only when your SmartThings hub and Meteobridge server are on the same (local) IP network. This approach keeps your password safe®, 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!

Change Log:

* 1.0.00 - Initial Release
* 1.0.01 - Added PurpleAir Air Quality Index (AQI)
* 1.0.02 - Fixed New/Full moon dislays
* 1.0.03 - Cleanup of Preferences page
* 1.0.04 - More tweaking to New/Full moon transitions
* 1.0.05 - Fixed class casting errors
* 1.0.06 - Renamed some attributes for naming consistency
* 1.0.07 - Added pref setting for Lux scale
* 1.0.08 - Increased internal attribute precision for temps & precipitation
* 1.0.09 - Changed to use my Ecobee Suite weather icons (black circles)
* 1.0.10 - Minor display tweaks
* 1.0.11 - Optimized PurpleAir AQI calculations
* 1.0.12 - Converted to BigDecimal for maximum precision
* 1.0.13 - Adjust decimal precision for rainfall (e.g., inches.2 vs mm.1)
* 1.0.14 - Option to use Dark Sky conditions/forecast instead of Weather Underground
* 1.0.15 - Expanded almanac display to include weather forecast
* 1.0.16 - Added today’s forecast data
* 1.0.17 - Extensive formatting changes
* 1.0.18 - Fixed units on forecasted temps
* 1.0.19 - Reduced normal-state log.info messages
— —
* 1.0.20 - Changed “SolRad”
* 1.0.21 - Fixed temperature color on Android
* 1.0.22 - Get yesterday data separately, only when day/night changes
* 1.0.23 - Changed to get yesterday data when the date changes
* 1.0.24 - Optimizations
* 1.0.25 - Use update time from the Meteobridge instead of time we made the http request
* 1.0.26 - Support additional detail for current weather
* 1.0.27 - Added attribution label
* 1.0.28 - Added TWC weather (replacing WU soon)

Screen Shot:


Darksky API build?
[Release] Weather Station Tile 2.0
[RELEASE] Free Ecobee Suite, version 1.6.**
(douglaspitman@me.com) #2

I have noticed that I’m not getting the current outside temperature on the tile. I have a PWS I have connected to Weather Underground (working fine). When I look at the recent activity it only has forecast information. The only blank field I can see in the setup screen is “Meteobridge setup” What is this? Would it be causing my problem?

Thanks,


(Barry) #3

I’m sorry, but the Free Meteobridge Weather Station ONLY works if you are using a MeteoBridge to gateway your weather station’s data to the various weather services. It only gets forecast data from Weather Underground (or DarkSky), and all the rest directly from your weather station via the MeteoBridge.

https://www.meteobridge.com/wiki/index.php/Home

If you search the Community Forum, you will find several Weather Stations that utilize Weather Underground for everything (but note, Weather Underground is deprecating its “free” API access).


(douglaspitman@me.com) #4

Figured it out, I had the wrong IP address…


(Barry) #5

Updated to v1.0.28 on 10 January 2019 at 11:30am EST

*Adds support for new SmartThings getTwcXXX weather source, soon to be replacing Weather Underground.


(Jack R) #7

I’m having trouble setting this app up. I get an error after I hit save " Pleasefill out all required fields"

I’ve entered:

a device name
update frequency
meteobridge ip address
meteobridge user name
meteobridge password

What am I missing?


(Barry) #8

The missing one is usually highlighted with a red bar on the left and red letters…


(Jack R) #9

There are no red bars. Any other suggestion?


(Barry) #10

FWIW, I just tried it from scratch on my own system, and it seems to work fine. I found a couple of errors being reported, but they shouldn’t block the app from closing/saving…

Try selecting “The Weather Company” as the forecast source.

Also - be sure you are doing the setup in the SmartThings Classic app - might not work with Samsung Connect…


(Barry) #11

Try the latest v1.0.29 that I just posted on my github, and let me know if it works. If not, plz turn on live logging, and look for errors when you try to save it.


(Jack R) #12

ok . got the preferences saved. But Not getting any data from Meteobridge. I know the IP address correct. I input it as 192.168.1.42 and its on the same network as my hub. I used the default port of 80.

I did get the forecast data from The Weather Company.

Is there something I need to do inside meteobridge?


(Barry) #13

Check Live Logging for errors - you should be seeing this pair of log entries every “Refresh Frequency” seconds or so:

1:10:02 PM: trace meteoWeatherCallback() finished
1:10:02 PM: trace updateWeatherTiles() finished
1:10:02 PM: info updateWeatherTiles() entered
1:10:02 PM: info meteoWeatherCallback() status: 200

(Jack R) #14

from live logging:

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:21 PM: error java.util.concurrent.TimeoutException: Execution time exceeded 20 app execution seconds: 348165310576897 @line -1 (doCall)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:15 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:15 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:10 PM: error darkSkyCallback: Failed with status code 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:10 PM: info darkSkyCallback() status: 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:09 PM: info getPurpleAirAQI() entered

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:09 PM: info updateTwcTiles()

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:09:09 PM: trace getDarkSkyWeather() entered

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:29 PM: error java.util.concurrent.TimeoutException: Execution time exceeded 20 app execution seconds: 348081835835148 @line -1 (doCall)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:21 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:21 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:21 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:21 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:17 PM: error darkSkyCallback: Failed with status code 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:17 PM: info darkSkyCallback() status: 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:17 PM: error darkSkyCallback: Failed with status code 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:17 PM: info darkSkyCallback() status: 403

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:16 PM: info getPurpleAirAQI() entered

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:16 PM: info updateTwcTiles()

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:08:16 PM: trace getDarkSkyWeather() entered


(Barry) #15

403 error is “forbidden” - are you sure you have the correct user ID and password for your meteoBridge?


(Barry) #16

Also - update your code with the latest I posted earlier to get rid of the darkSky errors…

Then edit and save the settings again to get everything to clean up internally…


(Jack R) #17

using the latest version and checked my login information is correct

log:"

1:17:59 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:59 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:59 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:59 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:55 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:55 PM: info meteoWeatherCallback() status: 200

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:55 PM: error meteoWeatherCallback() - Missing hubResponse.json (200)

9adcb5aa-7cd9-40b6-8c0f-c474f9249e8a 1:17:55 PM: info meteoWeatherCallback() status: 200


(Barry) #18

Edit the meteoweather device in the IDE and change this line (near the top) from this:

def getDebug() { false }

to this:

def getDebug() { true }

Save, publish, and then check the logs again. You should get a "meteoWeatherCallback() headers: " entry - what does it contains?


(Barry) #19

If it still doesn’t work, we need to dig deeper. Some questions:

  1. Which version SmartThings hub are you using?

  2. From the meteobridge admin view in your browser, what’s this information (top box in the “System” tab):

    System

    Platform: TL-MR3020V3 (no USB hub)
    RAM: 60592 kB total, 16932 kB free (72% used)
    SW Version: Meteobridge 3.9 (Jan 13 2019, build 1910), FW 1.3
    Uptime: 6 days, 20 hours, 31 minutes Buffer: 7 items (1%)

(Jack R) #20

I’m using Smartthing V2 classic app
from meteobridge:

Platform: TL-MR3020 (no USB hub)
RAM: 29364 kB total, 4128 kB free (85% used)
SW Version: Meteobridge 3.2 (May 29 2017, build 11222), FW 1.4
Uptime: 1 hours, 13 minutes Buffer: 0 items (0%)

(Barry) #21

Your meteobridge software is nearly 2 years old - there are probably attributes that my code is requesting that version 3.2 can’t handle. Try updating to at least 3.8 (latest is 3.9) - set “get latest on boot” under Version Control, and then reboot your meteobridge…