The earlier tests was not really stable and the relay did stange things from time to time.
But this works stable, i have tested at least 20 times.
It is also simple, only 2 lines. - Great Work.
Thank you very much, i'll try this tomorrow evening.. > "The event system in domoticz is single threaded and when a script waits for a command to finish, all other script activity has to wait as well. " <
Here i learned more about Domoticz : I was calling a LUA script, which included another LUA ...