GithubHelp home page GithubHelp logo

crea-doo / thingml-tradfri Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ffleurey/thingml-tradfri

0.0 1.0 0.0 447 KB

Interfaces with the IKEA Tradfri smart lighting gateway

License: Apache License 2.0

Java 99.54% Batchfile 0.21% Shell 0.25%

thingml-tradfri's Introduction

ThingML-Tradfri

The goal of the project is to provide an event-based ThingML / JAVA API to monitor and control IKEA TRÅDFRI smart bulbs. It is currently in an early developement stage but comes with a GUI which allow monitoring and controlling the different types of TRÅDFRI bulbs.

Screenshot

To compile the tradfri-java project, run mvn clean install

To run the GUI, run mvn exec:java

IKEA TRÅDFRI LED Color Bulbs

IKEA recently released variable color bulbs. The Identification for the bulb I have got is "TRADFRI bulb E27 CWS opal 600lm" which, for now, only seem to be sold as a set with one remote control. There are not a lot of details on the box on what these bulbs are capable of. Let's open one to see how they work and what they can do.

Open Color Bulb

Using the remote control only allows dimming and cycling through 9 colors:

#f03c15 #c5f015 #1589F0 #f03c15 #c5f015 #1589F0 #f03c15 #c5f015 #1589F0

The first 3 colors correspond to the the 3 whites of the variable color temperature bulbs.

Using the IKEA App allows selecting 11 more colors for a total of 20:

#dcf0f8 #eaf6fb #f5faf6 #f2eccf #f1e0b5 #f1e0b5 #efd275 #ebb63e #e78834 #e57345 #da5d41 #dc4b31 #e491af #e8bedd #d9337c #c984bb #8f2686 #4a418a #6c83ba #a9d62b #d6e44b (See further down for hex codes)

When setting colors through the gateway only those 20 colors can be set using the hex code on property "5706". Trying anything else defaults back to the normal white color ("f1e0b5"). However more colors can be set by providing the COLOR_X and COLOR_Y on properties "5709" and "5710" respectively. Using X and Y the bulb will display a lot more colors but it does not cover the full spectrum and the maximum brightness varies greatly depending on the selected color. No deep green and no cyan are the most obvious missing colors.

LED arrangement

Looking at the LEDs which are being used explains why the whole spectrum is not covered. The bulb has four different LED types: warm white, greenish yellow, red and blue. The RGB values I have put on the picture are aproximate but give a good idea of the color of each type of LED.

JSON

Here is an example JSON:

{
  "9001": "",
  "9002": 1514722258,
  "9020": 1514722619,
  "9003": 65557,
  "9054": 0,
  "5750": 2,
  "9019": 1,
  "3": {
    "0": "IKEA of Sweden",
    "1": "TRADFRI bulb E27 CWS opal 600lm",
    "2": "",
    "3": "1.3.002",
    "6": 1
  },
  "3311": [
    {
      "5851": 1,
      "5850": 1,
      "5707": 47822,
      "5708": 65279,
      "5709": 11469,
      "5710": 3277,
      "5706": "4a418a",
      "9003": 0
    }
  ]
}

Here are the Hex code for each of the preset colors:

  • #dcf0f8 #dcf0f8
  • #eaf6fb #eaf6fb
  • #f5faf6 #f5faf6 X [Cold White]
  • #f2eccf #f2eccf
  • #f1e0b5 #f1e0b5 X [Normal White]
  • #efd275 #efd275 X [Warm White]
  • #ebb63e #ebb63e X
  • #e78834 #e78834 X
  • #e57345 #e57345
  • #da5d41 #da5d41 X
  • #dc4b31 #dc4b31
  • #e491af #e491af
  • #e8bedd #e8bedd
  • #d9337c #d9337c X
  • #c984bb #c984bb X
  • #8f2686 #8f2686
  • #4a418a #4a418a
  • #6c83ba #6c83ba X
  • #a9d62b #a9d62b
  • #d6e44b #d6e44b

IKEA Variable Temperature Bulbs

These bulbs have two sets of LEDs which allow for different color temperatures. The remote control and IKEA App allow cycling through 3 different shades of white:

  • #f03c15 #f1e0b5 [A combination of the warm and cold LEDs]
  • #c5f015 #f5faf6 [Only cold white LEDs]
  • #1589F0 #efd275 [Only warm white LEDs]

Only these 3 colors are possible when setting the color using the hex value but like for the color bulbs, using the X and Y paramenters allow for any possible color between the warm and the cold white.

Here is an example JSON:

{
  "9001": "Spot Jaune",
  "9002": 1514653535,
  "9020": 1514739948,
  "9003": 65555,
  "9054": 0,
  "5750": 2,
  "9019": 1,
  "3": {
    "0": "IKEA of Sweden",
    "1": "TRADFRI bulb E27 WS opal 980lm",
    "2": "",
    "3": "1.2.217",
    "6": 1
  },
  "3311": [
    {
      "5851": 254,
      "5850": 1,
      "5711": 250,
      "5709": 24933,
      "5710": 24691,
      "5706": "f5faf6",
      "9003": 0
    }
  ]
}

References

thingml-tradfri's People

Contributors

crea-doo avatar ffleurey 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.