Weatherbinding not working (again, sigh)

weatherbinding
Tags: #<Tag:0x00007fd311dbe908>

(Kees Van Gelder) #1

Never got this to work again via the binding. Opted for http call. That worked well
Sadly my weatherbinding again isnt working.
it used to work… but after some updates, upgrades etc, it suddenly doesnt anymore.

My weather.cfg file looks like this:

apikey.Wunderground=exxxxxxxxxxxx2
# location configuration, you can specify multiple locations
location.home.name=home
location.home.latitude=51.000
location.home.longitude=5.582
location.home.provider=Wunderground
location.home.language=en
location.home.updateInterval=30 

Sitemap:

Frame {
			Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
			Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
			Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]																		
			Text item=Weather_Humidity valuecolor=[>45="blue",>35="green",>5="orange",<=5="red"]	 label="Luchtvochtigheid" icon="humidity"
			Text item=Weather_Pressure valuecolor=[>1015="red",>1012="green",>900="orange",<=900="blue"] label="Luchtdruk" icon="pressure"	
			Text item=Temp_Max_FC valuecolor=[>30='red', >25="orange",>15="green",>5="orange",<=5="blue"]
			Text item=Temp_Min_FC		valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
                    Text item=Condition
	                Text item=CommonId
                    Text item=Wind_Speed_Mph 
	                Text item=Wind_Speed_Beaufort
                    Text item=Wind_Direction
                   Text item=Wind_Degree
                   Text item=Wind_Gust_Mph
                  Text item=Rain
                  Text item=Snow
                  Text item=Precip_Probability
                  Text item=Precip_Total
	              Text item=UV_Index2
                  Text item=UV_Index	  valuecolor=[
				Uvi_Uvi=="NULL"="#D3D3D3", // lightgray
				<3="#006400", // darkgreen
				<6="#FFD700", // gold
				<8="#FF8C00", // darkorange
				<11="#DC143C", // crimson (red)
				>=11="#4B0082" ] // indigo
                        Text item=Ozone
                        Text item=Station_Name
                   	Text item=Station_Id
	                Text item=Station_Latitude 
	               Text item=Station_Longitude
	              Text item=Station_Name2
		       }

items file (I will not show the enitre list, channel is the same, the OWM channel was just to test another service)

String   Condition           "Condition [%s]"               <sun_clouds>     (Weather)       {weather="locationId=home, type=condition, property=text"}
Number   Wind_Speed_Mph      "Windspeed [%.2f km/h]"        <wind>           (Weather)       {weather="locationId=OWMhome, type=wind, property=speed"}
Number   Wind_Speed_Beaufort  "Windsnelheid Beaufort [%d]" <wind> {weather="locationId=home, type=wind, property=speed, unit=beaufort"}
String   Wind_Direction      "Wind direction [%s]"         <windrose>           (Weather)       {weather="locationId=home, type=wind, property=direction"}
Number   Wind_Degree         "Wind degree [%.0f °]"       <wind>           (Weather)       {weather="locationId=home, type=wind, property=degree"}

I checked that my Api was correct, tried a different weatherservice (OWM)
Same results

Log file just mentions items like:
cannot retrieve item 'Wind_Speed_Beaufort' for widget org.eclipse.smarthome.model.sitemap.Text

I cleared my cache and restarted OH. No effect.
i checked other posts, apparently sometimes an old copy is kept in
openhabianpi/openhab-share/openhab2-userdata/cache/org.eclipse.osgi/
but folders there are all 0 byte and created today.

Deleted the weather.cfg in openhab-share/openhab2-userdata/config/org/openhab/ and restarted, did not help

Anybody has a suggestion on what to do?


(Rich Koshak) #2

The error indicates that the sitemap can’t find the Item Wind_Speed_Beaufort. Check your items file for syntax errors.


(Kees Van Gelder) #3

Thanks, I will. Just surprised that it worked for the longest time and then suddenly none of them are found. Anyway, will try to go through it with a fine comb (again) and see if I can find a typo

