[SOLVED] What is the status on the Weather binding?

weather
yahoo
weatherbinding
Tags: #<Tag:0x00007fe0551a6ca0> #<Tag:0x00007fe0551a69d0> #<Tag:0x00007fe0551a67c8>

(Alex) #39

@alijaf

Please use the following guide:

Every time you change the loglevel, you have to restart openhab.

If you want to see even more in log, set the level to TRACE to also see the communication with the provider.

If you see nothing, then it could be that the binding is not installed.

To see if weather binding currently is installed, open karaf console and type in:

feature:list | grep Started

If you could not find the “weather” binding, then type in:

feature:install openhab-binding-weather

(Ali) #40

@Celaeno1 Thanks you but when I executed the feature:list | grep started, I didn’t find anything by the name of weather and after that when I am trying to to use feature:install openhab-binding-weather then I am getting the following error
Error executing command: No matching features for openhab-binding-weather/0
However, from the paperUI i can see that Binding is installed. Here’s the screenshot

What could be wrong?


(Alex) #41

@alijaf

Sorry my fault. It has to be:

feature:install openhab-binding-weather1

Maybe you also have to change the log:set commands, too, by adding a 1 at the end.


(Ali) #42

I ran the command and now I can see it is shown in the bindings but nothing in the logs and still the same problem. Nothing is appearing in the sitemap and widget.


(Alex) #43

Did you restart Openhab?


(Ali) #44

Yes many times with sudo reboot command.


(Ali) #45

And I can now see that the darksky is showing 6 API calls today. So that looks bit ok but not sure why the data is not getting displayed even now.


(Alex) #46

@alijaf

Could you please post your sitemap configuration here?


(namraccr) #47

This is not so.


(Alex) #48

@namraccr

Yes, this is true. But I copied this from official documentstion. See here:


(namraccr) #49

You’re referring to this?

Note that the log levels set using the log:set commands are persistent and will be applied upon restart.

I agree it’s poorly worded. It should just say the changes are saved automatically or that they’ll survive a restart…


(Alex) #50

Yes, correct. I missunderstood this. Sorry.


(Ali) #51

Here’s the sitemap

sitemap home label=“My home automation” {
Frame label=“Date” {
Text item=Date
}

Frame label=“Weather in Lombard” {
Text item=Temperature icon=“Temperature” valuecolor=[>25=“red”,>15=“green”,>5=“orange”,<5=“blue”] label=“Temperature [%.2f °C]”
Text item=Humidity icon=“rain”
Text item=Pressure icon=“sun_clouds”
}

//Webview url="/weather?locationId=home&layout=example&iconset=colorful" height=7

Frame label=“Demo” {
Switch item=Lights icon=“light”
Text item=LR_Temperature label=“Livingroom [%.1f °C]”
Group item=Heating
Text item=LR_Multimedia_Summary label=“Multimedia [%s]” icon=“video” {
Selection item=LR_TV_Channel mappings=[0=“off”, 1=“DasErste”, 2=“BBC One”, 3=“Cartoon Network”]
Slider item=LR_TV_Volume

    }

Frame label=“Hue”{
// Bulb1
Switch item= Light1_Toggle
Slider item= Light1_Dimmer
Colorpicker item= Light1_Color
Slider item= Light1_ColorTemp
Switch item= Light1_Alert mappings=[NONE=“None”, SELECT=“Alert”, LSELECT=“Long Alert”]
Switch item= Light1_Effect

            // Bulb2
            Switch          item=           Light2_Toggle
            Slider          item=           Light2_Dimmer
            Slider          item=           Light2_ColorTemp
    }

}}

and here’s the Items.
Number Temperature “Temperature [%.2f °C]” {weather=“locationId=home, type=temperature, property=current”}
Number Humidity “Humidity [%d %%]” {weather=“locationId=home, type=atmosphere, property=humidity”}

// atmosphere
Number Humidity “Humidity [%d %%]” {weather=“locationId=home, type=atmosphere, property=humidity”}
Number Visibility “Visibility [%.2f km]” {weather=“locationId=home, type=atmosphere, property=visibility”}
Number Visibility_Mph “Visibility [%.2f mi]” {weather=“locationId=home, type=atmosphere, property=visibility, unit=mph”}
Number Pressure “Pressure [%.2f mb]” {weather=“locationId=home, type=atmosphere, property=pressure”}
Number Pressure_Inches “Pressure [%.2f in]” {weather=“locationId=home, type=atmosphere, property=pressure, unit=inches”}
String Pressure_Trend “Pressuretrend [%s]” {weather=“locationId=home, type=atmosphere, property=pressureTrend”}
Number Ozone “Ozone [%d ppm]” {weather=“locationId=home, type=atmosphere, property=ozone”}
Number UV_Index “UV Index” {weather=“locationId=home, type=atmosphere, property=uvIndex, scale=0”}


