I had to struggle a little bit to get them working, I found for example that you need version 1028 of the firmware, the original version 1027 didn't support it yet. After installing version 1028 I could use the "Learn Light/Switch" by pushing on one of the buttons of the remote control. I had this RC already paired with the three switches that came in the kit. Once the switch is added it is seen as a "Lighting 5, Kangtai/Cotech, On/Off" in my devices and I can switch them on and off with Domoticz. I can control them from the 1st floor (2nd for Americans

So far so good. Now I see that when I push one of the buttons on the RC, Domoticz detects it and it will change the icon corresponding to the On/Off state depending on which button I pushed. However the switch itself doesn't react to the RC anymore and I would like to use both of them, ideally synchronized.
I wrote a Blockly program for the ON/OFF switches that tells Domoticz to repeat each action and as such now the switches listen both to the RC and Domoticz and Domoticz knows the correct state. The script is here for reference:

Using this script I can use my browser to light the lamp and switch it off using the remote control and all states are kept in sync. The variable is needed to make sure that the command will be sent only once when the state of the lamp changes. I posted it here because it might be useful to other people too.
My question is however if this is the right way to do it? Can I create a switch which is controlled by the RC and which as a side-effect will also switch ON/Off the wall plug?
Another question I have is: can I create these "Lighting 5, Kangtai/Cotech, On/Off" switches manually instead of using the "learn" mode? Now I need to pair them with a RC each time and there are only 4 buttons on each RC. So if I want to have 5 or more switches, I might have to buy an extra controller.