[OBSOLETE] Trend Setter

This app does exactly want I wanted however I’ve noticed that say you have 3 lights in a group turning the group on maybe 7/10 times all the light turn on at slightly different times so looks a bit naff anyway to fix this?

Unfortunately not. I send all the commands to ST at the same time but ST appears to process them in order rather than in parallel. Sometimes it’s noticeable, sometimes it’s not.

1 Like

Seems a bit naff asking Google to turn on the lights using hue turns them all on at the same time but smarthings does one at a time even through Google I’ve even seen a 1 second delay between two bulbs looks stupid.

I love how smart things is all my devices in one app but can’t help but think might be best to leave each bridge linked to Google home on its own and not use smartthings.

2 Likes

Just wondering. Is anyone else having trouble with this SA?

Every time I change the colour of a group I have (contains blooms and strips) it sets the brightness back down to 0%. Happens every time :frowning: can’t figure out why?

this is the output -

49437032-e58f-425c-9aeb-d4d25ee32ddd  12:16:47: debug Setting level to 1

49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:47: debug syncLevel(): [1, 1, 1, 1, 1]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:45: debug Setting level to 1
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:45: debug Some values are the same, choosing most popular
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:45: debug syncLevel(): [0, 1, 1, 1, 1]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:41: debug Setting level to 1
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:41: debug Some values are the same, choosing most popular
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:41: debug syncLevel(): [0, 1, 1, 0, 1]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:39: debug Setting level to 0
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:39: debug Some values are the same, choosing most popular
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:39: debug syncLevel(): [0, 0, 1, 0, 1]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug Percent On: 100
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug syncSwitch(): [on, on, on, on, on]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug Setting level to 0
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug syncLevel(): [0, 0, 0, 0, 0]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug syncHue(): [67, 67, 67, 67, 67]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:31: debug syncSaturation(): [98, 98, 98, 98, 98]
49437032-e58f-425c-9aeb-d4d25ee32ddd 12:16:17: error org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘null’ with class ‘null’ to class ‘int’. Try ‘java.lang.Integer’ instead @line 350 (adjustSaturation)

First time I’ve seen this. Very odd, the error suggests an unexpected value. But why it would go to level zero I’m not sure at the moment. I will look at the code when I get a spare minute.

Thanks buddy -

I also just found this:
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:47: debug Updating Controller State: level -> [1, 1, 1, 1, 1]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:47: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:46: debug Device state change: Window Light -> level = 1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:45: debug Updating Controller State: level -> [0, 1, 1, 1, 1]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:45: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:44: debug Device state change: New Lounge corner lamp -> level = 1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:41: debug Updating Controller State: level -> [0, 1, 1, 0, 1]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:41: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:40: debug Device state change: TV Ambient -> level = 1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:39: debug Updating Controller State: level -> [0, 0, 1, 0, 1]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:39: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:38: debug Device state change: Left Lounge Bloom -> level = 1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:37: debug Updating Controller State: level -> [0, 0, 1, 0, 0]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:37: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:36: debug Device state change: Right Lounge Bloom -> level = 1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Updating Controller State: switch -> [on, on, on, on, on]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Updating Controller State: level -> [0, 0, 0, 0, 0]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Updating Controller State: hue -> [67, 67, 67, 67, 67]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Updating Controller State: saturation -> [98, 98, 98, 98, 98]
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug getChildDevices(false), children=1
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Left Lounge Bloom -> switch = on
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: New Lounge corner lamp -> switch = on
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Right Lounge Bloom -> switch = on
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: TV Ambient -> switch = on
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Window Light -> switch = on
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Left Lounge Bloom -> switch = off
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Left Lounge Bloom -> saturation = 98
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:31: debug Device state change: Left Lounge Bloom -> level = 0
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: New Lounge corner lamp -> saturation = 98
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: New Lounge corner lamp -> hue = 67
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: New Lounge corner lamp -> switch = off
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: New Lounge corner lamp -> level = 0
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Right Lounge Bloom -> switch = off
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Right Lounge Bloom -> saturation = 98
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Right Lounge Bloom -> hue = 67
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Right Lounge Bloom -> level = 0
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Running command ‘setHue’ with arguments [66.80054] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Running command ‘on’ with arguments [] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Running command ‘setSaturation’ with arguments [97.64706] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Running command ‘on’ with arguments [] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Running command ‘setColor’ with arguments [[level:null, red:8, hex:#0806FF, blue:255, saturation:97.64706, hue:66.80054, green:6, alpha:1.0]] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: TV Ambient -> level = 0
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: TV Ambient -> saturation = 98
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: TV Ambient -> switch = off
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: TV Ambient -> hue = 67
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Window Light -> level = 0
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Window Light -> switch = off
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Window Light -> hue = 67
9421d98b-b973-4c31-92be-5a3881ce4f77 12:16:30: debug Device state change: Window Light -> saturation = 98

I’m looking through it a bit more too see if I can see - It looks like it reads this line:

15:10:18: debug Running command ‘setColor’ with arguments [[level:null, red:255, hex:#FFBC83, blue:131, saturation:48.627453, hue:7.6612906, green:188, alpha:1.0]] on [Window Light, TV Ambient, Right Lounge Bloom, New Lounge corner lamp, Left Lounge Bloom]…

Its seems to take “null” as 0 and sets the level to either 1 or 0 the hue strips go to 0 and the blooms go to 1… It’s really weird.

I have a “Room” in the hue app with the same lights in it, when I change that it works ok - It’s definatly something related to Trend Setter or the Device Handler as thats the only thing different that is controlling their functions.

I have also had a similar issue… it likes to always go down to 0% as I’m making tweaks like color. I am using ActionTiles as my interface too. It seems to happen through the ActionTiles platform… maybe this could be the cause of my issue?

I’m flying blind a little at the moment as but I’ve made a change to that I’m hoping might fix it. Can you try updating? Should see two device handlers updated.

Just to let you know what ever change you made it worked!

Can I ask what it was? I’m trying to get familiar with the coding side of things and just want to see what you did so I can understand how that effected the change?

Thanks

By default the level property on the command object for setting the colour was being set to null. As I believe most device handlers (that I’ve used at least) check to see if it’s null or not and don’t do anything if they are. So instead of setting it to null, I get the current level and use that value instead. I suspect that the device handlers for Hue don’t check for a null value and translates the null to a zero.

Oh no! I take half of it back.

Controling via the ST app works ok - but when you control via Alexa or Google home it does the same thing… How annoying!

Huh, that’s very strange. The only thing I can could think of for that is that the Alexa/Google Home integration calls the setColor command differently than the ST app does when it uses it.

I wonder who would be best to ask about that?

@MichaelS maybe? @JDRoberts maybe? - Sorry guys, just throwing your names out there?

If you have any logs you could post for the Group and for the device when using Alexa/Google Home, that might shed some light. If the lights work individually fine with Alexa/Google Home then it’s still likely something to do with my app.

Nope dont worry - I had to remove the devices from the assistants and then re-discover them. With the redicsover it seemed to work ok.

Thanks for looking at it so quickly!

1 Like

No problem…so this is new behavior? I know dimmers by default go to the last value they had. So, if there was something ‘odd’ in the last value that might have something to do with it. What if you manually set it to 100 and then control it from there…same behavior?

1 Like

Thanks for coming back @MichaelS - the old “turn it off and turn it on again” approach worked a charm as normal in the end! (kinda).

1 Like

sorry for the noob question here but what do i need to install this?

do i install all 6 of these in my IDE device handlers


and then the 2 smart apps in my smartapps?
he said he can’t edit the OP
i never used this SA before so should i install all 6 of these and the in 2 SA github too?

i want to try to use this to sync 3 lixada H801’s flashed with the ST fw and using the DTH from Eric Maycock

color coordinator didn’t work with it ,had issues with changing to the W1 white channel

wondering if this is a good option