(Alex) #52

@alijaf

please use code fences next time!!

I put all into it, now it’s readable:

.sitemap

sitemap home label=“My home automation” {
    Frame label=“Date” {
    Text item=Date
    }
Frame label=“Weather in Lombard” {
    Text item=Temperature icon=“Temperature” valuecolor=[&gt;25=“red”,&gt;15=“green”,&gt;5=“orange”,&lt;5=“blue”] label=“Temperature [%.2f °C]”
    Text item=Humidity icon=“rain”
    Text item=Pressure icon=“sun_clouds”
    }

   //Webview url="/weather?locationId=home&amp;layout=example&amp;iconset=colorful" height=7

Frame label=“Demo” {
    Switch item=Lights icon=“light”
    Text item=LR_Temperature label=“Livingroom [%.1f °C]”
    Group item=Heating
    Text item=LR_Multimedia_Summary label=“Multimedia [%s]” icon=“video” {
    Selection item=LR_TV_Channel mappings=[0=“off”, 1=“DasErste”, 2=“BBC One”, 3=“Cartoon Network”]
    Slider item=LR_TV_Volume
    }
Frame label=“Hue”{
    // Bulb1
    Switch item= Light1_Toggle
    Slider item= Light1_Dimmer
    Colorpicker item= Light1_Color
    Slider item= Light1_ColorTemp
    Switch item= Light1_Alert mappings=[NONE=“None”, SELECT=“Alert”, LSELECT=“Long Alert”]
    Switch item= Light1_Effect
   // Bulb2
    Switch          item=           Light2_Toggle
    Slider          item=           Light2_Dimmer
    Slider          item=           Light2_ColorTemp
    }
}}

.items:

Number Temperature “Temperature [%.2f °C]”    {weather=“locationId=home, type=temperature, property=current”}
Number Humidity    “Humidity [%d %%]”         {weather=“locationId=home, type=atmosphere, property=humidity”}

// atmosphere
Number Humidity        “Humidity [%d %%]”     {weather=“locationId=home, type=atmosphere, property=humidity”}
Number Visibility      “Visibility [%.2f km]” {weather=“locationId=home, type=atmosphere, property=visibility”}
Number Visibility_Mph  “Visibility [%.2f mi]” {weather=“locationId=home, type=atmosphere, property=visibility, unit=mph”}
Number Pressure        “Pressure [%.2f mb]”   {weather=“locationId=home, type=atmosphere, property=pressure”}
Number Pressure_Inches “Pressure [%.2f in]”   {weather=“locationId=home, type=atmosphere, property=pressure, unit=inches”}
String Pressure_Trend  “Pressuretrend [%s]”   {weather=“locationId=home, type=atmosphere, property=pressureTrend”}
Number Ozone           “Ozone [%d ppm]”       {weather=“locationId=home, type=atmosphere, property=ozone”}
Number UV_Index        “UV Index”             {weather=“locationId=home, type=atmosphere, property=uvIndex, scale=0”}

.
.

Are you sure that all was running before you ONLY changed services\weather.cfg from yahoo to ForecastIo?

in .items file this entry is doubled:

Number Humidity    “Humidity [%d %%]”         {weather=“locationId=home, type=atmosphere, property=humidity”}

(Ali) #53

@Celaeno1 Thanks for providing the updated code. Even though after all of this the issue is still the same and yesterday the system did made some API calls and even after that there.
Also previously the Yahoo Weather was working fine for about an year.


(Alex) #54

Please do the following:

log:set TRACE org.openhab.binding.weather

Restart OH Service, watch the karaf console log:tail

for any messages regarding weather.

Could you also please check this file: weather.config

/var/lib/openhab2/config/org/openhab/weather.config

(Ali) #55

@Celaeno1 Thanks, I was able to get some logs and here are some of the entries.

==> /var/log/openhab2/openhab.log <==

2019-01-09 01:27:39.281 [DEBUG] [org.openhab.binding.weather ] - BundleEvent STOPPING - org.openhab.binding.weather

