Skip to main content

iRidi skill for Google Home

voice control of equipment through Google Home and iRidi

Documentation updated 01.01.2024

Google Assistent is Google's voice assistant, built into the Google Home voice-control speaker and other devices such as:

  • Google Home Mini;
  • Google Home Max;
  • Harman JBL Link 10;
  • Harman JBL Link 20;
  • Harman JBL Link 300;
  • Harman JBL Link 500;
  • and others.

With the "iRidium" skill, Google Assistant can control a smart home through iRidi cloud and an iRidi server. Say "Turn on the light" and the light comes on. Say "Turn off the light" and it goes off. It is that simple!

GHome_scheme11.png

Supported devices:

  • dimmers and switches;
  • door locks;
  • entertainment devices such as smart TVs;
  • smart home cameras;
  • thermostats and fans;
  • microwave ovens;
  • and much more.

Working in iRidi Pro​

Adding the driver and devices​

  1. Create a server project;

  2. Add the Google Home Network driver to the project;

GoogleHome1.png

  1. Add smart devices;

GoogleHome2.png

  1. Rename the devices to make them easy to control.

Device feedbacks must not be renamed because they have strictly defined meanings.

GoogleHome3.png

Device and feedback channel descriptions​

Google Home devices are not physical devices; they are only an interface between physical devices and the assistant. You must implement their functionality in iRidi server or link them to the corresponding physical devices using an appropriate protocol. iRidi provides an interface with three device types:

  • Switch
  • Dimmer
  • HVAC

This does not limit your ability to work with other devices. For example, you can control a relay using a binary Switch device.

Note

You do not need to use every device feedback channel; use only the ones you need.

Switch​

Example applications:

  • switch;
  • light;
  • relay.
FeedbackDescriptionActionsExample voice commands
PowerOn/off statusturnOn
turnOff

Curtain​

Example applications:

  • motorized curtains and blinds.
FeedbackDescriptionActionsExample voice commands
Open PercentOpening percentageOpen
Close
setPercentage
"OK, Google, open the device name"
"OK, Google, close the device name"
"OK, Google, open the device name to 10%"
Open DirectionOpening directionsetDirection:
LEFT
RIGHT
UP
DOWN
IN
OUT
"OK, Google, open the device name left"
"OK, Google, open the device name right"
"OK, Google, open the device name up"
"OK, Google, open the device name down"

Dimmer​

Example applications:

  • single-channel dimmer;
  • electric underfloor heating.
FeedbackDescriptionActionsExample voice commands
PowerOn/off statusturnOn
turnOff
"OK, Google, turn on device name"
"OK, Google, turn off device name"
LevelPercentagesetPercentage
incrementPercentage
decrementPercentage
"OK, Google, set device name to hundred percents"
"OK, Google, increase device name by five percents"
"OK, Google, decrease device name by two percents"

HVAC​

Example applications:

  • thermostat;
  • air conditioner;
  • fan;
  • electric underfloor heating.
FeedbackDescriptionActionsExample voice commands
PowerOn/off statusturnOn
turnOff
"OK, Google, turn on device name"
"OK, Google, turn off device name"
LevelPercentage setpointsetPercentage
incrementPercentage
decrementPercentage
"OK, Google, set device name to fifty percent"
"OK, Google, increase device name by five percents"
"OK, Google, decrease device name by two percents"
TargetTemperatureTarget temperaturesetTargetTemperature
incrementTargetTemperature
decrementTargetTemperature
getTargetTemperature
"OK, Google, set device name to thirty degrees"
"OK, Google, increase device name by five degrees"
"OK, Google, reduce device name by two degrees"
"OK, Google, make it warmer in here"
"OK, Google, make it cooler in here"
"OK, Google, what is device name target temperature?"
SensorTemperatureTemperature from the sensorgetTemperatureReading
getTargetTemperature
"OK, Google, what device name temperature?"
CoolTargetTemperatureUpper temperature setpointgetTemperatureReading
getTargetTemperature
"OK, Google, what temperature is my device name set to?"
HeatTargetTemperatureLower temperature setpoint
TemperatureModeWork modeThermostatMode"OK, Google, set device name heating"

