I’m trying to populate a few weather items into my sitemap. I’ve tried setting up the Weather binding, and I’ve also tried following the wiki sample instructions for the Yahoo Weather icons
( https://github.com/openhab/openhab/wiki/Samples-Tricks )
Neither one is producing results. For simplicity, I’ll stick with the Yahoo sample from the wiki for now. Here are the steps I’ve taken:
-
I have successfully downloaded and renamed the weather icons to the webapps/images directory.
-
I’ve created the xsl file as instructed, copying the code directly from the wiki page. Was I supposed to edit something in that code?
-
I created the translation map for the weather code numbers. I know this one works correctly, because of a result I will explain in a moment.
-
I added the number item to my .items file. I edited the region code in the URL to be for my region. (Wiki didn’t explain having to do this part, but I dug into the yahoo API a bit and figured it out. As a non-programmer, this kind of thing is still very new to me!)
-
I added a text item to my sitemap, using a direct copy/paste of the sample code with no edits.
Results: The text item shows up on the UI, but it’s blank aside from the label. I took a look at the log and saw that it was complaining "Could not find a mapping for ‘-’ in the file ‘yahoo_weather_code.map’. So, I added a “-” line to the map file, and set it to say “error.”
Now when I reload the UI, the text item says “error” instead of being blank, and there are no more errors in the log. I take this to mean that the transformation map is set up correctly.
Unfortunately, I’m still not getting any weather-related results.
I suspect that the error is in the xsl file? Maybe I was supposed to edit something in there? Or maybe Yahoo has changed something in its output since the wiki was last updated?