2019-01-09 01:27:39.291 [DEBUG] [org.openhab.binding.weather ] - ServiceEvent UNREGISTERING - {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={service.id=455, service.bundleid=331, service.scope=bundle, event.topics=openhab/command/*, service.pid=org.openhab.weather, component.name=org.openhab.binding.weather, component.id=309} - org.openhab.binding.weather

2019-01-09 01:27:39.305 [DEBUG] [org.openhab.binding.weather ] - ServiceEvent UNREGISTERING - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.weather.WeatherBindingProvider}={service.id=454, service.bundleid=331, service.scope=bundle, component.name=org.openhab.binding.weather.genericbindingprovider, component.id=310} - org.openhab.binding.weather

2019-01-09 01:27:39.336 [DEBUG] [org.openhab.binding.weather ] - ServiceEvent UNREGISTERING - {javax.servlet.ServletContext}={osgi.web.version=1.13.0, osgi.web.contextpath=/, service.id=458, osgi.web.symbolicname=org.openhab.binding.weather, service.bundleid=331, service.scope=singleton, osgi.web.contextname=custom} - org.openhab.binding.weather

2019-01-09 01:27:39.341 [DEBUG] [eather.internal.bus.WeatherActivator] - Weather binding has been stopped.

2019-01-09 01:27:39.346 [DEBUG] [org.openhab.binding.weather ] - BundleEvent STOPPED - org.openhab.binding.weather

Also got a few more
==> /var/log/openhab2/openhab.log <==

2019-01-09 01:28:28.883 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping WORLDWEATHERONLINE: ProviderMappingInfo[source=localObsDateTime,target=condition.observationTime,converter=UTC_DATE]

2019-01-09 01:28:28.898 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping WORLDWEATHERONLINE: ProviderMappingInfo[source=date,target=condition.observationTime,converter=DATE]

2019-01-09 01:28:28.906 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping YAHOO: ProviderMappingInfo[source=lastBuildDate,target=condition.observationTime,converter=FULL_UTC_DATE]

2019-01-09 01:28:28.921 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping YAHOO: ProviderMappingInfo[source=forecast.date,target=condition.observationTime,converter=SIMPLE_DATE]

2019-01-09 01:28:28.933 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping HAMWEATHER: ProviderMappingInfo[source=ob.timestamp,target=condition.observationTime,converter=UNIX_DATE]

2019-01-09 01:28:28.938 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping HAMWEATHER: ProviderMappingInfo[source=periods.timestamp,target=condition.observationTime,converter=UNIX_DATE]

2019-01-09 01:28:28.944 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping METEOBLUE: ProviderMappingInfo[source=last_model_update,target=condition.observationTime,converter=JSON_DATE]

2019-01-09 01:28:28.951 [TRACE] [er.internal.metadata.MetadataHandler] - Added provider mapping OPENWEATHERMAP: ProviderMappingInfo[source=weather.id,target=condition.id,converter=STRING]

A few more:
2019-01-09 01:28:30.271 [WARN ] [eather.internal.common.WeatherConfig] - Parameter ‘location..latitude’ empty or in wrong format (‘XXXXXXXX’). Check openhab.cfg.


(Rossko57) #56

This looks important. Yahoo didn’t use lat/long, it used “woeid”. But other services will want lat/long.

So youve got those - that should be in weather.cfg of course, and not the “old style” openhab.cfg the error message hints at.
Have a look and see if you have a cached weather.config version, and if so just stop OH, delete that (keeping weather.cfg) and reboot.


(Alex) #57

First of all. Your weather1 binding seems to be stopped. Please check again, if it is installed.
But maybe it is only an old entry from Shutdown OH Service!

Second, if the binding is not installed:
Check $OPENHAB_CONF/services/addons.cfg if there is the following:
binding = weather1

Then check your weather.cfg again.

Longitude and Latitude

Format: xx.xxxx

Then remove the doubled entry from your .items file:

Number Humidity “Humidity [%d %%]” {weather=“locationId=home, type=atmosphere, property=humidity”}

And ONCE AGAIN check the entries of

/var/lib/openhab2/config/org/openhab/weather.config

THIS IS A DIFFERENT FILE!!! or at least delete the file and restart OH


(Ali) #58

@Celaeno1 Thanks a lot for your help and bearing with me. I even had a look at the other file and it didn’t work then I decided to reinstall and I took the backup of important config files and did a fresh installation and now everything works like a charm. Still in the process of fixing the original weather template but so far here’s how it is looking like.