Number Temperature “Temperature [%.2f °C]” {weather=“locationId=home, type=temperature, property=current”}
SIteMap:
Text item=Temperature label=“Current Temperature” icon=“temperature”
I presume the locationid can be any name I choose?? (currently “home”)
I have registered an API key and it does work, as I have used elsewhere from a JSON script.
You define a label for your item in the item defininition
And then you define a label again in the sitemap…
I recommend that you put everything in the item definition
That keeps the sitemaps simple.
A typical item goes like this:
Yes, I was using the old Version 1 weather binding.
I will try the new one, how do I install that extension? It does not say in the README how to install …
Not sure if I’m up to date but I think the binding is not yet part of the latest openHAB distribution. You can install it via the Eclipse IoT marketplace.
More details on how to do that can be found here
And according to the binding doc you have to be on openHAB 2.3 or newer.
Ok, I have a Local Weather “thing” “On-Line” via the PaperUI … I now want to include a reference to it’s channel in my item file which is currently in a local “conf” folder on my openHAB server (i.e a local install)
Where does the PaperUI store all it’s files (i.e. .things, .items etc) it must be in a different place than my locally installed files … because I don’t see the .things there that I just created with the UI…
(I have done all my other site configuration in local files under “conf” directory in my home folder (on Linux))
Last question: I have a “Local Weather” thing, with a “Current Weather” section but it has no temperature “channel” to link my item to … just a bunch of other channels: #condition, #icon etc
i.e openweathermap:weather:api:local:current#temperature is not there …
The configuration via PaperUI is not stored in a configuration file like the manual configuration but in a database. I don’t know at the moment the exact location of this database but it shouldn’t be edited manually anyway.
But it is no problem to mix UI based configuration with text based configuration. I recommend this part of the docs for some further reading
So in your case you can define the items in a *.items file and link them to the channels of the weather things stored in the database. To find out the channel names just copy and paste them from PaperUI or use VS code as editor.
@hannibal29
Thanks. However I am still not seeing the #temperature channel to link my item to …
Is it because I am running 2.3.0 version of OpenHAB?
If so, what is the correct way to upgrade a manual install (I have an un-zipped intsall image in my home folder on my Linux box) I tried un-zipping the latest snapshot of 2.4.0 to home, and restarted openhab, but the version still shows 2.3.0
EDIT: It seems to be upgraded now, I connect to openHAB with karaf and it says the version 2.4.0-SNAPSHOT Build#1378
It is very confusing though, as when I use my phone to see the website it states version 2.3.0 Build #1378 … weird…
Yes I did see that, and as mentioned earlier I have upgraded. But, that is not the question I wanted answering at the moment. I still have no #temperature item … how do I get it, I don’t need #snow#ice etc …
How does the thing in PaperUI look like? Which channels are shown? How does your items file look like? Are the other channels for your current weather thing working? What happens in the logs if you try to setup the temperature channel? Need more information to have a chance to help here.
If the channel really isn’t there it’s maybe worth opening an issue on github or posting your problem in the original development thread for the binding posted above to get in contact with the binding developer @cweitkamp
Let me chim in for a second. We had a similar discussion in the original thread. The binding will not work with OH2.3. It depends on features which are available in the latest snapshot or since OH2.4.M3 milestone build.
@bmentink After a successful upgrade you have to recreate an existing thing. New channels are not added automatically by the framework to them.
If it does not work afterwards may I ask you to provide a DEBUG log. Thanks.