steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

How to add a "Max Thermostat"? #68

Closed jensliebau closed 4 years ago

jensliebau commented 4 years ago

Hi,

has one of you already added a "MAX! Heizkörperthermostat+" to homebridge-openhab2-complete?

Unfortunately I do not understand how to map the channel/items to homebridge config. :-(

Current state:

The Thermostat has following channels:

Note:

From the docs I assume this is the minimal necessary config for a "thermostat". Unfortunately there are two Items i don't know how to connect (heatingItem , modeItem)

{
    "name": "Livingroom Thermostat",
    "type": "thermostat",
    "currentTempItem": "Itemname-within-OpenHAB",    <- connected to Current Temperature  (Number:Temperature)
    "targetTempItem": "Itemname-within-OpenHAB",     <- connected to Setpoint Temperature (Number:Temperature)
    "heatingItem": "Itemname-within-OpenHAB",        <- what shoud I connect here?
    "tempUnit": "Celsius",
    "modeItem": "Itemname-within-OpenHAB",           <- how can I convert Channels-Mode to this ?
    "minTemp": "0",
    "maxTemp": "30",
    "minStep": "0.5"
}

I would be happy to receive advice on the solution

steilerDev commented 4 years ago

Hi @jensliebau,

modeItem is not relevant in your use-case, this is only to expose modes of operation (Heating, Cooling, Auto), therefore I would omit it.

heatingItem is the item, showing if your heater is currently heating the room or not. I would create a virtual item in openHab that changes based on your Valve Position. Something along the lines of this:

default.items
Contact HeatingItem
default.rules
rule "heatingItem"
when
    Item <ValvePosition> changed
then
    if(triggeringItem.state > 0) {
        HeatingItem.postUpdate(OPEN);
    } else {
        HeatingItem.postUpdate(CLOSED);
    }
end

I hope this helps, otherwise feel free to re-open.

jensliebau commented 4 years ago

After adding virtual "HeatingItem" and omitting "modeItem" the thermostat does show in Home.app. Thanks a lot!

I do have some additional questions.

Max temperature

I've set

"minTemp": "0",
"maxTemp": "30",
"minStep": "0.5"

What happens: Nevertheless I can select temperatures up to 35° C in Home.app. Every Value above 30.0 results in the thermostat showing "OFF" which is a equivalent of "0.0". Steps are 1.0 not 0.5

Is maxTemp working as expected?

Mode Is ist possible to hide "Cooling" in Home.app? Cause the device cant't be used to cool the cool?