[OpenHab 3.0.1] - Invert Locks - HomeKit

Tags: #<Tag:0x00007fc8f8255da0> #<Tag:0x00007fc8f8255cd8> #<Tag:0x00007fc8f8255c10>

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