Code Monkey home page Code Monkey logo

homebridge-tradfri's Introduction

homebridge-tradfri

NPM Version

IKEA Trådfri Gateway plugin for Homebridge.

Features

  • Automatic discovery of the Trådfri gateway
  • Turn on/off lights
  • Adjust the brightness

To be implemented

  • Adjust color temperature (figuring out how to do this the best way)
  • Make the plugin work with third party HomeKit apps
  • Better error handling and logging

Installation

  1. Install Homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-tradfri
  3. Update your configuration file. See the sample below.

Sample Configuration

The PSK (Pre-Shared Key) can be found printed on the bottom of the IKEA Trådfri Gateway. This plugin makes use of coap-client which is part of libcoap.

The plugin comes with prebuilt x86-64 binaries for macOS and Linux. There is no need to compile coap-client if this is what you're using. If not, you'll need to compile coap-client yourself and use the config property coapClientPath to point to the location of the coap-client binary.

"platforms": [{
    "platform" : "Tradfri",
    "name" : "Tradfri",
    "psk" : "23asqw9123j33",
    "coapClientPath": "/usr/local/bin/coap-client" // OPTIONAL: See above
}],

Compiling libcoap

Installing libcoap as per the following instructions for Debian/Ubuntu:

$ apt-get install libtool git build-essential autoconf automake
$ git clone --recursive https://github.com/obgm/libcoap.git
$ cd libcoap
$ git checkout dtls
$ git submodule update --init --recursive
$ ./autogen.sh
$ ./configure --disable-documentation --disable-shared
$ make
$ sudo make install

You'll find the coap-client binary in ./examples

Credits

Big thanks to everyone discussing Trådfri in this issue: bwssytems/ha-bridge#570

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.