Git Product home page Git Product logo

Comments (16)

tremby avatar tremby commented on July 25, 2024 2

Redshift manages your computer screen.

It doesn't have to; it can just print what temperature it would use at this moment, via the -p switch.

Redshift is intended for desktop usage.

Not exactly. The redshift binary doesn't have a GUI (redshift-gtk is the GUI).

Kelvin provides an api (currently in beta) to enable integration, Redshift is designed to be a self-contained desktop application.

Not exactly (see above). I run it on a headless system with its -p flag to decide what temperature my lights at home should be at that moment. It controls no screen on that system. I think it could also control a remote screen it has access to via X forwarding etc, though I'm not certain about that.

Does Redshift support ARM-Systems (like the Raspberry Pi), macOS and FreeBSD?

To find out, I just successfully compiled and ran redshift on my Raspberry Pi, so yes.

As I stated above a manual integration works really well and gives us much more flexibility. So i don't think it's a good idea to integrate Redshift into kelvin.

Despite my corrections above, I agree that there's not much value in an integration, from what I know of Kelvin.

For any who already use redshift and just want their Hue lights to be in sync, you can write a really short script to do that. Here's my one. (I previously posted this on Reddit.)

from kelvin.

tremby avatar tremby commented on July 25, 2024 1

If you've got ways to specify things like

  • sunset + 5 minutes
  • sunrise + 0.1 * day_hours
  • sunset + 0.5 * night_hours

...then I think you'd be covering a lot of use cases.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Thanks for the idea of integration Redshift into Kelvin. I think there are some thinks to take into consideration here. Both tools are similar in certain aspects but fairly different in others. Let's have a look.

Similarities:

  • Both tools use your location to determine the local sunrise and sunset times.
  • Based on this timestamps or user-configured intervals they interpolate a target color temperature in kelvin.
  • You can adjust the range of this target color in the configuration.

Differences:

  • Kelvin manages your lights, Redshift manages your computer screen.
  • Kelvin is designed for headless usage, Redshift is intended for desktop usage.
  • Kelvin provides an api (currently in beta) to enable integration, Redshift is designed to be a self-contained desktop application.

I think it would be really cool to sync the color of your computer screen with your lights. And in fact that's exactly what I do in my office with flux and Kelvin. So how can we bring these two together?

Currently I think keeping these two separated and sync the light state via configuration is good enough and the best thing to do. Let me give you some examples:

  • What happens when to computers (both running Redshift) want to control your lights?
  • What happens when your laptop leaves the house? Which system will manage your lights?
  • What happens if two rooms have different schedules and you move your laptop from one room to the other? How will the lights match?

As I stated above a manual integration works really well and gives us much more flexibility. So i don't think it's a good idea to integrate Redshift into kelvin.

Sidenotes:

  • As Kelvin provides an API it could be easily integrated into Redshift or a wrapper around it.
  • Does Redshift support ARM-Systems (like the Raspberry Pi), macOS and FreeBSD?
  • Currently the projects have incompatible licenses.

Let me know what you think!

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

As noted, I'd just like to use the color temperature algorithm of redshift to avoid to manually set the colors for all the different times of the day, and to have it adjust automatically depending on the season possibly.

Right now I have to keep several configurations for 6am-8am 8am-10am 10am-12pm etc, multiplied for the seasons... That's a bit of a pain.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

I like the idea of adjusting automatically to the seasons. You should not have to fiddle with multiple configurations! Please help me understand why you currently use multiple configurations.

To mimic Redshift's behavior you could use a simple config like:

04:00 AM - Night color
23:00 PM - Night color

This way Kelvin would always provide a slow fade between 4AM and sunrise and between sunset and 23PM. Redshift keeps this transitions closer around sunrise and sunset but aside from that it should produce similar results. At least that's my understanding of the code.

Would this solve your needs?

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

I will not be at home for the next two weeks, I'll follow up once I'm back home. Thanks!

from kelvin.

tremby avatar tremby commented on July 25, 2024

Gotta say, I'm pretty confused.

I like the idea of adjusting automatically to the seasons.

Does it not already?

The first feature listed in the readme is this:

  • Adjust the color temperature and brightness of your lights based on the local sunrise and sunset times

Sunrise and sunset change throughout the year -- this sounds to me like things would therefore adjust to the seasons.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Yes, Kelvin will automatically adjust to the changing sunrise ans sunset times throughout the year. But it also uses a time-based configuration to match your daily schedule. Depending on your preference (Do you prefer your daily schedule or the changing sunrise times?) you have to use different configurations.

