Hi folks,
Is it possible to shuffle a color with a rule?
Regards
Shuffle color
Hi folks,
Is it possible to shuffle a color with a rule?
Regards
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
@n3ro said in Shuffle color:
Is it possible to shuffle a color with a rule
Possibly. What works for sure is to randomize the color. Shuffling, i.e. switching to the next pre-defined color in a list of color values may be harder to achieve. Another possibility maybe to implement a color shuffle action for the given plugin.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Maybe you could set a variable to a random value by rule
http://stackoverflow.com/questions/5092808/how-do-i-randomly-generate-html-hex-color-codes-using-javascript
@SaxnPaule said in Shuffle color:
Maybe you could set a variable to a random value by rule
http://stackoverflow.com/questions/5092808/how-do-i-randomly-generate-html-hex-color-codes-using-javascript
I’m using the hue-zll plugin:
Random:
When every 5 seconds and $disco = 1
Then set color of Wohnzimmer to hue random(0,100) saturation 100 transition time 5 seconds
Cycle:
When every 3 seconds and $disco = 2
then set $disco-hue = ($disco-hue + 5) and set color of Wohnzimmer to hue $disco-hue saturation 100 transition time 3 seconds
//Wraparround
When $disco-hue >= 100 and $disco = 2
set $disco-hue = 0
@thex cool! But didnt work with dhe dummy-led device
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
@n3ro did you already figure it out? I also want to try this at home
As part of pimatic-milight-reloaded you can use the disco modes provided by the Milight bulb contoller
Also note, primatic provides a hexString formatting function which allows for generating random RGB hex strings, e.g.
hexString(random(0,16777215), 6, "#")
.
Unfortunately, a bug slipped in causing the input number to be zeroized. This will be fixed with the next release of pimatic. EDIT: Released pimatic@0.9.42 which fixes the issue
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Wow you guys rock! Thanks! I will try it out
@mwittig after the pimatic update the hex generator works perfect! One more question at this moment it is not possible to set the milight color with a variable. Is this hard to add it to the plugin