Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use smart lock's finger print sensor to trigger other automations #690

Open
baneaoa opened this issue Nov 25, 2024 · 1 comment
Open

Use smart lock's finger print sensor to trigger other automations #690

baneaoa opened this issue Nov 25, 2024 · 1 comment

Comments

@baneaoa
Copy link

baneaoa commented Nov 25, 2024

Hey guys,

I am working on a way to use different users / fingerprints on our smart lock's keypad (nuki) to trigger other devices. First use case: One of our three little kids use their right finger to open the door, their left finger to open the garage. I already found out, what topic to use and which special parameters nuki sends via MQTT for the left finger of one of my kids. Example

  • Topic: nuki/NUKI_LOCK_ID/lockActionEvent
  • Parameters sent by smart lock: 3,0,1451693983,6,2

I want to use a stateless programmable switch. When the right parameters (e.g.: 3,0,1451693983,6,2) are sent by the smart lock, the switch is pressed like a doorbell and different automations in homekit are triggered by that.

Unfortunately I am totally new into coding Json and need your support. I so want to learn from this project and become better. Here is one of my wrecked attempts:

{
    "accessory": "mqttthing",
    "type": "statelessProgrammableSwitch",
    "name": "Smart lock",
    "url": "mqtt://XXX.XXX.XXX.XX",
    "username": "XXXX",
    "password": "XXXXXXXX",
    "topics": {
        “getSwitch”: {
            “topic”: “nuki/NUKI_LOCK_ID/lockActionEvent”,
            “apply”: “if (message == ‘3,0,1451693983,6,2’) { return 0 }”
        }
    }
},

Can you help me out?

All the best
Baneaoa

@rbswift
Copy link
Contributor

rbswift commented Dec 31, 2024

"apply": "return ((message == '3,0,1451693983,6,2') ? '0');"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants