Here are a couple of my smart apps ported from smartthings garden hue and battery monitor

new version 4.2 garden hue app. also on github..

  • v 4.0 oct 2022 fix requirement to make sure holiday works ( need random on). Turn on random if we have holiday mode on automatically.
  • Add fade in and fade out options in seconds.
  • Add new options for 10, 15, 30 etc seconds to schedule time. Also if the transitions are ?= schedule time, reset the schedule time to 2 minutes.
  • Note fade out only works if you dont separate the fixtures as we need to pause execution for the fade off time, else it would immediately turn off or on again the command
  • executes immeately even though the light will take the x numbers of seconds to finish the transtion, and without a pause execution the next turn on would happen
  • before the transition time has expired.
  • Also be warned some lights do not work well or correctly with the setLevel(level,duration) command for fading. Namely the generic zigbee rgb switch does not,
  • but the advanced zigbee rgb bulb does.
  • v 4.1 missing a line needed in the new code for non random rgbiv color changing mode to work correctly. Also figure how to add fade off with the suspendExecution
  • in the separate light fixture and random mode. I added it for all fixtures on once outside the separate fixture loop.
  • Also was missing code for the non-holiday, random, separated fixture case.
  • https://github.com/lgkapps/SmartThingsPublic/gardenhue
  • lgk v 4.2 add 4 custom color hsv templates. note range checking is not working in inputs so also added code to check range of colors 0-100 in intialize, also section titles not showing up in the
  • page so add paragraph for titles.
  • the custom colors only work in random mode as the non random is ROYGBIV that goes through the rainbow and wouldnt make sense to add a custom color in there.

*/

2 Likes

new version 4.3 missed one change of hard coded 16 to maxColors variable so custom colors were not working in random all colors enabled mode.

One other option you might allow is a color wheel/picker to choose ones own colors that aren't in the limited 15 or so you have...

As i said previously there's no color wheel for apps. If you can find one let me know. i only see something for devices.

Also,(did you look at the new app or see the comments for version 4.2?)

Ie

that is what the custom colors is for you can put in your own colors. You just have to figure out the hue and saturation elsewhere like using the color picker in the device panel of your color bulb or lights and then filling in the numbers shown in the app fields below.


garden hue * v 4.4 slight change to fade off code for separate color for each fixture, random (ie holiday mode) there was an extra fade for each

  • fixture that was not removed.. all fixtures should have faded off at the same time instead it did that and then did an extra for each which
  • made them not come on with the new color at exactly the same time. (left over code artifact from before fade was implemented).

FYI, input with type: "color" has been available since release 2.3.1 and sounds like what was asked:

input name: "myColor", type: "color", title: "Choose color"

(probably looks a bit better if you add width: and put it next to something else, but that's the idea)

The resulting value will be saved to settings as RGB in hex, e.g., #AA11BB, but can be converted to other formats (e.g., HSL) as needed with built-in helpers or whatever code you create.

1 Like

Thanks will add that soon

  • v 4.5 multitude of changes.
    1. removed paragraph lines as hubitat now fixed the section headers to include the text which was previously not coming out on the page.
    1. someone pointed out that color input box was now available since 2.3.x so I added that for the custom 1 -4 colors.
  • and removed the hardcoded hue and saturation fields.. Note if you previously set these you now need to RESET them
  • using the new color selections boxes.
  • also related to this I used the custom level as well as hue and staturation which will override the default level you have set .
  • this may not work perfectly as some lights dont show colors well with low levels, if so let me know and i will remove this code.
    But by using this it will try to do the color exactly has you set it.
  • My default colors took that into consideration and only have colors that work well with a level of close to 100%

*/

1 Like

@kahn-hubitat

This is interesting. I have logging disabled on the garden hue app but it's still throwing out debug logs

must have missed a line.

or more likely logging is for more detailed debugging if you turn it on and i need multiple log levels just to be able to get only that one line.

ya just looked that is by design the minimal logging as the field is really debugging and puts out lot of stuff.. i would have to revamp it all and add a debug level ie off minimal (the one line) full, and that will take a while to change everything.. will get to it when i have a chance.

1 Like
  • 4.6 change debug to log level, rewrite all logging, change many to info which didnt exist when this is written. levels are off, minimal, maximum, minimal corresponds to what
  • loging off previously was, maximum corresponds to what debugging on previously was.

i am sure i missed something as there were probably over 100 lines changed.. so let me know if you find something.

1 Like

No errors anyone everything looks ok? I tested a few paths, but depending on .options there are at least 10 different paths through the code.

I haven't had too much time to look at it. Will run it tonight and let you know...

1 Like

Thanks for this!

I'm struggling to get the settings tweaked exactly right to accomplish what I'm after. My goal is to get 3 colors (red, green, white) to cycle in order; preferably for a 5 second duration.

I find that if I turn holiday mode off, every color is cycled in order. Regardless if only 3 are turned on.

But if I turn on holiday mode, only my 3 selected colors are cycled, but random mode is forced.

Is it possible to get:

  1. Random mode = False - while only cycling my 3 specified colors in order?
  2. A 5 second duration option added to the menu?

Thank you!

No .. the are no settings for order.

OK. Can random mode be disabled?

That way if an order can't be specified . . . the selected colors always display in the same order?

Ill look at that.

1 Like

new version of garden hue:

did some work for my govee lights..

since they are true rgb added 5 totally random color options .. when any off these are hit in the random queue , it generates a random color with hue between 1 and 100.

also added 5 user define effects that can kick in.. you set the effects from the list of effects for your fixtures.. mine are:

  • scenes : [101=Aurora, 102=Cherry blossoms, 103=Star, 104=Rainbow, 105=Deep sea, 106=Desert, 107=Karst Cave, 108=Glacier, 109=Raindrop, 110=Night, 111=Electro Dance, 112=Stacking, 113=Poppin, 114=Dancing, 115=Swing, 116=Morning, 117=Illumination, 118=Bright, 119=Sports, 120=Siren, 121=Dreamland, 122=Mother's Day, 123=Christmas, 124=Candlelight, 125=Fireworks, 126=Party, 127=Carnival, 128=Halloween, 129=Halloween B, 130=Halloween C, 131=Halloween D, 132=Christmas Tree, 133=Sled, 134=Christmas Gift, 135=Cheerful, 136=Rush, 137=Flash, 138=Speeding, 139=Crossing, 140=Longing, 141=Warm, 142=Tension, 143=Heartbeat, 144=Nebula, 145=Moonlight, 1=Deep sea, 20=Spring, 21=Summer, 2=Longing, 3=Sunset glow, 4=Rainbow, 5=Fire, 7=Forest, 8=Flower Field]

warning: do not use fade in or fade out with govee lights.. as it overwhelms the hub. since there is no fade implemented directly in the bulbs.

  • v 4.7 warning about using fade with govee lights.. will overwhelm the hub. as there is no internal fade up or down fx.
  • add 5 new pure random colors 1-100 as govee and other lights are true 16million colors.
  • v 4.8 also for govee only add 5 user selectable effects into the mix.

new version is in my github.. search for garden hue

Gotta say, I'm still running Battery Monitor and just love it. :smiley:

1 Like