Эта страница является
переводом страницы
Google Home. Перевод выполнен на 100%.
iRidium skill for Google Home
voice control of equipment via Google Home and iRidium
documentation was last updated on 30.10.2023
Google Assistant is a voice assistant from Google, built in the Google Home, loud 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.
Google Assistant can control smart home with the help of "iRidium" skill via iRidium cloud and iRidium server. You can say "Turn on light" and the lamp is turned on. You can say "Turn off light" and the lamp is turned off. It's easy!
Supported devices
- dimmers and switches
- door locks;
- entertainment devices, e.g.: smart TV-sets
- smart home cameras
- thermostats and fans
- micro-wave ovens
- and others.
Working in iRidium Pro
Adding a Driver and Devices
1Create a server project.
2Add Google Home Network driver to the project;
3Add smart devices
4Rename devices for more convenient use.
Feedback channels of devices can't be renamed.
Describing Devices and Feedback Channels
Google Home devices are not real devices they are just interfaces between real devices and Google Assistant. You are to realize functions of these devices in iRidium server or provide connection with physical devices via a protocol. iRidium provides interfaces with 3 types of devices:
But you can work with other devices, as well. For example, you can realize control of a relay using a binary device of the Switch type.
You do not have to use all feedback channels of devices, use only those that are required.
Switch
Examples of use
| Feedback |
Description |
Actions |
Examples of voice commands
|
| Power |
On/Off state |
turnOn turnOff |
"OK, Google, turn on device name" "OK, Google, turn off device name"
|
Curtain
Examples of use:
- curtains and blinds with electric drive.
| Feedback |
Description |
Action |
Examples of voice commands
|
| Open Percent |
Percent of opening |
Open Close setPercentage |
"OK, Google, open the device name", "OK, Google, close the device name", "OK, Google, open the device name to 10%"
|
| Open Direction |
Opening direction |
setDirection: 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
Examples of use
- one-channel dimmer
- electric warm floor
| Feedback |
Description |
Actions |
Examples of voice commands
|
| Power |
On/Off state |
turnOn turnOff |
"OK, Google, turn on device name" "OK, Google, turn off device name"
|
| Level |
Per cent |
setPercentage 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
Examples of use
- thermostat;
- conditioner;
- fan;
- electric warm floor
| Feedback |
Description |
Actions |
Examples of voice commands
|
| Power |
On/Off state |
turnOn turnOff |
"OK, Google, turn on device name" "OK, Google, turn off device name"
|
| Level |
Set value in per cent |
setPercentage 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"
|
| TargetTemperature |
Set temperature in degrees |
setTargetTemperature 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?"
|
| SensorTemperature |
Temperature from a sensor |
getTemperatureReading getTargetTemperature |
"OK, Google, what device name temperature?"
|
| CoolTargetTemperature |
The upper limit of temperature |
getTemperatureReading getTargetTemperature |
"OK, Google, what temperature is my device name set to?"
|
| HeatTargetTemperature |
The lower limit of temperature
|
| TemperatureMode |
Mode of work |
ThermostatMode |
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 select the mode of work for a thermostat with the help of script.
Creating Script
The script provides accepting voice commands from Google Assistant and sends them to real devices. This examples features devices in the Modbus TCP network.
1 Go to the script editor by clicking JS.
2 Click +, 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 a Project to iRidium cloud and on the Server
1Sign in at iRidium mobile web-site.
2Upload .sirpz project file to iRidium cloud.
3Start iRidium server
4Enter the server web-interface by entering the following in the browser address line:
<IP-адрес сервера>:8888
If iRidium server is launched on the same PC where it is set, enter the following:
127.0.0.1:8888)
5Enter the password by default - 2007. Click "LOGIN".
6Find Cloud / Projects tab
7Download the project from the cloud by clicking the "CLOUD SYNC" button and then click the "Download" button next to the name of a required project.
Google Assistant works only via iRidium clous, that's why it can't work if a project is uploaded to the server via iRidium Transfer
Setting Google Home
Registering the Smart Speaker
Google Home is set with the help of Google Home App on smart phones or tablets.
In any case you need Wi-Fi for direct connection with the smart speaker.
1Register at Google web-site if you do not have an account yet.
2Download and install Google Home App and Google Assistant App on a mobile device.
3The app scans the net automatically and finds an available device.
Google Home App can work on the following operation systems:
- Android 6.0 and later;
- iOS 10 and later.
Make sure that Google Home App and Google Assistant App are available for download from Google Play and App Store in your region.
Setting the skill
The skill is installed only in Google Assistant App.
1Start the app and press the review button in the top right corner.
2Press the menu button in the top right corner
3Select "Settings"
4Select "Home automation" paramter in the settings.
5Press a button to add a device in the window that appears.
6Select “i3 Control” from the list.
7You'll get to the registration form on iRidium mobile web-site. Enter the login and password of your integrator account and press Login.
8Select the object which Google home will work with in the drop down menu. Press Grant Access.
9Google Assistant is successfully connected to iRidium object. All project devices will appear in Google Assistant.
They can be placed in different rooms
Devices are now available in Google Home app and they can be used there.
If you correct a project remember to upload it to iRidium cloud and then update it in iRidium server.
Testing a project
A server project can be launched on the same PC where you work in iRidium studio using. But a project has to be uploaded only via iRidium cloud.
Say voice commands to Google Home and the Assistant sends them to iRidium server and the server executes them according to the script.