Items: Wind_Speed_Beaufort
Sitemap: Wind_Speed_Beaufort

but they really look the same to me. Probably a typo somewhere else


(Rich Koshak) #4

Designer is made for this sort of thing. Even if you don’t use it for day to day config development it should be the first thing to use if you have even the hint of a syntax error anywhere.


(Kees Van Gelder) #5

Pulled it through designer several times… sitemap and items file show no mistakes :frowning:
Oh well, will keep looking


(Rich Koshak) #6

Look in events.log to see if the items are being updated.


(Kees Van Gelder) #7

none of my weather items seem to even appear in my events log.
I suspect that is not good :wink:


(Rich Koshak) #8

Not bad necessarily. It just means they are not being updated, but you already knew that.

I’d try casting a rule to print their state to see if the other exist for rules or whether they are missing there as well. If they generate errors in the roles you know something is wrong with the others themselves.

Have you restarted oh, just to make sure you are starting from a clean slate? Any errors in the logs during startup?


(Kees Van Gelder) #9

yes, I have restarted. Didnt see any startup errors, other than that the weather items couldnt be retrieved.
Actually retsrted several times. Not sure what ‘clean state’ is. I stopped oh2, removed cache and temp and restarted
I will do the rule as you suggest, but I guess I may get an ‘item not found’ there as well.

I may do a seperate sitemap just with weather items, and maybe a seperate items file and see what that does.
Something tells me that when I find it I will triple facepalm myself


(Kees Van Gelder) #10

OK, rule doesnt generate errors, works as expected, but sees the state of the items as NULL


(Rich Koshak) #11

Ok, the others exist but the NULL means uninitialized.

Still seeing the sienna errors?

Despite the sitemap error logs, do the lines appear on the sitemap? I would expect their states to appear as “-”.

One more thing to check is make sure you haven’t exceeded your API calls for the day and you are out of drops.


(Kees Van Gelder) #12

Not sure what a Sienna Error is
indeed the “-” appears.

I had checked the API calls already when I checked if my API was still correct and not exceeding, in fact nothing used at all for a while. Still have 30 drops
If I let an ESP8266 make an API call it works well.
Just to be sure I also used OpenWeatherMap to see if that worked… same result: no data

Hmm… mysterie


(Rich Koshak) #13

Sitemap errors is what I meant. On the phone and autocorrect never works well for me.

Next thing to try is to reinstall the binding.

If that doesn’t work I can post how I pull wunderground info using the HTTP binding.


(Kees Van Gelder) #14

reinstalled… retstarted OH, made sure my weather.cfg was still ok… no prevail, still empty itmes.
So yes if you can show me the http binding pull I would appreciate it. T.b.h… the weatherbinding has shown itself to be pretty fickle in the past as well., so maybe I shld not waste more of your and my time on it and if in future I want to pull the 10 day forecast, maybe the http binding (with a JSON I presume) would be better anyway.
So yes, please., Thanks

The frustrating thing is… it has worked in exactly this config. Then months ago, it stopped, got it working again by deleting the copy cfg file (as I have done now too), and now again trouble

Rich, I think I already found your setup https://community.openhab.org/t/oh1-8-wunderground-config-ditch-yahoo/28074/10
Works wonderwell.

Thanks
weer
(thats what we want to see, thanks a bundle)


(Rich Koshak) #15

I’ve made some changes to it since that posting. Later today I’ll post my current setup. But it looks like this will keep you going.

One word about using current conditions and forecast. Both calls count against your API limit so set the refresh accordingly.


(Kees Van Gelder) #16

Looking forward to that, but yes, currently I am quite happy. Much more control than with the binding.
Indeed, both count, but I think I have 500 calls/day so with each updating every 8 minutes I guess I am good.
Thanks a lot… really happy with it and with all your other help.

I will try to read the min temps of all forecast days and see for a given plant date if one comes uncomfortably close to zero


(Rich Koshak) #17

Posted the full setup here


(Kees Van Gelder) #18

Thank you!!