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

Documentation for irrigation items is wrong #103

Closed svenwiegand closed 2 years ago

svenwiegand commented 2 years ago

At first: Many thanks for this addon. After upgrading to openhab 3 I thought I wouldn't need homebridge anymore, but unfortunately the openhab integrated homekit support is quite unreliable. Homebridge with your add-on makes it usable again.

Currently, your documentation regarding irrigation accessories is wrong. In the documentation, you show the syntax like this:

{
    "name": "An items name, as shown in Homekit later",
    "type": "irrigation",
    "item": "Itemname-within-OpenHAB",
    "inverted": "true",
    "inUseItem": "Itemname-within-OpenHAB",
    "inUseItemInverted": "true",
    "durationItem": "Itemname-within-OpenHAB",
    "durationItemMax": "3600",
    "programMode": "manual",
    "programModeItem": "Itemname-within-OpenHAB"
}

I've adopted it for my usecase to this:

{
    "name": "Rasen Weg",
    "type": "irrigation",
    "item": "schalterSprengerRasenWeg",
    "inUseItem": "schalterSprengerRasenWeg",
    "durationItem": "restDauerSekundenRasenWeg"
}

This does show the item in homekit, but as soon as I click it, homekit shows that the item isn't compatible.

If I use this configuration instead, everything works like expected:

{
    "name": "Rasen Weg",
    "type": "valve",
    "items": [
        {
            "name": "Rasen Weg",
            "valveType": "irrigation",
            "item": "schalterSprengerRasenWeg",
            "inUseItem": "schalterSprengerRasenWeg",
            "durationItem": "restDauerSekundenRasenWeg"
        }
    ]
},
steilerDev commented 2 years ago

Thanks @svenwiegand for reporting this (when implementing I was actually expecting something like this to happen, but did not had the time to investigate). I removed the Faucet and Irrigation System in favour of the generic Valve type, see 9a0aec3.

P.S.: If you only have a single irrigation system this config should work as well:

{
    "name": "Rasen Weg",
    "type": "valve",
    "name": "Rasen Weg",
    "valveType": "irrigation",
    "item": "schalterSprengerRasenWeg",
    "inUseItem": "schalterSprengerRasenWeg",
    "durationItem": "restDauerSekundenRasenWeg"
},
svenwiegand commented 2 years ago

Thanks for the Info @steilerDev. I can confirm, that your easier version is working as well. So my main fault was the "typpe": "irrigation" part.