I’m new to Home Assistant, i’m using Homey for a few years now. Since I really enjoy the art of home automation I wanted to explore Home Assistant.
The learning curve is quite steep, but I knew that before I started.
I got some automations working already but I cannot seem to find out how I get my nuki doorlock to work.
I added Nuki to the configuration.yaml and restarted Home assistant. The configuration was accepted.
I only see the Nuki lock at the entities tab. I haven’t totally figured out the difference between devices and entities yet. From the entities tab I can lock and unlock the door (this is working).
How can I add the Nuki doorlock to an action in an automation? I want the door to unlock as soon as I enter the area “home”.
devices are, well, real physical devices. Like a smart plug for example.
This device (the physical smart plug) can have one or more entities, like sensor. entities that display the current draw, a switch.xyz entity for switching it, etc. Not all integrations generate devices.
For example your door lock might only be presented as an entity.
For automations, that doesn’t really matter (other than the syntax changing).
Usually an automation consists of a trigger, like a state change. This could be you (person.ro4x) changing it’s state to home. Or an event, like a button press.
Have a look at the documentation for that.
Next are conditions, and finally actions, as you found out.
Let’s try creating an action for your doorlock.
First, please take a look at the integration doc page.
Look into the bar on the right, it says “Lock” as a category. Some integrations can have multiple categories, especially smart home hubs.
Take a look at the lower section of the page as well, for each integration there may be specific services that are only available to this platform (e.g. SONOS speakers can take a snapshot, MPD not).
Since your device is a lock, you should click on “Lock” on the right.
This will take you to an overview of all lock integraions. Look for the one with the name “Lock” (direct link).
Here you can find out what to do with entities of the domain lock.
As you can see, there are so called services available. Service calls are what you’ll use in 90% of your automations.
For example, there are services like light.turn_on, which you can give parameters like brightness etc.
Have a look at this for more information.
Create a new automation, add your trigger, maybe a condition and add an action, in this case, a service call.
There is a service list available that should pop out once you start typing the service’s name.
For example, the service you should be using here is lock.unlock. To lock a lock, well that’s lock.lock.
Now you need to add an entity_id, so that the service knows which lock to unlock. Use the one from your nuki.
Just out of curiosity: I am also just starting with HA and do have a Nuki, except your use case is already solved by Nuki.
And also much more reliable then you can by using HA, as it uses a combination of GPS/Wifi-based geofencing, combined with Bluetooth connectivity with the lock.
My experience after 2 years with Nuki is that this works very well and that you don’t want your door to open in the middle of the night because your mobile thought for a moment that it left the Geofence and entered it again. Nuki has solved these kind of complex issues.
Most use cases are already solved by the supplier. Nuki has it’s own geofencing, Philips hue has its own motion activated flows and Sensibo can control your climate based on it’s own logic.
The point is that it is a smart device in it’s own “smart bubble” when you only use the suppliers functionality. When you manage everything from a smart hub (Homey or Home Assistant) that one smart device gets alot smarter. At least, that’s how I think about it.
I’m using Nuki for just over a year with Homey only. I’ve never had a single issue with my use cases. Never had the door unwanted unlocked or locked. Only one security issue from where someone outside the house could yell “Hey Google, unlock the front door”. Solved that one pretty quickly…
Besides the standard use case I also have use cases where for example my cleaninglady is able to enter the house and unlocks the door. And better, the door wont get locked when I’m leaving home and she is still in there. Also the door unlocks when a fire alarm goes off. The door cannot be locked if the door is not properly closed (door sensor) etc. I’m not sure you can do these with the Nuki app.
Hi,
Yeah, in general I fully agree that we want to “free” our devices from the supplier bubble
In this case however my feeling was that specifically the additional use of Bluetooth proximity between the Lock and the Phone that is used by Nuki, is not something you would have available for your automations without any additional sensors. I think that is something really needed as a safeguard to prevent unwanted opening of your door.
I wonder how you then have solved this, securely, as my experience is that with GPS/Wifi-only based geofencing you may have “false” geofence events.
I’m aware the false events can occur. Lucky I did not have (or notice) them (I do log al my doorlock events). I’m a little less worried about the security since I live pretty remote and have a dog around the house. If I lived in a more urban area I would have cared more.
Then I probably build the bluetooth / GPS geofencing as a condition. If GPS = home && bluetooth is connected. I’m not that far into Home Assistant yet but I cannot imagine it is not possible to build this condition.