HomeKit temperature wrong value

Tags: #<Tag:0x00007f173b699b60>

Hello,

I have a problem with a value of my temperature sensor. It is always 10,0° in Apple Home App. In the openHAB web interface it looks quiet good and the value of the sensor shows the correct temperature.

I wrote a MQTT python program that reads the sensor data of the sensor from my heating.

The MQTT has following topics:
name: message is a string
outside_temperature: message is a float [e.g. 0.8, -1.2, ...]

That is the thing in $OPENHAB_CONF/things/heating_temperature.things :

Bridge mqtt:broker:broker "MQTT Broker" [ host="localhost", port=1883, secure=false, clientID="viessmann-bridge-client" ] {
    Thing topic viessmann_heating "Viessmann: Heating" {
        Channels:
            Type string : name                   "name"                   [stateTopic="viessmann/79742319e39245de5f91d15ff4cac2a8/name"]
            Type number : temperature            "outsideTemperature"     [stateTopic="viessmann/79742319e39245de5f91d15ff4cac2a8/outside_temperature"]
    }
}

That are the items in $OPENHAB_CONF/items/heating_temperature.items:

Group   viessmann_heating                     "Temperatur Heating"                       <temperature>                       {homekit="TemperatureSensor"}
String  viessmann_heating_name                "Temperatur Heating:Name"                  <none>         (viessmann_heating)  {homekit="Name",               channel="mqtt:topic:broker:viessmann_heating:name"}
Number  viessmann_heating_currentTemperature  "Temperatur Heating:CurrentTemperature"    <none>         (viessmann_heating)  {homekit="CurrentTemperature", channel="mqtt:topic:broker:viessmann_heating:temperature"}
Output of the REST API Explorer
[

	{
		"members": [],
		"link": "http://openhabiandevice:8080/rest/items/viessmann_heating",
		"state": "1.8",
		"editable": false,
		"type": "Group",
		"name": "viessmann_heating",
		"label": "Temperatur Außenfühler",
		"category": "temperature",
		"tags": [],
		"groupNames": []
	},
	{
		"link": "http://openhabiandevice:8080/rest/items/viessmann_heating_currentTemperature",
		"state": "0.8",
		"stateDescription": {
			"step": 1,
			"pattern": "%s",
			"readOnly": true,
			"options": []
		},
		"editable": false,
		"type": "Number",
		"name": "viessmann_heating_currentTemperature",
		"label": "Temperatur Außenfühler:CurrentTemperature",
		"category": "none",
		"tags": [],
		"groupNames": [
			"viessmann_heating"
		]
	},

	{
		"link": "http://openhabiandevice:8080/rest/items/viessmann_heating_name",
		"state": "Viessmann Heizung",
		"stateDescription": {
			"pattern": "%s",
			"readOnly": true,
			"options": []
		},
		"editable": false,
		"type": "String",
		"name": "viessmann_heating_name",
		"label": "Temperatur Außenfühler:Name",
		"category": "none",
		"tags": [],
		"groupNames": [
			"viessmann_heating"
		]
	}
]

Regards

HomeKit has min/max values for temperature. 10 is the default min temperature, but you can override it like this (see HomeKit Add-on - System Integrations | openHAB for more information)

Number  viessmann_heating_currentTemperature  "Temperatur Heating:CurrentTemperature"    <none>         (viessmann_heating)  {homekit="CurrentTemperature [minValue=-10, maxValue=27] ", channel="mqtt:topic:broker:viessmann_heating:temperature"}

NOTE: in openhab 2.x you cannot use negative numbers in the items configuration, i.e. lowest possible minValue would be 0

Thanks i extended the values you suggested.

Number:Temperature  viessmann_heating_currentTemperature  "Temperatur Outdoor [%.1f %unit%]"  <temperature>  (viessmann)  {homekit="TemperatureSensor,TemperatureSensor.CurrentTemperature" [minValue=-50, maxValue=60], channel="mqtt:topic:broker:viessmann_heating:temperature"}

Still I do not get the exact value e.g. 0.8° but 1.0°. Is there a possibility to have the exact values?
Will check the behavior a view days because it is an Outdoor Sensor.

Regards

try to add “step” parameter like this
[minValue=-50, maxValue=60, step=0.1]

but i have never tried myself.