Circadian Lighting Piston in webCoRE


#21

I really appreciate this piston. It does exactly what I need. I also encountered what KiloWatts was discussing with the lightTemperature giving a sawtooth pattern in the afternoon. I dumped the formulas into a spreadsheet and figured out that it was a simple error. The calculation within the “Time is before sunset” IF section for (@lightTemperature) should be

(({hourSunset} - {$hour24}) * {lightTemperatureIncrementAfternoon}) - (round($minute / 5) * {lightTemperatureMinuteIncrementAfternoon})+{@lightTemperatureMin}

The formula in the original code added the lightTemperature by minute increment instead of subtracting it. This caused the lightTemperature to go up slightly until it hit the hour where it dropped. Hope this helps everyone.


#22

I have also imported this Piston today and set my lights. Keeping all else without changes.Error:

An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object.

Please see Image.

Any assistance will for sure be appreciated! :slight_smile:


#23

For some reason (probably because of Tuya complications), my lights didn’t work well with the Circadian Lighting smart app. So I cobbled together a simple one that basically triggers every time a color bulb goes on and sets the temp based on a curved sale from max (sunrise) to min (sunset). Seem to be working so far. Here are the variables:

Basically, if the time is after sunset up to an hour before sunrise, I just use min temp. Sunrise to sunset, it uses a curved scale from max down to min. Not really circadian, I realize, but works well so far for my needs.


#24

(I used 2600 as the min and 5700 as the max)


#25

thanks, that was exactly what i needed. I thought i was going crazy watching the lights change between 4-6 pm every day!