i created rule file but it is not executed ,no trace in logs
import org.openhab.model.script.actions.*
import org.openhab.core.library.types.*
import java.util.*
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.core.types.Command
import org.openhab.core.types.*
import org.openhab.core.items.GenericItem
import java.util.regex.Matcher
import java.util.regex.Pattern
rule “voicecommand”
when
Item VoiceCommand received command
then
var String command = VoiceCommand.state.toString.toLowerCase
logInfo(“Voice.Rec”,“VoiceCommand received”+command)
if (command.contains("turn on light“)
{
sendCommand(light,ON)
}
else if (command.contains("turn off light“)
{
sendCommand(light,OFF)
}
end
rules in paper ui works fine but rules saved in home.rules is not executed
i tried most of the examples
anyone knows the reason replay me