openhab-binding-openweathermap x 2.4.0 x x x Started x openhab-addons-2.4.0 x OpenWeatherMap Binding
openhab-binding-weatherunderground x 2.4.0 x x Uninstalled x openhab-addons-2.4.0 x WeatherUnderground Binding
openhab-binding-yahooweather x 2.4.0 x x Uninstalled x openhab-addons-2.4.0 x Yahoo Weather Binding
openhab-binding-weather1 x 1.13.0 x x x Started x openhab-addons-2.4.0 x Weather Binding
OK.
In your first examples you have in your weather.cfg locationId=home
Then you also have locationId=home2 and locationId=garb
Could please try only one locationId in your weather.cfg?
Hi,
i don’t know if it helps, but as far as i know the openweathermap.key will not work with the old (weather-binding 1.14), even if it’s correkt.
You can test the valdiation in this way:
Type in your browser:
http://api.openweathermap.org/data/2.5/forecast?id=yourid7&APPID=yourkey1-32&lang=de
or:
http://api.openweathermap.org/data/2.5/forecast?id=yourid&APPID=yourkey1-32&lang=de&units=metric
Pls change yourid and yourkey1-32 with your keys. You will see now a json string with your data for the next 5 days in 3-hour-steps.
When changing the keyword forecast to weather you will get a short json string with valid data of the current day.
As i understand the problem is the version no. (2.5), which isn’t correct translated in the weather-binding 1.x. as 2.5 seems to be the the free version and 3.0 is the paid one (don’t know exactly).
So there a two other solutions i tried.
- Solution with http.cfg
http.cfg
# timeout in milliseconds for the http requests (optional, defaults to 5000)
timeout=60000
# the interval in milliseconds when to find new refresh candidates
# (optional, defaults to 1000)
#granularity=
# whether to substitute the current time or state value into the URL
# (optional, defaults to true)
#format=
# configuration of the first cache item - openweathermap
owm_test.url=https://api.openweathermap.org/data/2.5/weather?id=yourid&APPID=yourkey1-32&lang=de&units=metric
owm_test.updateInterval=3600000
# configuration of the second cache item
# Tasmota Release Status (cached twice a day)
#<id2>.url=
tasmotaRelease.url=https://api.github.com/repos/arendst/Sonoff-Tasmota/tags
#<id2>.updateInterval=
tasmotaRelease.updateInterval=43200000
owm_http.items:
// Data from openweathermap via http
// i use this way because regular api-key causes error in the log, when using it with the weather-binding
Number Temperature_owm "Temperatur owm [%.1f °C]" <thermometer_red_earth> (gOWM) {http="<[owm_test:120000:JSONPATH($.main.temp)]"}
Number:Pressure Pressure_owm "Luftdruck owm [%.1f %unit%]" <pressure> (gOWM) {http="<[owm_test:120000:JSONPATH($.main.pressure)]"}
Number Humidity_owm "Luftfeuchtigkeit owm [%d %%]" <humidity> (gOWM) {http="<[owm_test:120000:JSONPATH($.main.humidity)]"}
String CommonId_owm "Himmel owm [%s]" <sun_clouds> (gOWM) {http="<[owm_test:120000:JSONPATH($.weather[0].description)]"}
Number Clouds_owm "Bewölkung owm [%.0f %%]" <clouds> (gOWM) {http="<[owm_test:120000:JSONPATH($.clouds.all)]"}
//Number:Length Sight_owm "Sichtweite owm [%.0f m]" <binoculars1> (gOWM) {http="<[owm_test:120000:JSONPATH($.visibility)]"}
Number Windspeed_owm "Windgeschwindigkeit owm [%.2f m]" <wind> (gOWM) {http="<[owm_test:120000:JSONPATH($.wind.speed)]"}
//Number Winddegree_owm "Windrichtung owm [%.2f °]" <compass1> (gOWM) {http="<[owm_test:120000:JSONPATH($.wind.deg)]"}
DateTime TempTime_owm "Datum Zeit owm [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <clock> (gOWM) {http="<[owm_test:120000:JSONPATH($.dt)]"}
Pls. have a look on your json string, which items a ruled. I get errors sometimes as values are not found in the json string.
The update Interval of 3600000 is equal to 1 hour (as intervall is milliseconds).
As i found out the weather 1.4 can not support Yahoo furthermore as Yahoo stops free information-channels since beginning January.
- Solution:
Using the new OpenWeatherMap-Binding 2.4, which gives you detailed stuff for up to five days and if you want you can aggregate data on a daily base.
I prefer the second version. I made a rule which summarizes the temperatures MIN,MAX and AVG for the next five days and it works as i want . But there are better solutions i think, as i’m a newbie in this “business”
Yeah, I have tried a number of different variations, so that would appear confusing. anyway, my current weather.cfg
# The apikey for the different weather providers, at least one must be specified
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
apikey.ForecastIo=XXXXX
#apikey.OpenWeatherMap=XXXXX
# location configuration, you can specify multiple locations
location.garb.name=(hidden city name)
location.garb.latitude=xx.xxx
location.garb.longitude=-xxx.xxx
#location.home.woeid=
location.garb.provider=ForecastIo
location.garb.language=en
location.garb.updateInterval=120
#location.home.units=
which matches the weather.config in /var/lib/openhab2/config/oeg/openhab
apikey.ForecastIo="XXXXXX"
location.garb.language="en"
location.garb.latitude="xx.xxx"
location.garb.longitude="-xxx.xx"
location.garb.name="(hidden city name)"
location.garb.provider="ForecastIo"
location.garb.updateInterval="120"
service.pid="org.openhab.weather"
I have two items for testing in yourweather.items
Number TempuratureGarb "DarkSkyTemp [%.2f °F]" {weather="locationId=garb, type=temperature, property=current, unit=fahrenheit"}
Number Rain "Rain [%.2f mm/h]" <water> {weather="locationId=garb, type=precipitation, property=rain"}
and the both show up NULL> :-/
But it should be:
/var/lib/openhab2/config/org/openhab/weather.config
Please also check:
/var/lib/openhab2/config/org/openhab/addons.config
is there the following entry:
binding="weather1"
Could you also please post your .sitemap here?
Sorry, typo, to confirm weather.config is at:
/var/lib/openhab2/config/org/openhab/weather.config
Here is what is in addons.config pertaining to bindings.
binding=",weather1,openweathermap"
odd maybe that comma is before weather1?
here’s my sitemap:
sitemap weather label="Weather"
{
Frame label="Weather" {
Text item=TempuratureGarb
Text item=Rain
}
}
although i’m mostly using Habpanel.
Remove that comma
Are these the only binding that you use?
These are the only bindings i have added via PaperUI, I have a manually installed binding, but I would suspect that would not show up in addons.config. either way, it’s a recent addition, the weather issue, was happening before I added the new binding.
removed the comma, but still no values. :-/ even on reboot.
log always gets to this point then nada:
12:21:50.798 [INFO ] [weather.internal.common.WeatherConfig] - ProviderConfig[providerName=FORECASTIO,apiKey=XXXXXXX]
12:21:50.802 [INFO ] [weather.internal.common.WeatherConfig] - LocationConfig[providerName=FORECASTIO,language=en,updateInterval=120,latitude=xx.xxx,longitude=-xx.xx,woeid=<null>,locationId=garb,name=XXXXXX]
Did you delete the addons.config after doing that?
And then clear the cache
And then restart
BUT don’t have high hopes. weather1 never worked for me again in 2.4
I am waiting for the darksky binding V2
In the mean time I use OWMv2 and node-red for darksky
I’m on Snapshot 2.5.0. and got it running with OWM and DarkSky. Perhaps there is a bug in 2.4.0?
Mind you, I didn’t try again on subsequent snapshots.
What happens when you use the following command?
bundle:list | Grep Scheduler
Something like this?
109 x Active x 80 x 0.11.0.201812301624 x Eclipse SmartHome Scheduler Service
I get this:
107 x Active x 80 x 0.10.0.oh240 x Eclipse SmartHome Scheduler Service
Now I’m out. Sorry!
Ok, last try.
Please download the following file:
Inside this archive, go to:
\repository\org\openhab\binding\org.openhab.binding.weather\1.13.0\
extract
org.openhab.binding.weather-1.13.0.jar
Uninstall weather1 binding with PaperUI or remove it from addons.cfg.
Copy above org.openhab.binding.weather-1.13.0.jar into /usr/share/openhab2/addons
Still Null :-/
I think i’m gonna throw in the towel on this for awhile too.
not sure what might be going on…
But maybe something will surface down the road.
thanks again for your efforts
You can also try: 1.12.0 (=older) version of weather1 binding or 1.14.0 (=newer), to be sure that’s not a binding error by itself.
org.openhab.binding.weather-1.12.0.pdf (321.7 KB)
org.openhab.binding.weather-1.14.0-SNAPSHOT.pdf (320.3 KB)
Please rename them to org.openhab.binding.weather-1.12.0.jar and org.openhab.binding.weather-1.14.0-SNAPSHOT.jar first!
Copy above org.openhab.binding.weather-1.12.0.jar into /usr/share/openhab2/addons
or
copy above org.openhab.binding.weather-1.14.0-SNAPSHOT.jar into /usr/share/openhab2/addons
I ended up tearing down the house and rebuilding (openhab and weather), I dug deep to find any errors, and couldn’t find anything, apparently there was a problem somewhere, just wish I could figure out what it was, anyway, after rebuilding, it works… using the official binding in Paper UI…possible I done something wrong in the initial build of Openhab, alas I may never know…thanks again for your help++
Would you be able to share this widget, please?
It’s actually based off this guide. Weather widget example
I had to make some minor CSS changes, and put my images in a different place…
just use that guide, download your images and put them in them in the html folder (your path will look like
html/images/underground/(your pngs go here)
then I just added some css to alter things a bit to fit my scenario.
<style>
table { table-layout: fixed; }
#weather-forecast-table {width:100%;}
#weather-forecast-table td { width: 20%; }
#weather-forecast-table .col-xs-4 {font-size:19px;}
#weather-temp {font-size:40px;}
#weather-temp-sign {font-size:20px;}
#day {font-size:20px;}
#weather-temp {padding:10px;}
</style>
still messing with it a bit. css is far from where I want it, but it’s a start.
oh I also had to change some of the downloaded PNGs naming to match the code.