Open snizzleorg opened 8 years ago
This should be a thermostat item. So you need the current temperature and the target temperature. (See https://github.com/redhell/homebridge-openHAB/blob/master/items/ThermostatItem.js ,does not work at the moment). @tommasomarchionni It would be cool to know if you can combine multiple items from openhab to one.
THERMOSTAT_MODE (since 1.6.0) Used to get and set the mode (of Number type) of the thermostat numeric values translate to the following types
0 = "Off"
1 = "Heat"
2 = "Cool"
3 = "Auto"
4 = "Aux Heat"
5 = "Resume"
6 = "Fan Only"
7 = "Furnace"
8 = "Dry Air"
9 = "Moist Air"
10 = "Auto Changeover"
11 = "Heat Econ"
12 = "Cool Econ"
13 = "Away"
THERMOSTAT_OPERATING_STATE (since 1.6.0) Used to get the operating state (of Number type) of the thermostat numeric values translate to the following types
0 = "Idle"
1 = "Heating"
2 = "Cooling"
3 = "Fan Only"
4 = "Pending Heat"
5 = "Pending Cool"
6 = "Vent / Economizer"
THERMOSTAT_SETPOINT (since 1.6.0) Used to get and set the setpoint of the thermostat setpoint_type=value : parameter to select setpoint type, value is one of the following numerical values:
1 = Heat
2 = Cool
*setpoint_scale=value** : parameter to select setpoint scale, value is one of the following numerical values:
0 = Celsius
1 = Fahrenheit
THERMOSTAT_FAN_MODE (since 1.6.0) Used to get the fan mode (of Number type) of the thermostat numeric values translate to the following types
0 = "Auto Low"
1 = "On Low"
2 = "Auto High"
3 = "On High"
4 = "Unknown"
5 = "Unknown"
6 = "Circulate"
THERMOSTAT_FAN_STATE (since 1.6.0) Used to get the fan state (of Number type) of the thermostat numeric values translate to the following types
0 = "Idle"
1 = "Running"
2 = "Running High"
Those are the properties of the thermostat item in openhab. But anyways homkitbridge reads the sitemap so there one way of doing this could be combining a Text item (the current temperature) and a Setpoint Item (the target temperature) in a group or frame.
But the combination i believe would need to be done by the home bridge-openHAB plugin
The easiest way of going about this I think however would be using the target temperature as the current temperature...
now that i have thermostats i wonder if providing support for them is on the roadmap.. or what is required to get things working.
I saw that @redhell added a ThermostatItem. So I guess this should now be supported somehow.
Actually this does not work at the moment. There are more things to get a working thermostat.
I think you need multiple inputs like current temperature and the whished temperature. In my situation these are two items and i have to figure out how to combine them.
In my situation as well... But couldn't you just use the set point for both? Then the Thermostat would always have reached the set point but I think this is not a big issue
What is a general thermostat? In my case, my room thermostat (MAX! - controlled by the Openhab MAX!Cube-Binding) is controlling four further radiator thermostats. It has not a simple heating state, it is rather setting the valve position of each radiator separately and adaptively. However the most important things would be the actual temperature (read-only) and the set temperature (read/write). Currently, in the exported sitemap, the Setpoint element is used for the set temperature and a Text element is used for the actual temperature. Nevertheless, both the Text and the Setpoint element are interpreted by homebridge as read-only, the Setpoint element, however, should be also writable. Wouldn't that be sufficient for setting the room temperature?
@gstiegl i would be pleased to try
Now with homebridge-openhab@0.1.30 thermostat is in experimental. Now you can only see current temperature and set target temperature.
gonna check .. thanks! :hotsprings:
Great! I will check this asap as well! Thanks!
Hm, seems not to work im my case. I am using the following configuration:
"platforms": [ { "platform": "openHAB", "name": "openHAB", "host": "localhost", "port": "8080", "sitemap": "homekit", "useLabelForName": true, "customAttrs": [ { "itemName":"LivingWallThermostatActualTemp", "itemLabel":"Thermostat", "itemType": "ThermostatItem", "itemSubType":"CurrentTemperatureCItem", "itemUniqueAggregationId":1 }, { "itemName":"LivingWallThermostatSetTemp", "itemLabel":"Thermostat", "itemType": "ThermostatItem", "itemSubType":"TargetTemperatureCItem", "itemUniqueAggregationId":1 } ] } ]
and homekit.sitemap on the openhab side looks as follows:
Setpoint item=LivingWallThermostatSetTemp label="Regeltemperatur" Text item=LivingWallThermostatActualTemp label="Temperatur"
which leads to the following message in my homebridge log:
[openHAB] Platform - The widget 'Thermostat' of type NumberItem is an item not handled. [openHAB] Platform - The widget 'Thermostat' of type NumberItem is an item not handled.
Is there anything else to do?
There is a temperature Item typ but does a Setpoint Temperature Item exists?