arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
466 stars 104 forks source link

Request: Lock-Mechanism add option "AutoLockAfterms" #580

Open mrMiimo opened 2 years ago

mrMiimo commented 2 years ago

Hi @arachnetech thank you so much for your awesome plugin! I have a request if possible🙏🏼 ... I have an external door that unlocks magnetically.

Since closing can be done manually it is not possible to intercept an mqtt message to understand the current state. My request is: is it possible to add an automatic block option after X time? like "turnOffAfterms" for the switch accessory.

Unfortunately Siri responds perfectly only if I use the "lock-machanism" accessory, so that's why I don't use "switch" accessory

This is my configuratorion:

       {
            "type": "lockMechanism",
            "name": "Cancello",
            "url": "mqtt://XXXXXXX:1883",
            "username": "XXXXXXX",
            "password": "XXXXX",
            "topics": {
                "setLockTargetState": "Bticino/rx",
                "getLockTargetState": "Bticino/tx",     <-- I dont have this topic. Make optional?
                "getLockCurrentState": "Bticino/tx"   <-- I dont have this topic Make optional?
            },
            "lockValues": [
                "*8*19##",
                "*#*1##"
            ],
            "LockAfterms": 5,        <--- My request
            "accessory": "mqttthing"
        }
jat80 commented 1 year ago

What are you using for the lock? I use a sonoff SV flashed with tasmota with a magnetic lock and can program the sonoff firmware via the tasmota web UI to automatically lock after 10s.