Well, thank you very much to all of you!!!
It seems the code below works. I tried it before and the OH2 reported error of rules file and did not start.
Now I did the same trick and restarted several times and it works. I must have been something else… I am sitting behind PC and migrating from OH1 to OH2. Now is my third day in a row…
The only error I have to solve is “arping” in Windows 10. I have copied the arping.exe in all directories of OH2 and it is still not discovered. I get error: Cannot run program “arping” (in directory " . ")… System cannot find the file…