createTimer error in rules script

This gives away that you have started from an old tutorial or example for OH1.
Assuming you use OH2, these are not needed and indeed mess things up.

Better example

Restructuring like this will give you a better idea of how timer works

   ...
    timer = Timer.createTimer(now.plusSeconds(1) [|
        logInfo("Switch off","My timer executing")
        sendCommand(Sonoff_4CH_Power1, OFF)
        timer = null   // reset the timer
    ])
    logInfo("Switch off","My switch on rule exiting")
end