[OpenHab 3.0.1] - Invert Locks - HomeKit

Hi,

there are possibilities to invert rollershutter,doors etc.
but there is no possibility to invert a lock.

In my case I use a relais that receives a pulse of power to unlock the mechanical lock at my outdoor gate. no power in my case = closed / locked. and a pulse of power for 5 sec = open/unlocked

But when defining a switch or lock it somehow is inverted the wrong way.
in order to perform automation with doorbells etc it needs to be defined as a lock in my homekit

It would be great if just could invert the state of the lock or switch

The thing linked to the homekit item is a binding with Niko Home Control2 API

Can someone assist me with this ?

Background info:
Openhab 3.0.1
Thing = Gate = Binding with Niko Home control API
Item = Switch Poort "Poort" {homekit = "Lock"}

Hi @MrKlepper ,
I use the same configuration like you… I got a switch for my door (eg no1) in OH which is turned on, power to the relais, timer starts, 2 seconds later switch will be turned off by itself.

I exposed a second switch (eg no2) to HomeKit with the lock meta data.
In OH are 2 rules:

  1. When no2 changed from ON to OFF send command ON to no1.
  2. When no1 changed from ON to OFF send command ON to no2.

Inverting the lock would be easier, but this is my solution and works pretty well for me.
Maybe this helps.

Best regards
Dirk

Hi @dirkdirk ,

interesting , would you like to share that specific config ?
cause I seem not to find how to give values between two switches

thanks

Hi @MrKlepper ,
I created them via the gui in oh3.

Best regards
Dirk

That works like a charm.
but would indeed be cleaner with a built in revert feature.

Thanks a lot ! .

@MrKlepper Yes, an invert option would be nice. I would prefer this too.

If you like you can create an enhancement request on GitHub for this… or I can do it if you don’t want to.

1 Like

ok. convinced. invert option added :slight_smile:

once the change is approved and merged, you can make use of the inverted option instead of second item + rule

1 Like

@yfre
Thank you Eugen, I really appreciate it!

1 Like

Hi @yfre ,
Is this change already available at Snapshot version 3.1.0.202102210347?

I added the

inverted: true

but it is still not inverted.

EDIT:
It is working… I had to use

“ “

for the true.

Thanks again for implementing this. Saves me an item and 2 rules :wink:

1 Like

Exactly what I need, I’m on 3.0.2 release build, I’ve added inverted: “true” to the metadata of the item,
but the door lock doenst invert.

What can I do to make this work?

Thanks!

probably you need to update the homekit addon to the snapshot version,

1 Like

could you point in the direction to find the info on how to do that?

Read this here:

And this is how you look for the current version:

2 Likes