RGBW colour flash cycle or fade
Posted: Friday 20 November 2015 12:12
Hi All
Firstly, thanks for a great product!
I have a doorbell when pushed triggers a sonos script to play a doorbell mp3.
I would also like the LED lights to flash between red and white for a visual alert. (fade & cycle commands would also be nice to have in the future)
logic:-
if cupboard lights are on > flash red twice > return to white on.
if cupboard lights are off > flash red twice > return to off.
I have tried blocky but all the events happen at the same time which does not change the colour.
I have tried scenes but in blocky you cannot 'switch on after'
any ideas ?
I have also tried lua but cannot figure how to pause between commands.
commandArray = {}
if (devicechanged['Kitchen Cupboard Lights'] == 'On') then
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
elseif (devicechanged['Kitchen Cupboard Lights'] == 'Off') then
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='Off'
print('Kitchen_Cupboard_Flash was switched ON')
end
Any ideas would be greatly appreciated.
Many Thanks
Chris
Firstly, thanks for a great product!
I have a doorbell when pushed triggers a sonos script to play a doorbell mp3.
I would also like the LED lights to flash between red and white for a visual alert. (fade & cycle commands would also be nice to have in the future)
logic:-
if cupboard lights are on > flash red twice > return to white on.
if cupboard lights are off > flash red twice > return to off.
I have tried blocky but all the events happen at the same time which does not change the colour.
I have tried scenes but in blocky you cannot 'switch on after'
any ideas ?
I have also tried lua but cannot figure how to pause between commands.
commandArray = {}
if (devicechanged['Kitchen Cupboard Lights'] == 'On') then
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
elseif (devicechanged['Kitchen Cupboard Lights'] == 'Off') then
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_Red']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='On'
commandArray=['Scene:Kitchen_Cupboard_Lights_White']='Off'
print('Kitchen_Cupboard_Flash was switched ON')
end
Any ideas would be greatly appreciated.
Many Thanks
Chris