[Solved] Beginners problem with ["TargetTemperature"]

  • Platform information:
    • Hardware: raspi Zero W
    • OS: _openhabianpi
    • openHAB version: 2.2.0-1
      I managed to connect my Viessmann heater with the Vitotronic binding and can display all the values and I can send switches to the heater. Now I want to change a temperature and send it to the heater.

It took me some time until I figured what should be necessary to make a temerature number item controllable.
Its the parameter [“TargetTemperature”].

So I added this parameter to my item like that:
Number party_temp “Heizung Partytemperatur [%.1f °C]” (GF_Boiler, gHeating) [“TargetTemperature”]
But unfortunately nothing changes in basic UI and I cannot enter a temperature. I is still a display only .
Am I missing something ? I followed the example given in the documentation but I am also not sure what to expect.

For variables I set, if they are not already provided by some other means, I create an Item and set/get the values within rules.

For example, I created an item “AllOutsideLightsOn” as a switch, and when a condition arose that triggered the necessary condition to fire a rule, within the rule I put “AllOutsideLightsOn.SendCommand(ON)” so that there would be a value to show on the UI, and I also sent commands to each of the outside lights to turn on.

(Without knowing the specifics of your control binding, the following may or may not be applicable)
You might want to consider setting up an item “TargetTemperature” as a number, then shown as a slider on the GUI (within some reasonable ranges). Anytime TargetTemperature updated, fire a rule to send a command with the updated value to your Viesmann heater item.

Hello Mike


you “only” defined the item. To change it, you need a setpoint entry in your sitemap.
Details you can find here

Regards, Michael

Thank you Michael.
I tried that and put the following statement in my sitemap

Frame label="Garage" {
  Switch item=Garage_Tor_Antrieb_Sperre label="Sperre Garagentor"
  Switch item=Garage_Tor_Antrieb label="Garagentor" visibility=[Garage_Tor_Antrieb_Sperre==OFF]
  Setpoint item=party_temp  "Heizung Partytemperatur[%.1f °C]" minValue=20 maxValue=30 step=1                          

Unfortunately my sitemap doesn’t load anymore and gives this error:

2018-02-13 15:54:01.684 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Ranch1.sitemap'

2018-02-13 15:54:02.007 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'Ranch1.sitemap' has errors, therefore ignoring it: [18,29]: no viable alternative at input '"Heizung Partytemperatur[%.1f °C]"'

Where is my mistake ?

Can you show us your items?

I see your mistake, you don’t need to define "Heizung Partytemperatur[%.1f °C]" in your sitemap, you should have a label instead that would simply say ‘temp’ or some other text of your choosing, and maybe an icon.

Your problem is the different structure between items and sitemap files.

With an items file, the structure is defined by the order of the properties.

<itemtype> <item> <label> ...

Using the sitemap, you need to prefix the property with the type

<UIElement> item=<item> label=<label>
Setpoint item=party_temp  label="Heizung Partytemperatur[%.1f °C]" minValue=20 maxValue=30 step=1

And, by the way, if you didn’t omit a definition, your item won’t do anything, because it is not linked to a binding or a rule. Your item is not connected to any hardware.

Your [“TargetTemperature”] is just a tag used by Homekit or Alexa to identify the special items, it has nothing to do with the real hardware behind.

Not entirely accurate, the part of the item definition text in square brackets is the part that gets displayed as the state in the sitemap item. Using your example he would have that whole text displayed at the label text, which he does not need.

In the Items file, the string for the description gets displayed in paper UI as the label (without the part in square brackets, that part is used to tell the GUI how to display the state), in the sitemap you choose your own label for each control and don’t worry about the brackets it already knows how to display the item state in the GUI.

Thank you for your explanations. I thought I had copied everything from the example but left out the “label=” .
Now I have changed the sitemap to the following and dont get an error anymore,

Frame label="Garage" {
  Switch item=Garage_Tor_Antrieb_Sperre label="Sperre Garagentor"
  Switch item=Garage_Tor_Antrieb label="Garagentor" visibility=[Garage_Tor_Antrieb_Sperre==OFF]
  Setpoint item=party_temp  label="Heizung Partytemperatur" minValue=20 maxValue=30 step=1                          

The items file has not changed:

Number          party_temp                     "Heizung Partytemperatur [%.1f °C]"  <temperature>      (GF_Boiler, gHeating)  ["TargetTemperature"]   

But I still dont get the correct arrows in the basic UI that let me change anything.
party_temp is bound via Paper_UI to the vitocontrol binding and receives the data from the viessmann oil burner.
The receiving part works but now I would like to send a temperature value back to the binding to change this temperature.
Therefore I must be able to modify the temerature in the basic UI.

By the way I also tried to change the label in the sitemap to temp2 . That does not make any difference.
The documentation is a little bit misleading as it makes you asume that adding the expression [“TargetTemperature”] does the trick by itself without further prerequisites.

That is for homekit integration AFAIK.

This is what I have in my items:

Number SetTemp "Target Temp [%.1f °C]" <temperature>

Looks exactly like you have.

And my sitemap:

Setpoint item=SetTemp label="Setting" icon="heatr" minValue=5 maxValue=30 step=1

How strange yours does not show it correctly.

Try restarting the server.

Yes restarting the Server did it. The arrows appeared on the front page !!
Thank you to all of you !!

I have to come back to my own thread as another problem came up.
At the moment the temperature and the arrows to control it appear on the first page of the basic UI.
With my definition in the items file as mentioned above the value is also displayed on the third page (heating room). Now my problem is that on the third page the value is only displayed - I cannot change it. I can only change it on the first page . Now how can I manage that I can control it on the third page and make it disappear from the first page ?

After some more reading and some trial and error I start to understand the relationship between sitemap and items file. I was able to by using the {} to push the entry to a second page. Unfortunately then all the entries I had already on the Heater page and that were only defined in the items file disappeared. Now I have to put them all to the sitemap to make them reappear. It would be great to have a better beginners description in the openhab documentation regarding this relationship.
I looked into the prerequisites to become an editor of the openhab documents but this seems way to complicated for me to install.