Issue with Android app and sitemap using Number:Temperature and step parameter

Hello,

I have a strange issue with my sitemaps since migration to OH4. I initially posted this under ‘sitemaps’ but I guess it is app related so I moved it to here.

I have some number items linked to zWave thermostats which I use to set the desired temperature. Initially they looked like this:

Number Heizung_Buero_Solltemperatur <temperature> (Heizung_Buero_Group) { channel="zwave:device:cef8b92dc5:node16:thermostat_setpoint_heating" }

After upgrade to OH4, my system did not write back the values to the thermostats. I could change them in the sitemap, but they immediately jumped back to the previous value.
After some research I changed the definition to Number:Temperature

Number:Temperature Heizung_Buero_Solltemperatur <temperature> (Heizung_Buero_Group) { channel="zwave:device:cef8b92dc5:node16:thermostat_setpoint_heating" }

and that fixed the issue but only for web access to the sitemap, not for the Android app (v 3.7.0). The app does allow me to increase the temperature, but not in half degree steps as defined in the sitemap, but only in full degrees. And it does not allow me to decrease the temperature via the ‘down’ button, only via the slider.
If I remove the step=0.5 from the sitemap, I can also decrease the temperature via button.

So it seems to be an issue specifically with a number:temperature in a sitemap using step=0.5 on the (android?) app.

Here is the definition in the sitemap:

Setpoint item=Heizung_Buero_Solltemperatur label="Büro Solltemperatur [%.1f °C]" step=0.5 minValue=12 maxValue=28  visibility=[Heizung_Heizperiode_Switch == ON]

Any ideas … ?

Many thanks
Brandy

openHAB 4.0.3
Android app version 3.7.0

Release = Debian GNU/Linux 11 (bullseye)
Kernel = Linux 5.10.0-19-amd64
Platform = Fanless Mini PC Quieter2/Rev GMLR1 1.10, BIOS 10.11 05/05/2022

There must be something going on with the item state of your item. Can you run curl http://<server IP>:8080/rest/items/Heizung_Buero_Solltemperatur and provide the output?

Sure, thank you !

{“link”:“http://192.168.1.27:8080/rest/items/Heizung_Buero_Solltemperatur",“state”:"12 °C”,“stateDescription”:{“pattern”:“%.0f”,“readOnly”:false,“options”:},“unitSymbol”:“°C”,“metadata”:{“ga”:{“value”:“thermostatTemperatureSetpoint”}},“editable”:false,“type”:“Number:Temperature”,“name”:“Heizung_Buero_Solltemperatur”,“label”:“HBGSP”,“category”:“temperature”,“tags”:,“groupNames”:[“Heizung_Buero_Group”]}

link http://192.168.1.27:8080/rest/items/Heizung_Buero_Solltemperatur
state 12 °C
stateDescription
pattern %.0f
readOnly false
options
unitSymbol °C
metadata
ga
value thermostatTemperatureSetpoint
editable false
type Number:Temperature
name Heizung_Buero_Solltemperatur
label HBGSP
category temperature
tags
groupNames
0 Heizung_Buero_Group

I guess this is the problem: e.g. 19.5 °C isn’t expressable without decimal digits :wink: The app uses that state description to format the commands sent to the server.
I’m not sure how to fix that (default) state description for items for .items files, though :confused:

Edit: I’ll also have a look whether we can use the widget state description for this purpose in the app. There’s a slight conceptual issue with that, though: the command is sent to the item, not the sitemap widget.

1 Like

Thinking about it, setting a label should work:

Number:Temperature Heizung_Buero_Solltemperatur "Solltemperatur [%.1f %unit%]" <temperature> (Heizung_Buero_Group) { channel="zwave:device:cef8b92dc5:node16:thermostat_setpoint_heating" }

I’m not sure where that default comes from, though … I checked the zwace binding code and it doesn’t seem to be defined there.

1 Like

Thaaaaank you so much, that solved the issue !!! I would never have been able to figure this out by myself … :black_heart: