[Release] [App] Circadian Daylight (v0.80) (Port)


#21

Yes, you need to replace "physicalgraph" with "hubitat", and that's it.

However, I recommend using @adamkempenich's port in post #1. It's actually working very well now, and has more available options.


#22

I am using that one now, and having an issue where the lights don't turn on to the correct CT. I don't need most of the additional features, and recall that I much preferred CD on ST before it was fully revamped, because it was much more stable and consistent.


#23

Do they correct themselves upon switching on? Which bulbs are you using?


#24

They do not correct themselves. I am using about 25 of the Osram CT RT5/6 and a few of the BR19s. With these same lights, on the old version of CD, they used to turn on and go to the correct color temp immediately. Also, any time an action was done on ST that turned on a light controlled by CD, it would quickly correct any others that were out of sync because of a switch being turned off and back on by a family member.


#25

I was having that issue as well at first, but it doesn't seem to be doing it anymore. Have you given the app more than 15 minutes after testing? Either way, I think one of these versions should work.

On ST, I was using a webCoRE piston that would just send a new CT every 5 minutes, regardless of whether the bulb was on or off. This was great because the bulbs would be "prestaged" and always turn on exactly at the desired CT - no correcting. Some bulbs can't prestage (like Hue), but the Osrams definitely can.


#26

I loaded the app last night and saw that it was acting strange, so I let it sit until tonight in case my Zigbee mesh needed some corrective action. It's still not behaving. I haven't figured out in HE how to use CD to set a virtual device, then use that as a reference when turning any lights on. Ideally, I'd be able to set a RM rule to do the CT in the same way you can set a light to follow a Track Dim. Haven't figured that out, either.


#27

Circadian Daylight has been a lower-priority development for me right now, so I haven't touched it really :frowning:

It's still on my radar, though. The other version should work just fine---it did when I tested it. I can't remember if I made any changes to the code, though.

If it doesn't work, let me know and I can work on getting a corrected version to you. :slight_smile:


#28

the app is not changing my lights immediately when they are turned on by an app. i'm using hue bulbs connected to the hue hub and then to hubitat. if I wait long enough it will adjust the color temp (within its 15min cycle), but it doesn't automatically make an adjustment as soon as the lights are turned on.


#29

This is a known issue. It is a priority, but life only allows us to do so much at once... :wink: I will see if I can get to this next week.


#30

Awesome. Thanks for working on this.


#31

In the meantime, I've tested the original version of CD.

I'm using it, and it seems to be working very well!


#32

Note: If you're going to use that version, you'll need to change the CT range in the code itself starting at line 201:

def getCTBright() {
def after = getSunriseAndSunset()
def midDay = after.sunrise.time + ((after.sunset.time - after.sunrise.time) / 2)

def currentTime = now()
def float brightness = 1
def int colorTemp = 1500
if(currentTime > after.sunrise.time && currentTime < after.sunset.time) {
    if(currentTime < midDay) {
        colorTemp = 1500 + ((currentTime - after.sunrise.time) / (midDay - after.sunrise.time) * 4500)
        brightness = ((currentTime - after.sunrise.time) / (midDay - after.sunrise.time))
    }
    else {
        colorTemp = 6000 - ((currentTime - midDay) / (after.sunset.time - midDay) * 4500)
        brightness = 1 - ((currentTime - midDay) / (after.sunset.time - midDay))
        
    }
}

if(settings.dbright == false) {
    brightness = 1
}

if(location.mode in settings.smodes) {
if(currentTime > after.sunset.time) {
if(settings.dcamp == true) {
colorTemp = 6000
}
else {
colorTemp = 1500
}
}

The above uses range 1500-6000 for LIFX Day/Dusk bulbs. The 4500 integer should be the max minus the min.

(LIFX Day/Dusk bulbs actually can go up to 6000K, even though their specs say 4000K. They expanded the range with the latest firmware just recently.)


#33

Any updates on this?

Thanks again


#34

Not yet. I’ll dub Thursday as national Circadian Daylight day, though, and see how much I can get done :slight_smile:


#35

In observance of National Circadian Daylight Day, I will be turning all my bulbs to 2700K at 7am.


#36

I like that idea. I’ll probably turn every light on at midnight and set them to 6000k, as well :crazy_face: Just to remind everyone in our house how much of an impact light plays in our lives.


#37

sorry to be a nag... but, any updates?

thanks


#38

Unfortunately, not yet. I’ve been focusing pretty hard on getting my MagicHome Wifi drivers in a stable position.

That being said, I have gotten started—at the very least—on making improvements. I’m forking from the Kubicki version of CD, which has been very reliable on HE.


#39

Cool. Thanks again for working on this.


#40

just checking in on how progress is coming with this.

thanks