For code, you can use on of the icons for “code fences” on the upper right for proper formatting.
So, this config works fine with me. so a few questions:
you’re using openHAB2, right?
is your config file called “/services/weather.cfg”?
(full path in my installation is /etc/openhab2/services/weather.cfg)
Ah, great tip on inserting code with one of the icons. I’ll keep that in mind.
Yes, I’m (trying) to use OH2. Currently running on my windows laptop, but once fully configured transferring to a Raspberry pi. Lights are working when I connect to my Nikobus installation. I’m just struggling with the weather and ntp times.
The path to my config file is “C:\openhab2\conf\services\weather.cfg” this is how it was extracted from the zip file.
hmm… That’s odd. I’m just pasting my config, perhaps you’ll see some differences?
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=
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
apikey.Wunderground=xxxxxx
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=
# location configuration, you can specify multiple locations
location.home.name=Gersthofen
location.home.latitude=48.42757
location.home.longitude=10.88241
#location.home.woeid= (required for Yahoo provider)
location.home.provider=wunderground
location.home.language=de
location.home.updateInterval=15
weather.items
/* Wetter-relevante Daten */
Number Weather_Temperature "Outside Temperature [%.1f °C]" <temperature> (Weather, Weather_Chart) {weather="locationId=home, type=temperature, property=current"}
Number Weather_Temp_Max "Todays Maximum [%.1f °C]" <temperature> (Weather, Weather_Chart) {weather="locationId=home, type=temperature, property=max"}
Number Weather_Temp_Min "Todays Minimum [%.1f °C]" <temperature> (Weather, Weather_Chart) {weather="locationId=home, type=temperature, property=min"}
Number Weather_Humidity "Humidity [%d %%]" <temperature> (Weather, Weather_Chart) {weather="locationId=home, type=atmosphere, property=humidity"}
Number Weather_Visibility "Sichtbarkeit [%d %%]" <temperature> (Weather, Weather_Chart) {weather="locationId=home, type=atmosphere, property=visibility"}
Just tryed that and noticed you thought of the same, I changed it to the name of the town I live in but still not working.
I also noticed your provider didn’t begin with a capital letter, mine did. Changed it but no effect.
It seems like OH is checking a wrong config file, always mentioning location1, or is this a standard message ?
Anyway, in the meantime I got ntp working so I can show the current date. Some progress, a little but better than none
No, I only have the openhab_default.cfg file directly in the conf folder, but thats so to be able to use the designer.
This is the error message:
12:23:44.627 [WARN ] [eather.internal.common.WeatherConfig] - Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
12:23:44.628 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=294, bundle=191/mvn:org.openhab.binding/org.openhab.binding.weather/1.9.0.b4]: Updating property weather of configuration org.openhab.weather caused a problem: Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
org.osgi.service.cm.ConfigurationException: weather : Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:97)[191:org.openhab.binding.weather:1.9.0.b4]
at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:82)[191:org.openhab.binding.weather:1.9.0.b4]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Unknown Source)[:1.8.0_111]
Did you ever get wunderground to work? I couldn’t for love nor money, so I switched to forecast.io and voila!
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
weather:apikey.ForecastIo=79081a54cfbe569xxxxxxxxxxxxxxxxx
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
#weather:apikey.Wunderground=
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=
# location configuration, you can specify multiple locations
weather:location.LeDumpier.name=LeDumpier
weather:location.LeDumpier.latitude=nn.0948
weather:location.LeDumpier.longitude=nn.3950
#location.<locationId1>.woeid= (required for Yahoo provider)
weather:location.LeDumpier.provider=ForecastIo
weather:location.LeDumpier.language=en
weather:location.LeDumpier.updateInterval=10
sample items:
// precipitation
Number Rain "Rain [%.2f mm/h]" <water> {weather="locationId=LeDumpier, type=precipitation, property=rain"}
Number Snow "Snow [%.2f mm/h]" <snow> {weather="locationId=LeDumpier, type=precipitation, property=snow"}
Sorry, didn’t get the update earlier and again sorry, if I’m a bit confused, but a few posts earlier, you mentioned, your path is “C:\openhab2\conf\services\weather.cfg”?
I don’t know, if naming is an issue with openHAB2, but it could be, that you should move it to “weather.cfg”. That’s how I use it in my OH2 services-folder: BINDINGNAME.cfg, like weather.cfg oder http.cfg, …
all my binding-configs are located in \etc\openhab2\conf\services\.
I had a similar issue months back that was similar to this. A ghost weather location continued to show up. I eventually just ‘reinstalled’ OH2 and have been fine ever since. At least in the weather department. I would get used to the reinstall of OH.
I believe I had the same issue with ghost weather locations.
I had a locationId referenced in the error logs as . I had updated my weather.cfg to be something completely different, but the error still pointed to
When I searched the full directory for files with in them, I found multiple, old weather.config files stored in /var/lib/openhab2/config/org/openhab and /var/lib/openhab2/config/weather.
When I cleaned out any weather related .config files, and restarted, everything started to work as expected.
There is a separate binding in OH2 for Yahoo Weather. Did you try to remove the yahoo data from your weather.cfg file and see if the binding with Wunderground works? And than install the yahoo weather binding via the Paper UI and configure it separately.
I first started with OpenWeatherMap only. Works fine in OpenHAB1. But not an OpenHAB2. After I did not get this to work I read all the hints here and tried the other providers too. I deleted yahoo from config, but same.
I struggle a bit with setting up weather binding with WeatherUnderground.
My config is as follows:
# 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=
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
apikey.Wunderground=7exxxxxxxxxxx
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=
# location configuration, you can specify multiple locations
location.home.name=home
location.home.latitude=59.182026 (not required for Yahoo provider)
location.home.longitude=11.069714 (not required for Yahoo provider)
#location.home.woeid= (required for Yahoo provider)
location.home.provider=Wunderground
location.home.language=en
location.home.updateInterval=10
Parameter 'location.home.latitude' empty or in wrong format ('59.18203 (not required for Yahoo provider)'). Check openhab.cfg.
2017-01-08 21:53:27.634 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=305, bundle=182/mvn:org.openhab.binding/org.openhab.binding.weather/1.9.0-SNAPSHOT]: Updating property weather of configuration org.openhab.weather caused a problem: Parameter 'location.home.latitude' empty or in wrong format ('59.18203 (not required for Yahoo provider)'). Check openhab.cfg.
org.osgi.service.cm.ConfigurationException: weather : Parameter 'location.home.latitude' empty or in wrong format ('59.18203 (not required for Yahoo provider)'). Check openhab.cfg.
at org.openhab.binding.weather.internal.common.WeatherConfig.parseNumber(WeatherConfig.java:202)[182:org.openhab.binding.weather:1.9.0.201701081510]
at org.openhab.binding.weather.internal.common.WeatherConfig.parseLocation(WeatherConfig.java:151)[182:org.openhab.binding.weather:1.9.0.201701081510]
at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:88)[182:org.openhab.binding.weather:1.9.0.201701081510]
at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:82)[182:org.openhab.binding.weather:1.9.0.201701081510]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1772)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
What could be wrong here? I cannot see that my lat is in wrong format.
Hello MrBoggi, some little questions:
do you use OpenHAB2 on linux or windows? Maybe my problem exists only on windows
Can you provide me the full log of the config?
…
ProviderConfig[providerName=WUNDERGROUND,apiKey=xxxx
LocationConfig[providerName=WUNDERGROUND
…
I tested it with your settings and it is not working too. again, … no binding …