@APL2017 Posting one question multiple times isn't gonna give you an answer quickly. I just wanted to say that.
I see the code on the website is still in pre MS 2.0. It should be easy to convert it to MS 2.0. The only problem is that I don't have the hardware setup to check if it works. If I can find some time this week I will convert it, so that it at least compiles. But I can not test it and can't promise I will finish it this week.
But @pjjarzembowski version should work, you should only strip out the extra sensors he attached to his node.
After playing with dimmers and Domoticz for quite some time, I've discovered that 15 brightness levels is all I need. Because it's hard to see the difference is brightness level if you have 100 levels. And also it takes a lot of gestures to move from max to min. So the code can be simplified more. By just mapping the Domotics level (1-100) to (1-15) and the opposite when you send the nodes brightness level to Domoticz.
Also Domoticz behaves odd when it comes to dimmer actuators as I discovered during a project I'm working on now. There are some work arounds for that, which envolve storing the brightness levels on the eeprom of your node. I know 100000 times is a lot. But I really don't see the need to store each brightness level change in the eeprom.