Table Of Content

Butler Android

What is Butler Android ?

ButlerAndroid is an Android application to control your Domogik smart home controller with your voice. Domogik includes a component, named the Butler. This is the component that allows you to speak to your house!

This application is like Siri or Google assistant : you can wake it up with a keyphrase of your choice and discuss with your house :

  • Query about the weather today or tomorrow.
  • Ask to switch on/off any appliance.
  • Ask the temperature or himidity of any room.
  • Manage your shopping list.
  • And a lot of other tasks !

On which devices can I use this application ?

You can use this application on :

  • Smartphones
  • Tablets
  • Regular Android smartwatches (not Android Wear)

You can not yet use this application on :

  • Android Wear 1.x devices

Here is a screenshot taken on a smartphone :

Domogik Butler

Here are some screenshots taken on an Android 5.1 smartwatch (in french for now, sorry) :

Domogik Butler Domogik Butler Domogik Butler

How to install it ?

Just download the last APK from the official Domogik website download page. Then, launch the application, configure it with the url of your Domogik administration base url, a valid login and its password. And it is all to start using the application.

Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration

If you want to activate the voice wake up, just choose the wake up language, the words to activate the wake and a threshold (15 is a good starting value).

Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration Domogik Butler configuration

Using the application

After configuring the application, you can click on the bottom button (the Domogik logo) or use your wake up words : the application will start to listen to you.

Domogik Butler usage

When the application is waiting/listening for your query, the bottom button icon will change to a microphone icon. When the listening is finished, the icon will change to a cog while requesting the Domogik Butler. Then, the response will be spoken by the application (and the icon will also change).

Domogik Butler usage Domogik Butler usage Domogik Butler usage

Once the response spoken, the application will start again to listen to you to allow a continuous speaking. If you say nothing, it will just stop listening and wait until you tell your wake up words or click on the bottom button.

What can I say to the Butler ?

Well, it depends on the packages you have installed on your Domogik, but basically you can at least :

  • control your lights and appliances
  • control your shutters
  • get temperature, humidity from the corresponding devices
  • ...

Voice wake up is hard to use

If it is hard to wake up, try to lower the configured threshold.

If you have too much unwanted voice wake up, you can increase the threshold value. You can also change your wake up word by using something longer.

Changelog

0.9 beta 8

  • Add geolocation system compliant with Domogik
  • Display user queries partial results while speaking

Development - integrate the butler in another Android Application

Note

This page is in progress

To include the butler service part in another application :

  1. copy all Butler*.java files
  2. in the AndroidManifest, get these parts :

TODO

Try to build your app. If OK, then :

  1. start the service from your main activity :

TODO

  1. add some Receivers if you need to have interactions between your user interface (or another interface) with the butler service :

TODO : example TODO : list of existing Intents

Development - internal status

What is the status ?

The status is the current state of the service : if defines which action is in progress.

List of the status

WAITING                        # Set up at service startup and used when no listening/processing/speaking action is done

LISTENING
LISTENING_WAITING_FOR_SERVER_RESPONSE   # when the speech has ended and we are waiting for the server response. Not usefull on a fast network, but usefull on a slow network to understand we can't speak anymore because we just wait for Google voice servers response...

LISTENING_ERROR                # Raised if an error occured during voice recognition
\_ WANT_LISTENING_AGAIN        # For continuous speaking
   \_ LISTENING
\_ WAITING                     # For no continuous speaking

LISTENING_DONE                 #
\_ REQUESTING_THE_BUTLER       # These 2 are basically the same

REQUESTING_THE_BUTLER_DONE     #
\_ SPEAKING                    # These 2 are basically the same

SPEAKING_DONE
\_ WANT_LISTENING_AGAIN        # For continuous speaking
   \_ LISTENING
\_ WAITING                     # For no continuous speaking

Testing the application

First startup

  • configuration missing check is displayed

Service

  • auto restart working on android <= 4.4
  • auto restart working on android > 4.4
  • notification on startup
  • shutdown from the menu

Interface

  • no crash when displayed on various devices (small screens vs other screens)
  • mute button is working
  • voice wake up on/off is working, even when google voice is listening
  • access to configuration is working

Keyspotting

  • If deactivated in conf, no wake up