Someone asked about my alarm leds

Someone asked in another thread about some leds that I activate through tasker. Figured i’d talk about it here. It’s a WemoD1mini with some arduino code and some eBay LEDS. everything is being powered from a 12v power source. Tasker and MQTT plugin required. i use a spreadsheet to calculate how much to increase the payload so that it maxes out by the time the first snooze is hit. So if snooze time is 10 minutes it goes from 0(min) to 1023(max) over the 10 minute span

tasker description

Lights (50)
A1: Variable Set [ Name:%waittime To:10 Recurse Variables:Off Do Maths:On Append:Off ] 
A2: Variable Set [ Name:%Brightness To:24 Recurse Variables:Off Do Maths:On Append:Off ] 
A3: Variable Set [ Name:%Payload To:900 Recurse Variables:Off Do Maths:On Append:Off ] 
<Starting Line>
A4: If [ %Payload > 1023 ]
A5: Variable Set [ Name:%Payload To:1023 Recurse Variables:Off Do Maths:On Append:Off ] 
A6: MQTT Publisher [ Configuration:192.168.1.161:xxx => ha/warmlites QoS:2 Timeout (Seconds):0 Continue Task After Error:On ] 
A7: Goto [ Type:Action Label Number:1 Label:End ] 
A8: End If 
A9: MQTT Publisher [ Configuration:192.168.1.xxx:1883 => ha/warmlites QoS:2 Timeout (Seconds):0 Continue Task After Error:On ] 
A10: Wait [ MS:0 Seconds:%waittime Minutes:0 Hours:0 Days:0 ] 
A11: Variable Add [ Name:%Payload Value:%Brightness Wrap Around:0 ] 
A12: Goto [ Type:Action Label Number:1 Label:Starting Line ] 
<End>
A13: Flash [ Text:Done Long:On ]

Tasker is what i’m using now because the lights are used in multiple rooms for different people so their specific lights go off when their alarm goes off. It shouldn’t be difficult to integrate into HA if that’s what you want, merely just writing an automation/script that runs every XX seconds until max is achieved. The Tasker task takes the values from the spreadsheet and just runs them in a loop every few seconds until max is achieved.

All this is sent to a Wemos D1 miini to handle to MQTT. Here’s a link to the hastebin for the code. i’m actually running 2 different lights so that’s why you see that in the code.

https://www.hastebin.com/xokologana.cpp