Git Product home page Git Product logo

Comments (8)

Ben-84 avatar Ben-84 commented on July 25, 2024 1

Stefan,

In #27, you included a couple of images of light profiles for "natural" light, which is what I (and I think others) are looking for:


I don't think this is possible with Kelvin currently. Because the "after sunset" times are configured with specific times, a ramp time that looks like the first image would need a beforeSunrise and afterSunset times of, perhaps, 04:55 and 22:45. That works fine in the summer, but in the winter that profile would look like this:

So the sunrise/sunset shift to the golden angle helps, but doesn't address the use case of trying to get the lights to ramp to a warmer color over a consistent timeframe. I think that's why others have been asking for offsets to sunrise and sunset - they're trying to accomplish what you show in the above color temp profiles.

from kelvin.

bryanmahler avatar bryanmahler commented on July 25, 2024

This would be a great addition to Kelvin. I experience the same issue after sunrise and before sunset. Thanks!

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

Hey everybody,
I'm still trying to wrap my head around the issue. I also think that a manual adjustment to the sunrise and sunset times should not be configurable because they are changing throughout the year (longer offset in the summer, shorter offset in the winter). I still stand by the reasoning in #27.

Nevertheless there seems to be a generic issue here so I'm trying to understand whats going on.

Is Kelvin to slow to adapt or to quick?
Is the problem more noticeable at sunrise or sunset? Both?

I am thinking about using a different phase of the twilight (https://www.timeanddate.com/astronomy/different-types-twilight.html) for Kelvins calculations...

from kelvin.

panosnl avatar panosnl commented on July 25, 2024

I experience the same issue. At sunset the color starts changing to my nighttime color. 1hour after sunset is it still very bright and cold temperature. Transition around sunset is indeed to slow and cannot be controlled.

I like to be able to define a color at sunset and also to be able to define a time relative to sunset. That way I will be able to schedule a transition period around sunset. This or another twilight functionality as mentioned would be a great addition.

Eg.
Day=4000
sunset-0:30: 3000
sunset:2900
sunset+0:30: 2800
23:00:2000

from kelvin.

panosnl avatar panosnl commented on July 25, 2024

After giving some more thought having a proper twilight implementation as mentioned by Stefan would be ideal.

In the mean time I have made a provional 'twilight' hack by shortning the Daytime by 60min by delaying sunrize 15min and and bringing forward sunset by 45min. Additionally I added 2 extra interval point 60min before the modified sunrize and 60min after the new sunset at 2800K.

So far it does the job. I am using Kelvin now as my default scene on all my lamps.

Line 242:

	schedule.sunrise = TimeStamp{CalculateSunrise(date, configuration.Location.Latitude, configuration.Location.Longitude), lightSchedule.DefaultColorTemperature, lightSchedule.DefaultBrightness}
	schedule.sunset = TimeStamp{CalculateSunset(date, configuration.Location.Latitude, configuration.Location.Longitude), lightSchedule.DefaultColorTemperature, lightSchedule.DefaultBrightness}

	//PB Add twilight function
	schedule.sunrise.Time=schedule.sunrise.Time.Add(time.Minute * 15)	
	schedule.sunset.Time=schedule.sunset.Time.Add(time.Minute * (-45))	

and Line 264

	//PB Add twilight
	schedule.beforeSunrise = append(schedule.beforeSunrise, TimeStamp{schedule.sunrise.Time.Add(time.Minute * (-60)),2800,80})
	schedule.afterSunset = append(schedule.afterSunset, TimeStamp{schedule.sunset.Time.Add(time.Minute * 60),2800,80})
	log.Debugf("PB: Added Twilight.Schedules before:%v and after:%v",len(schedule.beforeSunrise),len(schedule.afterSunset))

from kelvin.

Ben-84 avatar Ben-84 commented on July 25, 2024

Stefan, I have the same issue and will try to explain the issue fully.

Ideally, I would have my Hue lights roughly match the outside, with a very high K setting during the day, decreasing toward sunset and with a low K after sunset.

My daytime light setting is accordingly a very high K. This is ideal during the day, but by the time sunset arrives, the lights are far too white. This is why people are asking for an offset - they want their lights to decrease in K as sunset approaches, rather than starting to transition once sunset arrives.

from kelvin.

stefanwichmann avatar stefanwichmann commented on July 25, 2024

With Kelvin 1.2.0 the sunrise/sunset times are shifted to another sun angle and should improve the described situation. Let me know if that works!

from kelvin.

ryanfelder avatar ryanfelder commented on July 25, 2024

I would like to adjust the behaviour related to sunrise and sunset as well.

My goal is to have my lights warm in the morning but gradually turn to cool during the day, then warm again at night.
I would like this process occur after the actual sunrise... my setup would ideally run from sunrise to about 10:00 am.

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.