# HABDroid VoiceCommand please help?

**URL:** <https://community.openhab.org/t/habdroid-voicecommand-please-help/20754>\
**Category:** Android App\
**Created:** [January 20, 2017, 6:18pm UTC](https://community.openhab.org/t/habdroid-voicecommand-please-help/20754 "2017-01-20T18:18:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [January 21, 2017, 9:14am UTC](https://community.openhab.org/t/habdroid-voicecommand-please-help/20754/2 "2017-01-21T09:14:36Z")

</div>

Try it this way:

```
rule "VoiceControl" 

when 
    Item VoiceCommand received command
then 
    val txt = receivedCommand.toString.toLowerCase
    logInfo("Voice.Rec","VoiceCommand received "+txt)
		if (txt.contains("on") {
			Light_C_Staircase.sendCommand(ON)
		else if(txt.contains("off")) 
			Light_C_Staircase.sendCommand(OFF)
		}
end

```

---

_[View the full topic](https://community.openhab.org/t/habdroid-voicecommand-please-help/20754)._
