Follow these steps to easily control your kodi using simple voice commands with your Google Home or Google assistant:
"Hey Google, kodi play [movie name]" --> will search for the given movie name and play it.
"Hey Google, kodi resume [movie name]" --> will search for given movie name and pick up playback from where you left it.
"Hey Google, kodi play a random movie" --> will play a random movie.
"Hey Google, kodi play a random horror movie" --> will play a random movie of the genre "Horror".
"Hey Google, kodi play a random movie of the year 2010" --> will play a random movie of the year 2010.
"Hey Google, kodi play a random horror movie of the year 2010" --> will play a random movie of the genre "Horror" and of the year 2010.
Play the next unwatched episode: "Hey Google, kodi play tv show [tv show name]" --> will search for the given tv show and play the next unwatched episode.
Play a specific episode: "Hey Google, kodi play [tv show name] season 3 episode 1" --> will search for the given tv show and play season 3 episode 1.
Play a random episode from a tv show: "Hey Google, kodi shuffle [tv show name]" --> will search for the given tv show and play a random episode.
Play the most recently added episode: "Hey Google, kodi play new episode" --> will play the most recently added episode to the kodi library.
Binge watch a tv show: "Hey Google, kodi binge watch [tv show name]" --> will add all unwatched episodes to the playlist and play it.
"Hey Google, kodi play youtube [youtube title]" --> will search a youtube video, and play the first video.
"Hey Google, kodi search youtube [youtube title]" --> will search youtube and show you the results on the kodi screen.
"Hey Google, pause kodi"
"Hey Google, stop kodi"
Mute kodi: "Hey Google, mute/unmute kodi"
Set volume: "Hey Google, set kodi volume to 60"
Increase volume: "Hey Google, Kodi volume up [by 10]" --> increase the volume by the requested amount or by 20% if no amount was specified
Decrease volume: "Hey Google, Kodi volume down [by 10]" --> similar to the above
"Hey Google, switch kodi to BBC channel" or "Hey Google, switch kodi to channel 10"
"Hey Google, switch to kodi" --> will turn on the TV and switch to Kodi's HDMI input
"Hey Google, kodi shutdown" "Hey Google, kodi hibernate" "Hey Google, kodi reboot" "Hey Google, kodi suspend"
"Hey Google, kodi scan library" --> Will start a full library scan "Hey Google, kodi clean library" --> Will cleanup your library
Navigate up: "Hey Google, kodi navigate up [3]" --> Will navigate up the requested amount or just once if no number was specified
Navigate Down: "Hey Google, kodi navigate down [3]" --> same as above for navigating down
Navigate Left: "Hey Google, kodi navigate left [3]" --> same as above for navigating left
Navigate Right: "Hey Google, kodi navigate right [3]" --> same as above for navigating right
Navigate Back: "Hey Google, kodi go back [3]" --> Will navigate back the requested amount or just once if no number was specified
Navigate Select: "Hey Google, kodi Select" --> Will select the hightlighted item
Navigate Context Menu: "Hey Google, kodi open context menu" --> Will open the context menu for the selected item
Navigate Go Home: "Hey Google, kodi go home" --> Will open the main menu page
"Hey Google, kodi show favourites"
"Hey Google, kodi show movies"
"Hey Google, kodi show movies by title"
"Hey Google, kodi show movies by genre"
"Hey Google, kodi show recently added movies"
"Hey Google, kodi show tv shows"
"Hey Google, kodi show tv shows by title"
"Hey Google, kodi show tv shows by genre"
"Hey Google, kodi show recently added episodes"
"Hey Google, kodi show video addons"
"Hey Google, kodi show music addons"
"Hey Google, kodi show video files"
"Hey Google, kodi show music files"
"Hey Google, kodi show the top 100 albums"
"Hey Google, kodi show system settings"
"Hey Google, kodi show file manager"
"Hey Google, kodi show new YouTube videos"
"Hey Google, kodi show YouTube watch later"
"Hey Google, kodi show YouTube history"
"Hey Google, kodi show YouTube recommendations"
"Hey Google, kodi show YouTube subscriptions"
"Hey Google, kodi show YouTube settings"
"Hey Google, kodi show Spotify" (Spotify Kodi-Addon required)
"Hey Google, kodi show Spotify featured playlists" (Spotify Kodi-Addon required)
There are many more windows to choose from, a full list can be found here.
"Hey Google, kodi Whats Playing" --> Will show whats playing information
"Hey Google, kodi subtitles on/off/previous/next" --> Will change subtitle settings
"Hey Google, kodi change subtitle to track 3" --> Will change subtitle track to a specific track
"Hey Google, kodi audiostream previous/next" --> Will change audiostream settings
"Hey Google, kodi change audiostream to track 3" --> Will change audiostream settings
"Hey Google, kodi go forward 30 minutes" --> will seek forward [the requested number] of minutes or just 1 minute if no number was specified
"Hey Google, kodi go backward 30 minutes" --> same as above just seeking backward
"Hey Google, kodi jump to 30 minutes"
"Hey Google, kodi play the song [song name]" --> will search for the given song name and play it.
"Hey Google, kodi play the album [album name]" --> will search for the given album name and play it.
"Hey Google, kodi play songs by the artist [music artist name]" --> will search for the given music artist name and play it.
"Hey Google, kodi play some [genre name] music" --> will play shuffled songs of that genre.
"Hey Google, kodi toggle party mode" --> starts the kodi party mode.
"Hey Google, kodi play playlist [playlistname]" --> This will look for a playlist with that name and play it. Smart and regular playlist supported.
"Hey Google, kodi playlist previous/next/[list item number]" --> This will go forward/backward or select an item on the currently playing playlist #.
Disclaimer: Use on your own risk and choose complex username & password in the below steps.
We currently support three methods of how this app can be hosted.
1. Hosting it in Glitch, a 3rd-party web-hosting service (No longer usable)
The first method is very easy to set up and to maintain and also free of charge. The second method is for advanced users. You have to setup and maintain the nodejs environment yourself. But it supports multiple Kodi instances, greatly reduces latency and does not expose your kodi-webservice to the internet directly. The third method is also for advanced users. After installing docker, you can simply run our app as a production ready docker container. This is the recommended method for LibreELEC users.
There are two ways of implementing the scenario of multiple kodi instances (i.e one in the living room and another in the bedroom). For both methods you will need two IFTTT-Applets with different phrases, due to the text-parameter limitation of IFTTT.
living room kodi play...
could target https://mylivingroom.glitch.com/playpause
bedroom kodi play...
could target https://bedroom.glitch.com/playpause
.
living room kodi play...
could target http://192.168.100.1:8080/playpause
bedroom kodi play...
could target http://192.168.100.2:8080/playpause
).Kodi play movie $
ok playing $ movie
For That choose: Maker Webhooks
_YOUR_NODESERVER/playmovie?q={{TextField}}
For example, if your node server address is 'green-icecream.glitch.me', your should enter:
https\://green-icecream.glitch.me/playmovie?q={{TextField}}
{"token":"YOUR_CONNECTION_PASSWORD"}
Check out this example to make sure your settings are correct
Now every time you say "Hey Google, Kodi play movie bla bla", it should play bla bla on your kodi.
Note: If your external IP changes, this will stop working (consider getting a static IP address)
Tip: If you don't want define action for every phrase separatelly, you can use Phrase broker
For Tv show support - Next unwatched episode, follow all the steps in D, except these changes:
_YOUR_NODESERVER/playtvshow?q={{TextField}}
For Tv show support - Specific episode, follow all the steps in D, except these changes:
Choose a different phrase (e.g. "Kodi play $ episode #").
For this to work, when you talk to your GoogleHome, the $ part must be in the format of "[TV_SHOW_NAME] season [SEASON_NUMBER]". Meaning the word "Season" has to be said, the tv show name must be said before it and the season number must be said after it (i.e. "okay google kodi play bla season 4 episode 1")
_YOUR_NODESERVER/playepisode?q={{TextField}}&e={{NumberField}}
To pause or resume kodi follow the instructions in D, except these changes:
_YOUR_NODESERVER/playpause
To Stop kodi, follow the same instructions as pause but use this URL:
_YOUR_NODESERVER/stop
To Mute kodi, follow the same instructions as pause but use this URL:
_YOUR_NODESERVER/mute
To Set Volume on kodi use "Say a phrase with a number" and the URL:
_YOUR_NODESERVER/volume?q={{NumberField}}
To Seek forward by x minutes use "Say a phrase with a number" and the URL:
_YOUR_NODESERVER/seekforwardminutes?q={{NumberField}}
For PVR TV/radio support - Set channel by name, follow all the steps in D, except these changes:
_YOUR_NODESERVER/playtvchannelbyname?q={{TextField}} _YOUR_NODESERVER/playradiochannelbyname?q={{TextField}}
For PVR TV/radio support - Set channel by number, use "Say a phrase with a number" and the URL:
_YOUR_NODESERVER/playtvchannelbynumber?q={{NumberField}} _YOUR_NODESERVER/playradiochannelbynumber?q={{NumberField}}
Instead of defining each phrase separately on IFTTT, you can use built-in phrase broker, which will parse phrase on node server. It uses regular expression for matching phrases, so it is more powerful than IFTTT's $ and #. For setup phrase broker you need to define on IFTTT one single action (for example "Kodi $") and direct that action to the broker URL:
_YOUR_NODESERVER/broker?phrase={{TextField}}
If you want to use other language than english, just lang parameter to that URL:
_YOUR_NODESERVER/broker?phrase={{TextField}}&lang=
where
If there is not your language in broker folder yet, it is easy to add a new language. Just copy en.json and name it with your language's code. Then edit that new file and change language text in second column to your language. You can also create your variant of default language, just copy required json file, name it with your name (f.e. "en.json" -> "en_my.json") and change texts on your own. Don't forget to set new language code in your action (so for our example it would be "_YOUR_NODESERVER/broker?phrase={{TextField}}&lang=en_my"). Format of one lanuage's json file record is simple:
"<HelperHandlerName>": "<regular expression to match and extract parameters>"
For more variants of single handler just use suffix ":<whatever_unique>", so in case of second variant of kodiPlayMovie handler it would be "kodiPlayMovie:1", for third "kodiPlayMovie:2" and so on. Don't forget, that records on the top of file have greater priority than on the bottom. If broker finds match on the top, it does not continue to the bottom.
Type of phrase | phrase | url | |
---|---|---|---|
Say a phrase with a text ingredient | Kodi play $ | _YOUR_NODESERVER/playmovie?q={{TextField}} *delay | |
Say a phrase with a text ingredient | Kodi resume $ | _YOUR_NODESERVER/resumemovie?q={{TextField}} *delay | |
Say a simple phrase | Kodi play file | _YOUR_NODESERVER/playfile?q=path/to/file *delay | |
Say a phrase with a text ingredient | Kodi play a random [$] movie [of year #] | _YOUR_NODESERVER/playrandommovie?genre={{TextField}}&year={{NumberField}} *delay | |
Say a phrase with a text ingredient | Kodi play an episode of $ | _YOUR_NODESERVER/playtvshow?q={{TextField}} *delay | |
Say a phrase with a text ingredient | Kodi resume an episode of $ | _YOUR_NODESERVER/resumetvshow?q={{TextField}} *delay | |
Say a phrase with a text ingredient | Kodi binge watch $ | _YOUR_NODESERVER/bingewatchtvshow?q={{TextField}} | |
Say a phrase with both a number and a text ingredient | Kodi play $ episode # | _YOUR_NODESERVER/playepisode?q={{TextField}}&e= {{NumberField}} | |
Say a simple phrase | Kodi play new episode | _YOUR_NODESERVER/playrecentepisode | |
Say a simple phrase | Kodi pause | _YOUR_NODESERVER/playpause | |
Say a simple phrase | Kodi unpause | _YOUR_NODESERVER/playpause | |
Say a simple phrase | Kodi stop | _YOUR_NODESERVER/stop | |
Say a simple phrase | Kodi mute | _YOUR_NODESERVER/mute | |
Say a simple phrase | Kodi unmute | _YOUR_NODESERVER/mute | |
Say a phrase with a number | Kodi set volume # | _YOUR_NODESERVER/volume?q={{NumberField}} | |
Say a phrase with a number Say a simple phrase |
Kodi volume up by # Kodi volume up |
_YOUR_NODESERVER/volumeup?q={{NumberField}} _YOUR_NODESERVER/volumeup |
|
Say a phrase with a number Say a simple phrase |
Kodi volume down by # Kodi volume down |
_YOUR_NODESERVER/volumedown?q={{NumberField}} _YOUR_NODESERVER/volumedown |
|
Say a phrase with a text ingredient | Kodi switch to $ channel | _YOUR_NODESERVER/playtvchannelbyname?q={{TextField}} | |
Say a phrase with a number | Kodi switch to channel number # | _YOUR_NODESERVER/playtvchannelbynumber?q={{NumberField}} | |
Say a phrase with a text ingredient | Kodi switch to $ radio channel | _YOUR_NODESERVER/playradiochannelbyname?q={{TextField}} | |
Say a phrase with a number | Kodi switch to radio channel number # | _YOUR_NODESERVER/playradiochannelbynumber?q={{NumberField}} | |
Say a simple phrase | Kodi activate | _YOUR_NODESERVER/activatetv | |
Say a simple phrase | Kodi standby | _YOUR_NODESERVER/standbytv | |
Say a simple phrase | Kodi shutdown | _YOUR_NODESERVER/shutdown | |
Say a simple phrase | Kodi hibernate | _YOUR_NODESERVER/hibernate | |
Say a simple phrase | Kodi reboot | _YOUR_NODESERVER/reboot | |
Say a simple phrase | Kodi suspend | _YOUR_NODESERVER/suspend | |
Say a phrase with a text ingredient | Kodi shuffle $ | _YOUR_NODESERVER/shuffleepisode?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi play youtube $ | _YOUR_NODESERVER/playyoutube?q={{TextField}}&max=15 | |
Say a phrase with a text ingredient | Kodi search youtube $ | _YOUR_NODESERVER/searchyoutube?q={{TextField}} | |
Say a simple phrase | Kodi scan library | _YOUR_NODESERVER/scanlibrary | |
Say a simple phrase | Kodi clean library | _YOUR_NODESERVER/cleanlibrary | |
Say a phrase with a number Say a simple phrase |
Kodi Navigate up # Kodi Navigate up |
_YOUR_NODESERVER/navup?q={{NumberField}} _YOUR_NODESERVER/navup |
|
Say a phrase with a number Say a simple phrase |
Kodi Navigate down # Kodi Navigate down |
_YOUR_NODESERVER/navdown?q={{NumberField}} _YOUR_NODESERVER/navdown |
|
Say a phrase with a number Say a simple phrase |
Kodi Navigate left # Kodi Navigate left |
_YOUR_NODESERVER/navleft?q={{NumberField}} _YOUR_NODESERVER/navleft |
|
Say a phrase with a number Say a simple phrase |
Kodi Navigate right # Kodi Navigate right |
_YOUR_NODESERVER/navright?q={{NumberField}} _YOUR_NODESERVER/navright |
|
Say a phrase with a number Say a simple phrase |
Kodi Navigate back # Kodi Navigate back |
_YOUR_NODESERVER/navback?q={{NumberField}} _YOUR_NODESERVER/navback |
|
Say a simple phrase | Kodi select | _YOUR_NODESERVER/navselect | |
Say a simple phrase | Kodi show context menu | _YOUR_NODESERVER/navcontextmenu | |
Say a simple phrase | Kodi go home | _YOUR_NODESERVER/navhome | |
Say a simple phrase | Kodi whats playing | _YOUR_NODESERVER/displayinfo | |
Say a phrase with a text ingredient | Kodi show $ | _YOUR_NODESERVER/showWindow?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi show movie genre $ | _YOUR_NODESERVER/showMovieGenre?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi execute addon $ | _YOUR_NODESERVER/executeAddon?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi subtitles $ | _YOUR_NODESERVER/setsubtitles?q={{TextField}} | |
Say a phrase with a number | Kodi subtitles direct select # | _YOUR_NODESERVER/setsubtitlesdirect?q={{NumberField}} | |
Say a phrase with a text ingredient | Kodi audio stream $ | _YOUR_NODESERVER/setaudio?q={{TextField}} | |
Say a phrase with a number | Kodi audio stream direct select # | _YOUR_NODESERVER/setaudiodirect?q={{NumberField}} | |
Say a phrase with a number Say a simple phrase |
Kodi seek forward # minutes Kodi seek forward |
_YOUR_NODESERVER/seekforwardminutes?q={{NumberField}} _YOUR_NODESERVER/seekforwardminutes |
|
Say a phrase with both a number and a text ingredient | Kodi seek forward $ hour and # minutes | _YOUR_NODESERVER/seekforwardminutes?q={{NumberField}}&hours={{TextField}} | |
Say a phrase with a number Say a simple phrase |
Kodi seek backward # minutes Kodi seek backward |
_YOUR_NODESERVER/seekbackwardminutes?q={{NumberField}} _YOUR_NODESERVER/seekbackwardminutes |
|
Say a phrase with both a number and a text ingredient | Kodi seek backward $ hour and # minutes | _YOUR_NODESERVER/seekbackwardminutes?q={{NumberField}}&hours={{TextField}} | |
Say a phrase with a number | Kodi seek to # minutes | _YOUR_NODESERVER/seektominutes?q={{NumberField}} | |
Say a phrase with a text ingredient | Kodi play the song $ | _YOUR_NODESERVER/playsong?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi play the album $ | _YOUR_NODESERVER/playalbum?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi shuffle the album $ | _YOUR_NODESERVER/shufflealbum?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi play the artist $ | _YOUR_NODESERVER/playartist?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi play the music genre $ | _YOUR_NODESERVER/playgenre?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi play playlist $ | _YOUR_NODESERVER/playplaylist?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi playlist $ | _YOUR_NODESERVER/playercontrol?q={{TextField}} | |
Say a simple phrase | Kodi toggle party mode | _YOUR_NODESERVER/togglePartymode | |
Say a phrase with a text ingredient | Kodi open $ from my favourites | _YOUR_NODESERVER/playfavourite?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi open $ from my tvshows | _YOUR_NODESERVER/opentvshow?q={{TextField}} | |
Say a phrase with a text ingredient | Kodi open $ from my movies | _YOUR_NODESERVER/openmovie?q={{TextField}} | |
Say a simple phrase | Kodi toggle fullscreen | _YOUR_NODESERVER/togglefullscreen | |
Say a phrase with a text ingredient | Kodi load profile $ | _YOUR_NODESERVER/loadProfile | |
Say a simple phrase | Kodi play tagesschau | _YOUR_NODESERVER/tagesschau/playTodaysBroadcast | |
Say a phrase with a text ingredient | Kodi play $ of directory | _YOUR_NODESERVER/playItemOfDirectory?directory=%2Fstorage%2Fkaraoke%2F&q={{TextField} |
To Start/resume a movie/tv episode with a delay The commands marked with *delay (above) take an optional delay parameter to delay startup of the media by the specified number of seconds.
For example:
YOUR_NODESERVER/playmovie?q=Deadpool&delay=10
To Turn on/off the TV and switch Kodi's HDMI input
Finally you can use this in 2 ways:
Turn on: Add another command: follow the same instructions as pause but use this URL:
_YOUR_NODESERVER/activatetv
If host your server on Glitch, add the following line to your .env file (see step B.1 - (5) above) and kodi will automaticly turn on the tv and switch the HDMI input everytime your trigger the main playing actions (play a move / tv show / episode / pvr channel)
ACTIVATE_TV="true"
If you host your server yourself (see step B.2 - (7) above), then add the following line at the end of your kodi-hosts.config.js file instead
process.env['ACTIVATE_TV'] = 'true';
Turn off: Add another command: follow the same instructions as pause but use this URL:
_YOUR_NODESERVER/standbytv
When testing language files present in test/broker/<lang_code>.json,
you can define a config
key used when handling the request.
The config key can be defined for the entire endpoint :
{
"endpoint": "kodiPlayTvChannelByName",
"phrases": [
// config is inherited from endpoint
{ "phrase": "change la télé sur m6", "q": "m6" },
],
"config": {
"brokerAccentInsensitiveMatch": true
"brokerLanguageCacheEnable": false
}
}
The config key can also be defined for a given phrase and take precedence on endpoint config :
{
"endpoint": "kodiPlayTvChannelByName",
"phrases": [
// config from phrase overrides endpoint config
{ "phrase": "change la télé sur m6", "q": "m6", "config": { "brokerAccentInsensitiveMatch": false },
],
"config": {
"brokerAccentInsensitiveMatch": true
"brokerLanguageCacheEnable": false
}
}
If your can't preform a simple action like pausing a video, try to narrow down to problem. Execute the following tests in their listed order! Since early errors can make all following tests fail.
Try getting your current kodi volume by entering this in your browser:
http://YOUR_INTERNAL_KODI_IP:PORT/jsonrpc?request={"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume"]},"id":1}
For hosting-scenario B.1 only Try getting your current kodi volume by entering this in your browser with your external IP:
Note: This test is only meaningful, if done from outside of your home network!
(i.e. Smartphone with disabled Wifi!)
http://YOUR_EXTERNAL_IP:PORT/jsonrpc?request={"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume"]},"id":1}
For hosting-scenarios B.2 & B.3 only Open the following URL in your browser on your local home network:
http://YOUR_INTERNAL_NODE_IP:8099/
Open the YOUR_NODE_SERVER Url in a browser.
Note: This test is only meaningful, if done from outside of your home network!
(i.e. Smartphone with disabled Wifi!)
i.e. http://omertu.selfhost.me:8099/
Open the YOUR_NODE_SERVER Url in a browser and provide the token (aka YOUR_CONNECTION_PASSWORD).
i.e. http://omertu.selfhost.me:8099/
Ensure /koditestconnection
is set as the route to test.
Click Execute!
If all tests were successful so far, the problem is probably the configuration of the IFTTT-Applet itself.
json
POST
"
(iphones tend to mess them up, use a PC then) Whaat? How did you manage to pass all previous tests and yet still have trouble?
Go to github, open an issue and explain yourself!
Thanks for everyone who contributed to this projects: p0psicles, keydon, Keljian and Lunatixz
I also used some code from these 3 projects: MarvinSchenkel/HomeyKodi Jephuff/kodi-rpc joshjowen/script.json-cec
And this wonderful website makes setting this up super easy - Glitch
I hope you find this helpful! If you'd like, you can give me a cup of coffee :)