GithubHelp home page GithubHelp logo

tds-node-tradfri-restapi's Introduction

Node TRÅDFRI REST-API TDS npm version

Simple Rest API to comunicate with IKEA TRÅDFRI Gateway. Has support for the following devices, groups and scenes, Blinds

Build from a need to control my TRÅDFRI Blinds with my automation system, this allows me to control the blinds with a simple http request.

What

  • /tradfri/deviceids will provide an array of device ids
  • /tradfri/groupids will provide an array of group ids
  • /tradfri/devices will provide a full list of all devices including meta data
  • /tradfri/groups will provide a full list of all groups including devices id's and meta data
  • /tradfri/all will provide a full detailed list of groups and devices
  • /tradfri/device/:deviceid/:state will set the state of a device (on/off). E.g. /tradfri/device/17101/on
  • /tradfri/group/:groupid/:state will set the state of a device (on/off). E.g. /tradfri/device/11007/off
  • /tradfri/register will provide a PSK for defined client

First release is a bit of a quick one. Exceptions needs to be managed and include toggle as an option.

How

Setup libcoap as explained below

  1. Setup libcoap as explained below
  2. Rename ./config/default.json-sample to ./config/default.json and update with the IKEA hub information
  3. Run using node >4.4.7
  4. Register identity and put returned PSK to config, using the API request /tradfri/register

Compiling libcoap

Install libcoap as descibed below for Debian/Ubuntu/Raspbian: (credits to homebridge-tradfri)

$ apt-get install libtool git build-essential install 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

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

tds-node-tradfri-restapi's People

Contributors

thomasdye12 avatar

Watchers

 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.