kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
176 stars 33 forks source link

query open state? #78

Closed lordnikon6 closed 2 years ago

lordnikon6 commented 2 years ago

Hello, great work I have one question though. Is it possible to query the open state? I would like to turn on the light in the hall when it is dark outside and the door is opened. Unfortunately I haven't found anything suitable yet. Greetings from the "Nordsee"

alexdelprete commented 2 years ago

Hi,

did you read the doc on the repo?

image

Here are those 3 sensors of the device:

image

lordnikon6 commented 2 years ago

Yes, I read the DOC in the repro. However, I only see the "unlocked" status. If I then open the door via the NUKI app, the status does not change. Can you tell me what I have to write where?

alexdelprete commented 2 years ago

I showed you two pictures, one is from the readme, one is the HA sensors, in the table above what do you read in description? Do you see the binary sensor with the description "shows the state of the door"? That's the sensor for the door. Then you have the binary sensor for the lock.

In the HA image, I show you the 2 sensors with the icon representation...do you see the difference? The first one is the DOOR binary sensor (closed) and the third is the LOCK sensor (unlocked), the second is the mix between the two (Door Closed and Lock unlocked).

When you say you want the check the "open" state, are you referring to the DOOR SENSOR or the LOCK? The state of the DOOR SENSOR is open/closed, the state of the LOCK is locked/unlocked. You have one binary sensor for each of them.

kvj commented 2 years ago

@lordnikon6

Hey, Few questions though:

  1. Do you have a (Nuki) Door sensor?
  2. Do you have a Nuki Bridge?
  3. When you say 'If I then open the door via the NUKI app', do you actually open the door or just unlatch the lock?
lordnikon6 commented 2 years ago

@alexdelprete I think I found my mistake. I have a Nuki and a Bridge, but I don't have a separate Nuki door sensor. I thought that if Nuki opens the lock for 3 seconds, this will be displayed briefly as a status. So the moment when the claw is pulled and the door opens. Of course, I can also do this with a window or door contact. But then I would take an Aquara for 10 euros and not one from Nuki for 39 euros.

@kvj

my mistake. No, I don't have a Nuki door sensor. D Yes, I have a bridge And yes, I don't mean "unlock" I mean the moment the claw is pulled for 3 seconds and the door opens. nuki

alexdelprete commented 2 years ago

I thought that if Nuki opens the lock for 3 seconds, this will be displayed briefly as a status. So the moment when the claw is pulled and the door opens.

That's called UNLATCHING. The door status requires the sensor, that you don't have. :)

I can also do this with a window or door contact. But then I would take an Aquara for 10 euros and not one from Nuki for 39 euros.

sure, but you will have to integrate it manually in that case. :)

I don't mean "unlock" I mean the moment the claw is pulled for 3 seconds and the door opens.

you mean unlatching, see first reply of this post. :)

lordnikon6 commented 2 years ago

Thank you for your quick response. I saw on the Nuki homepage that the door sensor is only suitable for Nuki 3 or 3Pro. I have the first generation Nuki. Unfortunately, the door sensor falls out for me :(

But now I know at least what it was. Thank you for your help

alexdelprete commented 2 years ago

Unfortunately, the door sensor falls out for me :(

Not a big issue: you'll save money with another sensor, and you can easily integrate it in HA.

Thank you for your help

No problem, glad to help users of this integration. If you feel the problem is solved, can you close the issue please? Thanks. .)

kvj commented 2 years ago

+1 to using a more reliable zigbee/z-wave door sensor instead. Even though I have Nuki 2.0 with door sensor (which is just a square-shaped magnet), I rely on the zigbee one

alexdelprete commented 2 years ago

Even though I have Nuki 2.0 with door sensor (which is just a square-shaped magnet), I rely on the zigbee one

Konstantin, could we support a generic non-nuki door sensor in the integration? So users could have a choice without having to integrate manually. We could ask in config_flow to optionally configure a binary door sensor, and that would replace the standard one.