the voice command is confused in case that a string which uses a quote.
Example : if the command “i didn’t” is sent
see below the logs
Logs:
2018-07-01 22:39:23.374 [ome.event.ItemCommandEvent] - Item 'VoiceCommand ' received command I didn ' t
2018-07-01 22:39:23.410 [vent.ItemStateChangedEvent] - VoiceCommand changed from to I didn ' t
Rules:
rule "VoiceCommand"
when
Item VoiceCommand received command
then
var String newscene= receivedCommand.toString.toLowerCase
logInfo("Scenario", "1-newscene :" + newscene)
newscene =newscene.replace('é','e')
newscene =newscene.replace('é','e')
newscene =newscene.replace('î','i')
logInfo("Scenario", "2-newscene :" + newscene)
end
Items:
String VoiceCommand "VoiceCommand"
How can i replace the space/quote/space to a quote ?
I think that all examples above use double quotes ""
it seems that you used single quotes ''
did you try with "" ?
Also, is your rules file containing 820 lines?
when trying to debug stuff, it’s better to isolate them. Put the rule in a new file and based on the log entry pin point the error.