TemperatureMode can take the following values:

  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_AUTO;
  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_COOLING,
  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_DRY,
  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_FAN,
  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_HEATING,
  • IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_OFF.

Use these constants to set the thermostat operating mode through a script.

Creating a script​

The script receives voice commands from the Assistant and forwards them to physical devices. This example uses devices on a Modbus TCP network.

  1. Open the script editor by clicking JS .

  2. Select +, then select New Script .

  3. Add the following script.


var Google = IR.GetDevice("Google Home Network");
var Modbus = IR.GetDevice("Modbus TCP");
IR.AddListener(IR.EVENT_START,0,function() {
Google.SetFeedback("Thermostat:TemperatureMode", IR.SUB_DEVICE_STATE_CLIMATE_TEMP_MODE_COOLING);
Google.SetFeedback("Thermostat:HeatTargetTemperature", 30);
Google.SetFeedback("Thermostat:CoolTargetTemperature", 28);
Google.SetFeedback("Thermostat:SensorTemperature", 24);
IR.AddListener(IR.EVENT_TAG_CHANGE, Google, function(name, value) {
switch (name) {
case "Switch:Power":
Modbus.Set("Light", value);
break;
case "Dimmer:Power":
Modbus.Set("Dimmer_ON", value);
break;
case "Dimmer:Level":
Modbus.Set("Dimmer_Brightness", value);
break;
}
IR.Log("GOOGLE! Device tag: " + name + " , value: " + value);
});
});

Uploading the project to iRidi Cloud and the server.​

  1. Sign in on the iRidi website.

  2. Upload the .sirpz project file to iRidi cloud.

add_project.png

  1. Start iRidi Server.

  2. Open the server web interface by entering the following in the browser address bar:

<server IP address>:8888

(If iRidi server runs on the same computer where it is being configured, enter: 127.0.0.1:8888)

  1. Enter the default access password 2007. Click "LOGIN".

Login_server.png

  1. Open Cloud / Projects .

cloud_projects.png

  1. Download the project from the cloud to the server by clicking "CLOUD SYNC", then "Download" next to the required project.

cloud_sync.png

Note
  • The Assistant works only through iRidi cloud, so it cannot work if the project is uploaded to the server through iRidi transfer.

Configuring Google Home​

Registering the smart speaker​

Configure Google Home using the Google Home App application on smartphones or tablets.

Note
  • In either case, the device needs Wi-Fi to connect directly to the smart speaker.
  1. Register on the Google website if you do not already have an account.

  2. On your mobile device, download and install the Google Home App and Google Assistant App .

  3. The application automatically scans the network and detects the available device.

Operating systems supported by Google Home App:

  • Android 6.0 and later;
  • iOS 10 and later.
Note

Make sure Google Home App and Google Assistant App are available to download from Google Play and the App Store in your region.

barsik_in_gass.png

Enabling the skill​

The skill is installed only in the Google Assistant App .

  1. Open the app. Tap the explore button in the upper-right corner.

GAss_main1.png

  1. Tap the menu button in the upper-right corner.

GAss_menu1.png

  1. Select "Settings" from the menu.

GAss_settings.png

  1. In the Assistant settings, select "Home control".

GAss_home_control.png

  1. In the window that opens, tap the add devices button.

GAss_add_device.png

  1. Select "i3 Control" from the list.

GAss_add_i3control.png

  1. You will be taken to the registration form on the iRidi mobile website. Enter your integrator account credentials and tap Login .

Sign_in_iRidium.png

  1. Select the site that Google Home will work with from the drop-down list. Tap Grant Access .

Grant_access.png

  1. Google Assistant has connected to the iRidi site successfully. All devices from the project now appear in Google Assistant.

GAss_added_devices.png

You can assign them to rooms.

Device_details.png

GAss_Rooms.png

The devices are now also available in the Google Home app and can be used.

GHome_main.png

GHome_main01.png

After changing the project, remember to upload it to iRidi cloud and then update it in iRidi server.

Testing the project​

You can run the server project on the same computer used for iRidi Studio. However, upload the project only through iRidi cloud.

Speak voice commands to the Google Home speaker. The Assistant passes the commands to iRidi server, which executes them according to the script.