Code Monkey home page Code Monkey logo

domoticz-nuki's Introduction

domoticz-nuki

python plugin for the nuki locks

Current status

Tested to work with single lock per bridge and multiple bridges per installation

Prerequisites

This plugin requires python modules json and urllib. random, hashlib, datetime modules are needed if you intend to use Hashed tokens It also requires all the locks to be assigned to the bridge and for the bridge to be put in developer mode in order to use the HTTP API

Installation

cd ~/domoticz/plugins git clone https://github.com/heggink/domoticz-nuki sudo service domoticz.sh restart Then create a hardware device for each bridge

Multiple bridges REQUIRE SEPARATE PORTS!!!

If not then the messages from one bridge will be sent to the plugin of the other and vice versa

Once started, the plugin will

  • create lock devices for all locks configured in the bridge
  • create a callback in the bridge that sends lock status update messages to the plugin
  • polls all the configured locks at the poll interval specified

PLS NOTE that nuki locks drain batteries fast if polling is set too low

Since the lock status is updated on start and the lock shouldn't get out of sync as long as the plugin runs a short polling time should not be required at all Alternatively, swap the batteries for a (hacked) power supply

Parameters

Parameter Description
Port free port on your system for the bridge to send status messages to (default 8008)
Bridge IP IP address of the Nuki Bridge
Bridge token Token configured when putting the bridge in developer mode
Poll interval in minutes Polling time in minutes for the plugin to check lock status

Devices

Name Description
Lock device For each lock configured in the bridge

To do

  1. Test multiple locks per bridge (anyone?)
  2. Delete the callback on deletion of the device Currently, all callbacks need to be removed manually: http://[IP OF THE BRIDGE]:8080/callback/remove?id=[ID CREATED BY THE PLUGIN]&token=[TOKEN] Callbacks can be easily listed: http://[IP OF THE BRIDGE]:8080/callback/list?token=[TOKEN]

Please note that a max of 3 callbacks is allowed

This should allow you to install this next to any existing scripts to test

domoticz-nuki's People

Contributors

heggink avatar fcoquelet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.