Google Home + Volumio (voice control) (easy-middle-project)

Dear all,
This project describes one solution to how to connect volumio and google home and then control your playback, volume, skip track, replay.

Motivation.

I have two volumios (RPi2). One is in the kitchen because I like to listen to good music at a high volume when cooking. When working in the kitchen I usually get messy. I have an older cellphone more or less as my dedicated user interface for the Volumio. As you can imagine the screen get messy if I wish to stop playback, skip song etc. Furthermore and to add things up my family and friends often comes into the kitchen and talk to me. High volume and talk do not go together. Messy hands and display-oriented user interfaces do not go together. Therefore it is handy(!) with a voice controlled musicplayer. I just say “OK Google Stereo off” and playback stops and we can talk and when my guest is leaving I continue my messy work and say “Ok google Stereo ON” and can dance and sing my way with messy hands in the kitchen. I am sure you get the picture.

Things you need.

Hardware

A working Volumio (no kidding!!)
A Google Home
An Android mobile phone - I use a dedicated phone which is always in the kitchen which makes it possible for others to use voice control even when I am not at home. Also, I suggest an older mobile which is not using the latest Android software as they kill some background tasks.

Apps from google

MpDroid (free) https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid
Tasker (cost - worth every penny)) https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm
Join (free trial - cost little) https://play.google.com/store/apps/details?id=com.joaomgcd.join

Accounts at

IFTTT (free) https://ifttt.com/
Join (free trial) https://joinjoaomgcd.appspot.com/

Let us get on to work

Preparations on phone

  1. Download apps as mentioned above
  2. Test MpDroid. In settings, you should write in your IP-address for your Volumio. Test it to make sure
  3. Open Join on your phone and follow instructions to connect you.
  4. Leave Tasker for now.

Preparations in your browser

  1. Open tabs with IFTTT and Join. Login/sign up.

JOIN - GO TO THe BROWSERTAB

This is done in order for sending commands to TASKER - in this case a variable.

  1. You should see you Phones name in upper left corner - click on it so it is marked.
  2. Click on the button “join API”
  3. Click on the button “show”
  4. Scroll down to the row “Text - Tasker commands and notification”. Write “status=:=value”
  5. Mark and COPY the full URL-string starting “https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?text=Status%3D%3A%3Dvalue&deviceId=xxxxxxxxxxxxxxxxxxxx etc.” - THIS IS A UNIQUE URL FOR YOU PHONE.

IFTTT

This is for connecting Google Home with JOIN. Make sure you have COPIED the URL as in 5 above.
We will have to do several IFTTT-applets in order to make some voice commands.

NOTE for reference:
If you wish to make use of my tasker-profile (that is a small program for tasker; see link below) you must assign the right number, or rather, replace “value” with specific numbers in the URL-used on each IFTTT-applet - I will describe below when. This my list:
Toggle Playback=1 (I use voice command; “Stereo on”, “Stereo off”
Volume Low = 2 (I use voice command “Volume Low”)
Volume High =3 (I use voice command “Volume High”
Skip track = 4 (I use voice command “Skip track”)
Previous = 5 ( I use voice command “Again”)

Applet for Toggle

Note: I will here just use the easiest IFTTT command. You can do this smarter. But this is the simple way.
You will make five different applets with different commands an and different values as above in note.

In IFTTT - Tab My Applets:

  1. Press “New Applet”

  2. Press “+ this”

  3. Search “Google assistant” (first time you will be asked to connect to Google Home)

  4. Press “Say a simple phrase”

  5. Write your prefered phrase (and variations if you wish) - for the toggle Write “Stereo on” in first and “Stereo Off” as a vaiation if you follow my example)

  6. Write the response you wish Google Home to say like “Sure, will do”

  7. Press create trigger.

  8. Press “+ that”

  9. Search “Webhooks” (click)

  10. Press “Make a webrequest”

  11. PASTE THE URL FROM JOIN in the first field.

  12. IMPORTANT: Replace the word “value” with 1 (and 2 for the second applet, 3 for the third applet…I hope you get it) in the URL in the IFTTT-field. Important that you do not change anything else. Your URL in IFTTT should look something like this (XXXX is unique to you): "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?text=Status%3D%3A%3D1&deviceId=xxxxxxxxxxxxxxxxxxxx etc.

  13. Press create trigger.

Before you do the next applets (or revise this) you can test it - move to next step - go to your mobile:

OPEN TASKER

  1. Download taskerprofile https://drive.google.com/open?id=1Tz_9IjjFOC-5z0pRqNq-9QmurJgfV31e (or do your own if you wish - see below)
  2. Open TASKER
  3. Import Tasker-profile (press Home-button - choose “import” the taskerprofile should be in folder downloaded)
  4. Enable Tasker (upper right corner)

TEST

Say “OK GOOGLE Stereo ON” or OK GOOGLE Stereo Off".

If all works then make applets for the other commands - Do not forget to change value to correct number.

To make own tasker profile (for this you need knowledge of tasker):

    • Profile
  1. Event
  2. Plugin
  3. Join
  4. Configure
    5a. Text: “status=;=”
    5b. Variable nemes: status
  5. Back out
  6. New task
    7a. If command (if status = 1);
    7b. Plugin MpDroid
    7c. Configure
    7d. toggle
    7e. set variable status = 0 (unsure if this is needed but for sure)
    7f. End if

(repeat 7a-f if you would like to do more commands; variable 1, 2, 3, 4, 5 - see my Note above)

Hope this works fine - if anyone is interested. If problems I will try to help.

Henrik Artman

2 Likes