Git Product home page Git Product logo

Comments (1)

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Hi Adam,

thanks for using Kelvin and for your kind words! Glad you like it!

All of your five assumptions above are correct! BUT, as you already suspected, the design and implementation of the Hue API is actually not very stable. Here are a few things I noticed while I worked on Kelvin:

  • There is a noticeable lag between the light bulbs and the bridge on the zigbee layer. (Especially if lights appear or disappear)
  • If you set a precise state via the API the resulting state of the bulbs can differ significantly
  • The precision of the bulb state differs from model to model and feature to feature (for example XY-colors seem to be more precise than color temperature)

Kelvin tries to work around these quirks by doing a fuzzy comparison of all values that get set or read (for the curious have a look at the equals method in lightstate.go). The downside of this fuzzy state handling are the is unexpected behaviour you observed... :-(

Now to your questions:

  • The current polling interval is one second
  • The current transition time for new states is also one second (both defined in light.go lines 59 and 60)
  • You can quickly reactive Kelvin for any light via the webinterface or it's API (PUT http://{IP}:8080/lights/{lightID}/activate). (NOTE: The webinterface is currently considered beta and has to be enabled in the configuration file, see README)
  • Another way to quickly enable Kelvin would be via scenes once this has been implemented (see #9)

To conclude here are a few tips to get Kelvin working as expected:

  • Always update to the latest firmware of the bridge and the lights (Especially the lights were updated three weeks ago for the first time in years! I really hope this fixes some of the observed issues... Haven't done much testing yet)
  • Don't change your light state to rapidly. As mentioned I poll every second and there is a delay between the bridge and the lights... In my experience you should wait 3-5 seconds after every action (for example: Turn light off, wait 5 seconds, turn light on -> Kelvin should take over)

Hope this helps. If not, feel free to ask! If you like dig into the code! PRs are always welcome! ;-)

from kelvin.

Related Issues (20)

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.