But, for the new house I'm building I wish to use some more unique and controllable LED lighting. That means I need a system which I can remotely control to dim to whatever value I send to it.
I hope I selected the right forum, so here goes:
My goal is basically to create a system which senses current light in a certain room, and then senses movement. If movement is detected the LED's should gradually fade up to a level. But this level depends on the time of day, during the night I wish them to light to 20% for instance and during the day or evening I wish this to be 80%. The same thing goes for color (most lights will be warm white though). I wish to be able to control color and intensity based on presence detection, time of day, etc.
I also wish to build it into my cellar and simulate daylight with it. Combining a Warm White and Cool White strip with maybe an RGB strip to simulate natural light and the morning, midday and afternoon cycle with it a little bit. Make it feel more natural if I happen to walk into the cellar, again all brightness dependent and motion controlled.
I call it "Time dependent variable LED lighting" or something.

To try and accomplish this I have tested several existing commercial products, but they all don't completely suite my needs.
AppLamp: Nice, but their RGBW dimmers aren't RGBW, they are RGB or W. Also they are not able to gradually fade between set values. Their price, if you buy Mi.Light in China is fair
Fibaro RGBW: Nice module and actually RGBW. It even has a setting to do the fading and everything. But Z-wave is not always reliable (for me) and it's price is way up there!
So I have created my own prototype with a Arduino Nano combined with some mosfets coupled to a RM-04. The Arduino has PWM pins which can dim the LED strips using the mosfets from a value of 0 (off) to 255 (full brightness). It does so at about 866Hz so no visual flicking is visible to the human eye.
The RM-04 WiFi is a WiFi-to-Serial bridge. Basically it connects to your WiFi automatically/itself and then opens a TCP port which it links to some onboard serial pins. Couple these serial pins with your Arduino and you have a way to remotely talk to your Arduino.
The cost of building QLEDdimmer v0.85 (my prototype) would be about 20$ for all components combined if I build them in an order of 10 or so. The WiFi module is the most expensive of that and recently a new module surfaced which does not cost 10$ but 5$ so that would make it even cheaper!
I've made a program that runs on the Arduino Nano which listens and accepts serial input in a 4 number format (I wish to control 4 Mosfets/LED strips at most at the same time from one module). The program uses a library which automatically fades between the values sent. I have set the program to always take 5 seconds to fade between current and new value.
So, from a Linux system I can now perform the following:
echo 100100100100 | nc 10.10.128.113 8080 (Fades all channels from 000 to 100 in 5 seconds)
echo 255255255255 | nc 10.10.128.113 8080 (Fades all channels from 100 to 255 in 5 seconds)
echo 000000000000 | nc 10.10.128.113 8080 (Fades everything back from current value (255 if following last example) to 000 in 5 seconds)
And so far, this all works now. This is still a raw prototype, for instance, if you don't give a value for a certain channel, it will revert back to 000, making it hard to control all the channels separately. But let's say that will become a feature for v2.

For now, I'm looking for a way for Domoticz to control the whole. I have got it working using Lua scripts to turn it on and off to a set value. But I would much rather integrate it as a dimmer type of switch. From what I've been able to gather there is no Lua functionality to, for instance, say that dimmer 0% - 100% corresponds to 000 - 255 and then to send that value to all channels connected to that particular module. That is all of the functionality I would want to create for v1 of my project.
I understand in the end it would be best of my Arduino program would understand json input strings and probably a lot of other ways to better create what I've built, but I'm not really a programmer.

Does anyone have a great idea on how to integrate this into Domoticz?