I'm still trying to understand the needs of @FezVrasta and am also a little confused. So, let's wait till he returns and maybe we can come to an understanding.

Apart from the specific needs discussed here, I am always interested in ways to make Kelvin easier to use. That's what I wanted to say with my initial sentence...

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

Sorry for the delay, I just finished to replace all my IKEA bulbs because they suck and now I reconfigured Kelvin with the suggested configuration.

I don't think this will do what I wanted tho.

My idea is to NOT have to configure it at all, you will automatically receive the best temperature and brightness from redshift, the most I'd do is to set the sunrise/sunset offset.

Anyway, with the following configuration I should get the temperature from bright white to warm white while the time proceeds?
What I mean is, at 4AM I will have yellow-ish lights, at 10AM they will be less yellow-ish, at noon they will be white, at 6PM they will be yellow-ish but not too much, and at 11PM they will be full yellow-ish?

image

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Hi Federico,

welcome back and thanks for catching up.

If you configure Kelvin like above and assuming your location is Budapest (as your profile states) you would get a color temperature curve like this one:

budapest

Kelvin will construct the following intervals:

  • From 00:00 to 04:00 it will keep the temperature at 3000K
  • From 04:00 to sunrise (currently 06:30) it will fade the temperature to 6000K
  • From sunrise to sunset (currently at 17:23) it will keep the 6000K
  • From sunset to 23:00 is will slowly fade to 3000K
  • From 23:00 to 23:59 is will keep the temperature at 3000K

If I get your request right you are expecting a constant change over the whole course of the day!?!

This isn't something Kelvin does because it assumes the color temperature during daylight stays constant. This strategy is broadly accepted (see https://www.timeanddate.com/sun/hungary/budapest or https://en.wikipedia.org/wiki/Color_temperature). In reality the color temperature will constantly shift during daylight but our eyes adjust to this and you won't notice a difference. In addition to this there may be shifts in color temperature caused by clouds for example which you can't predict.

Long story short: Kelvin will keep it's color temperature constant during daylight which itself is considered constant. And it will shift the color temperature while the natural light is shifting noticeably during sunrise and sunset.

Flux will operate in the same way as you can see in this picture:
flux
And because Redshift was developed as a clone of flux I am guessing it also works this way. This comment from the Redshift sample configuration suggests the same:

By default, Redshift will use the current elevation of the sun to determine
whether it is daytime, night or in transition (dawn/dusk). When the sun is
above the degrees specified with elevation-high it is considered daytime and
below elevation-low it is considered night.

So, in essence aside from the 10:00 less yellow-ish color temperature you should get results close to what you expect but for slightly different reasons.

Hope this helps!?!

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

Umh I see, thanks for the info. I guess the problem is that the hole where I live has a very bad lighting so the home starts getting dark very soon (way before the sunset). But I suppose I can adjust the sunset offset to accommodate this problem.

I'll do some more experiment in the next days, thanks again

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Sure! Let me know how your experiments go.

Also maybe take a look at #27 where I think about the future directions of Kelvin. Some of the changes would allow you to adjust the color temperature during daylight.

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

Umh so... I'm really trying hard to make it work but it doesn't seem to want to cooperate.

We have this "sunrise - sunset" timeframe where I can set a given light, but how can I tell it to set a different color as soon the sun sets? It just asks me a time, I can't find a way to tell it "at sunset, set temperature to X" 🙁

Also, I thought there was an offset option for sunset and sunrise but I can't find it anymore.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

As stated above and shown in the graph, there is no option to set a specific temperature at sunset. And there isn't an option for an offset either. All of this has been discussed in this issue.

If you use your configuration from above Kelvin will start at sunset (currently around 17:30 at your location) and fade the temperature to a warmer color (in your case 3000K). By the time the natural light is gone (currently around 19:09 at your location) you should see a noticeable change here.

If you don't see changing color temperatures at all, please make sure the given lights are part of your Kelvin schedule. And if you have manually changed the color yourself, please reactivate Kelvin by turning your light off and on again, by using a scene or through the web interface.

from kelvin.

FezVrasta avatar FezVrasta commented on July 25, 2024

The thing is that the whole sunset sunrise thing is useless if I then have to manually set another time to when I want the lights to be at a warmer color... There should be a way to specify sunset + X

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

#27 describes why relative offsets also can't be the optimal solution for Kelvin...

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.