Git Product home page Git Product logo

Comments (6)

se99jmk avatar se99jmk commented on July 25, 2024

I don't know about the programming aspects, but Siri works with "Lights" (e.g. Turn lights on/off), implying there is a general "All lights" default

Noted on the complexities. For simplicity this could just start off as excluding specific rooms/groups, as an extension to excluding lights?

Rooms are created as part of setup (not even sure you can set it up without at least one room..)

Why would you need to manage multiple active intervals for different lights? By excluding rooms, just the remaining active ones use one global set of settings

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Let's image the following example for our discussion:

I have three lights in my house grouped into 2 rooms:

  • Light 1 is part of livingroom and should go to 2300K at 20:00PM
  • Light 2 is part of bedroom and should go to 2000K at 22:00PM
  • Light 3 is not associated to any room and should go to 2500K after sunset

It is 19:00PM right now and sun will set in 5 minutes. At this point in time Kelvin will have to manage three different transitions (with different target states and timings). Right now it assumes that there is only one active interval at any time.

How could the configuration file format for this look like? I image something like:

{
  "bridge": {
    "ip": "...",
    "username": "..."
  },
  "location": {
    "latitude": 51,
    "longitude": 9
  },
  "rooms": [ 
    {"default": {
      "defaultColorTemperature": 2750,
      "defaultBrightness": 100,
      "beforeSunrise": [],
      "afterSunset": [
        {
          "time": "8:00PM",
          "colorTemperature": 2500,
          "brightness": 100
        }],
      "associatedDeviceIDs": [3]
    }},
    {"livingroom": {
      "defaultColorTemperature": 2750,
      "defaultBrightness": 100,
      "beforeSunrise": [],
      "afterSunset": [
        {
          "time": "8:00PM",
          "colorTemperature": 2300,
          "brightness": 80
        }],
      "associatedDeviceIDs": [1]
    }},
    {"bedroom": {
      "defaultColorTemperature": 2300,
      "defaultBrightness": 80,
      "beforeSunrise": [],
      "afterSunset": [
        {
          "time": "10:00PM",
          "colorTemperature": 2000,
          "brightness": 60
        }
      ],
      "associatedDeviceIDs": [2]
    }}
  ]
}

This way we could configure all relevant parameters for all rooms/groups individually.

Would this suite your needs?

Right now I'm still not sure if the added complexity is worth it:

  • How do we make sure there is a default room called default? How to behave if it's missing?
  • How do we make sure every light is exactly added to one room? What happens if it is associated to multiple rooms?

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

I wrote a little help page to get a multi room configuration going until there is a better solution:

https://github.com/stefanwichmann/kelvin/wiki/Multi-room-configuration

from kelvin.

se99jmk avatar se99jmk commented on July 25, 2024

Personally I'd keep it simple - Assume everything on same timers and settings by default. Then you'd need a simple exclude:

EXCLUDE: Bedroom, Bathroom

I'm pretty sure you said you could effectively run two instances of Kelvin on a single Raspberry Pi, therefore if you did want different colours / settings for different rooms, you could simply run another instance (with separate exclusions if needed, e.g. the rooms managed by first instance)

  • Actually, I think this is exactly what you've suggested in your FAQ

Only difference would be that we could exclude entire rooms of lights, rather than having to specify individual bulbs (would also be very helpful if adding / removing bulbs to the setup, as long as rooms stayed configured then there's no additional rules to manage for Kelvin - just works!

from kelvin.

Kallb123 avatar Kallb123 commented on July 25, 2024

Does the bridge not expose the rooms for you to interact with? You could jump on these definitions instead of redefining new rooms with kelvin?

Multiple instances works, but that's added complexity for the user instead of building in the functionality to the program.

I'd like to see room compatibility as I may want to control brightness in one room whilst controlling temperature in another.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

I finally found the time to implement this feature. Welcome Kelvin 1.0.0!

Since this feature requires incompatible changes to your configuration file I incremented the major version number.

You can update Kelvin by running it with the -forceUpdate flag. Enjoy!

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.