Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voice command support for OH2 #242

Closed
kaikreuzer opened this issue Oct 8, 2016 · 5 comments

Comments

@kaikreuzer
Copy link
Member

commented Oct 8, 2016

So far, voice commands are sent to an hard-coded String item "VoiceCommand".

OH2 now has a dedicated voice handling infrastructure and offers a rest endpoint for it (starting with OH2 distro 519).
HABDroid should be adapted to use this new endpoint, if it is available; otherwise it can use the current logic as a fallback.

Here is the documentation of the new endpoint:

screen shot 2016-10-08 at 11 28 15

@vorburger

This comment has been minimized.

Copy link

commented Oct 10, 2016

+1 - this sounds like a GREAT idea... ;-)

@lolodomo

This comment has been minimized.

Copy link
Contributor

commented Nov 18, 2016

@kaikreuzer : if I understand, the UI will not choose the interpreter and the server will systematically use the default interpreter ?
But in the real life, I would like to be able from HABdroid to trigger either the Built-in interpreter for standard commands and of course the rule-based interpreter for my user specific commands.
Does it mean that the server should call all HLI when a REST request is received from HABdroid ?

@lolodomo

This comment has been minimized.

Copy link
Contributor

commented Nov 19, 2016

For my use case, maybe the solution would be that my default HLI is set to "Rule-based interpreter"; HABdroid will request the rule-based interpreter; the rule-based interpreter will then set my item VoiceCommand and so trigger my rule; then in my rule, I could first call the built-in interpreter; if the built-in interpreter is not able to interpret my command, I will continue with my specific code in rule.
All this means we need in rules to be able to call interpret() specifying what HLI to be used and be able to check the result of interpret call.
@kaikreuzer : is it how you think ?

@kaikreuzer

This comment has been minimized.

Copy link
Member Author

commented Nov 21, 2016

My idea was to simple migrate what is currently there to the new REST endpoints. There is no mechanism in HABDroid to choose different interpreters for different use cases and it would probably require quite some UI work to do this in some nice way.
I think for now it is ok if the app does not choose a specific hli, but uses the one specified on the runtime as the default. And yes, this leaves you the possibility to code any stuff you like within rules.

@lolodomo

This comment has been minimized.

Copy link
Contributor

commented Nov 21, 2016

Ok for me with the change to implement in HABdroid that will just trigger the default HLI of the server.

maniac103 added a commit to maniac103/openhab.android that referenced this issue Mar 8, 2018
Adapt voice service to use new voice command endpoint.
Closes openhab#242

Signed-off-by: Danny Baumann <dannybaumann@web.de>
maniac103 added a commit to maniac103/openhab.android that referenced this issue Mar 8, 2018
Adapt voice service to use new voice command endpoint.
Closes openhab#242

Signed-off-by: Danny Baumann <dannybaumann@web.de>
maniac103 added a commit to maniac103/openhab.android that referenced this issue Mar 27, 2018
Adapt voice service to use new voice command endpoint.
Closes openhab#242

Signed-off-by: Danny Baumann <dannybaumann@web.de>
maniac103 added a commit to maniac103/openhab.android that referenced this issue Mar 29, 2018
Adapt voice service to use new voice command endpoint.
Closes openhab#242

Signed-off-by: Danny Baumann <dannybaumann@web.de>
mueller-ma added a commit that referenced this issue Apr 2, 2018
Adapt voice service to use new voice command endpoint. (#749)
Closes #242

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.