[SOLVED] VoiceCommand rules don't works

Hi.
Using OH 2.4 on RPi 3, I’m trying to test Voice Control from Android App but rule script seems NOT be triggered …
The event is correctly printed in the log:

==> /var/log/openhab2/events.log <==
2019-04-10 17:16:21.893 [ome.event.ItemCommandEvent] - Item 'VoiceCommand' received command test

… this is my voice.rules:

rule "Voice Control"
when
	Item VoiceCommand received command
then
	logInfo("VoiceCheck", receivedCommand)
end

… other info messages are printed in the log …
Any idea ?
Thanks.

IMHO logInfo needs two strings like:

logInfo("VoiceCommand","My received Comand: {}", receivedCommand)

I’ve tried two simple and static string, too … and neither your snippet works :frowning:
But … are there specific requirements for this scenario (for example a specific binding …) ?

OK, I’ve solved …
The reason it doesn’t work is that … VoiceCommand Item isn’t an implicit item (as I thought …) but must be declared (in a .items conf file …)

Glad you found a solution, but what exactly do you mean by " must be declared (in a .items conf file …)" ? I’m having the same issue

Ok Never mind, found it
Create an .items file containing “String VoiceCommand”