SmartThings Community

Garden Hue: New smartapp to change hue color on a cycle or random, sunset to sunrise

smartapp_lighting

(Bryce ) #54

Does this only work with hue or does it work with osram lightify as well?


(James Yeo) #55

Should work with any colour changin bulb, I use it with Lifx


(Bryce ) #56

How do I download it? I am new to all this user community stuff and don’t know how to do anything


(Convinced ST will never be unbroken…) #57

Afraid so.


(Larry) #58

Did you read the thread …it was written for lightify


#59

The link to the code is in the first post of this thread.

If you haven’t used custom code with SmartThings before, the following will explain the process. It’s pretty straightforward, you’re going to copy the code from the author and then paste it into your own account. :sunglasses:


(Scott) #61

@Lgkahn, Can this be run not on a schedule (sunset to sunrise), but only when a switch is on or off? If so how?

I’m assuming by not enabling it (leaving enabled unchecked) and then selecting a switch? Would it then only run when switch is on regardless of time of day, and turn off when switch is off?


(Scott) #62

I’d like for it to change colors every minute. Is this how it to do it?

 case "1":
 log.debug "switching color every 1 minute."
 schedule("0 0/1 * 1/1 * ? *", changeHandler)
 break;

(Scott) #63

This does work. SmartThings does not allow you to schedule anything more than once a minute anymore, so unfortunately this is as quick of a color change as can be allowed.

I also had to get rid of the notifications code as it always required me to select some sort of notification even though it was not set as required. If you can figure out how to not make this mandatory that would be great. Getting a notification every minute is annoying.

I also got rid of all the code for sunset/sunrise as I only want this to work via a virtual switch. Can you make it so that the Enabled/Disabled checkbox only controls whether it runs automatically. If you select a switch to control it, it should control it regardless of whether Enabled/Disabled is set to Enabled.


#64

I just installed this app - my very first custom app since I started using smart things. I’m using it with an osram lightify light bulb. When the app first started it seemed like I was getting double notifications, but now that it’s running it looks like I’m only getting one for each color time. I’m definitely interested in changing this to run on a set schedule that the user chooses (or somehow on demand). I’m a coder by trade, so if I get the time I’ll probably jump in there and see what it takes to make that change. Nice work!


(Larry) #65

Just schedule the light to turn on, if you leavwvit enabled it will run whenever the lughtvis turned in orcacswitch is on.


(Larry) #66

I’m currently having problesm with the app , as they appareantly updated the device types for the osram strips and my strips were turning on by themselves and not returning a status of on when they should. I have removed and re-added the osram zigbee devices and it seems better but will keep you informed.


(Diego Yong) #67

I tried adding this app, but I don’t see it on my apps section… Can you help?


(jkcheng122) #68

You need to go through the process on the web console: https://graph.api.smartthings.com/ Basically get set up there, get your Hub on there, and you can add the app by copying the code and publish/save.


(Diego Yong) #69

I did all of that, but the published app is not showing up on my apps on my phone app. It shows on web console tho


#70

Please add more much shorter time options, e.x. 5 seconds, 10sec, 30sec, 1min, 2min). These seconds modes are for party time.

Also, just to make sure: If I want to disable sunset/sunrise and just manually turn it on/off via a virtual switch, would I enable or disable (above the virtual switch option)?


(Bradley Baker) #71

You can’t go less than 1 min I believe. API doesn’t support it.


(Larry) #72

As promised long long ago in a galaxy …

Version 3 is live in the git hub with the following changes.

  • Version 3:

  • Add option to control each light separately, so each gets its own color.

  • Add Holiday Mode option where you can individually control what colors are enabled.

  • Related, Add options to turn on/off each color.

  • Add every 1 minute option. Use Sparingly can overload back end Scheduling

  • Added better logging, so in notification window you can see current color set. This is in order to help debug for when lights stop responding.

The holiday mode and individual light control only work in Random mode, as it doesnt make sense in normal mode where you go through the spectrum in order.

Just in time for the holidays, blue, navy blue, aqua, white for Hannukay
Red, Green for christmas.

Larry

Link in first post to github should go to new version 3.


#73

Is there a way to prevent this from running during a set period of time.

I tied this to a virtual switch which turns on a sunset and off at sunrise but the notifications for this are still running now (2:38pm).


(Larry) #74

Font use a virtualbseitch just use the built in sunrise sunset