Ok, here you are:
You're right that the way to go is to use tasker and the UDP sender, so install them if you don't have them already.I'm assuming you already have some basic knowledge of how tasker works, and I'm going to list the profiles and tasks needed.
I use the following profiles to command lights on group 1 of the wifi box, adjust the codes at your will.
First of all, you want to make sure the lights are at minimum brightness when you go to bed.
1. Create a new profile "night" of the type Event, select System->intent recieved and under action write "com.urbandroid.sleep.alarmclock.SLEEP_TRACKING_STARTED" (without quotes)
2. in the new task add the following:
a. use the plugin UDP sender to send to your wifi box (port 8899, if you don't know the ip address just send it to your entire subnet, ie 192.168.0.255 ) the code 0x450055
b. wait 100ms
c. send to your wifibox the code 0xC50055
d. wait 100ms
e. send 0x450055
f. wait 100ms
g. send 0x4E0255 (minimum brghtness)
h. wait 1 second (so the led has time to fade to the minimum, I don't know if it's required)
j. send 0x460055 (turn off)
then you can add anything you want i.e. turn off sounds, notifications, data plan/turn on airplane mode, etc
3. create another profile "morning" of type event, intent recieved "com.urbandroid.sleep.alarmclock.ALARM_ALERT_START"
4. call the new task "sunrise" (you will need it later) and be sure to re-enable wifi if you turn it off, and wait for a connection (use wait 5 seconds until %WIFI ~ *CONNECTION* ) and then:
a. send 0x450055
b. wait 100ms
c. send 0xC50055
d. wait 100ms
e. send 0x450055
f. wait 100ms
g. send 0x4E0255
h. wait 100ms.
the previous code simply makes sure you start with a white light at minimum brightness.
now it comes the fun part: I adapted a python function I found to have a more natural transition. it involves some math but you just have to copy the formula ant you're set. continue with the previous task:
j. Set a variable named %ENDCODE to 55
k. Set a variable named %LIGHTLEVEL to 1
l. Set a variable named %BRIGHTNESS to round(2+25*(1-cos(%LIGHTLEVEL*PI/200))), enable "Do Maths" and give the task a label (i choose "loop")
m. Variable convert %BRIGTHNESS from decimal to HEX
n. test variable, length, %BRIGHTNESS, store result in %DIGITS
o. variable set, %BRIGTHNESS to 0%BRIGHTNESS if %DIGITS ~ 1 (add leading zero if brightness is between 0 and F)
p. Variable set. %BRIGTHNESS to 0x4E%BRIGTHNESS%ENDCODE (put together the code to pass to udp sender)
q. since UDP sender gave me troubles with passing variables to it, I used the send intent action, "android.intent.action.SENDTO" with data "udp://your.wifi.box.addr:8899/%BRIGHTNESS"; cat= none, target=activity
r. wait 18 seconds
s. variable add, %LIGHTLEVEL, 1
t. goto action with label "loop" if %LIGHTLEVEL < 101
this will get you a 30 minute white sunrise. I should make it shorter because after 20 minutes of sunrise and silent alarm my emergency alarm kicks in :P. simply adjust action r to make it longer/shorter.
If you're lazy like me you have put a QR code in the bathroom and use the qr code scanning feature of sleep as android. Since you're already in the bathroom you can turn off the bedroom lights (and turn on some other if you like):
5. create a new profile, event, intent recieved "com.urbandroid.sleep.alarmclock.ALARM_ALERT_DISMISS"
6. create a new task that stops the sunrise and turn the light off
a. task stop "sunrise"
b. send code 0x4E0755 with UDP sender
c. wait 100ms
d. send 0x460055
e. turn on the coffee maker :)
If you don't understand something a quick look at tasker documentation should solve your problems :) If you still need help let me know!
BTW: I found that the idea of having a smartphone in the bed influences my sleep in a negative way, so I'm planning to use a DIY solution that involves a mini home server with openHAB and a simple "start music and light quietly 30 minutes before the time to wake up". And why not, an infrared camera to detect sleep movements :)