RainMaker App and Third-Party Integrations

In Section 9.4.6, we have completed the device provisioning and user-node mapping, enabling control of a smart light through the app. As a result, the smart light icon and UI interface are now displayed on the app's homepage. The standard parameters, devices, and UIs mentioned earlier are defined by ESP RainMaker and form the basis of its standard framework. By using this framework, the app can accurately manage each device's parameters and supported services. These standard items, which are listed in the tables below, are also applicable to third-party platforms.

Standard UI device types

Table 9.5. Standard UI device types

Switchesp.device.switchName, Power*SWITCHSWITCHswitch
Lightbulbesp.device.lightbulbName, Power*, Brightness, Color Temperature, Hue, Saturation, IntensityLIGHTLIGHTlight
Lightesp.device.lightName, Power*, Brightness, Color Temperature, Hue, Saturation, IntensityLIGHTLIGHT–
Fanesp.device.fanName, Power*, Speed, DirectionFANFANfan
Temperature Sensoresp.device.temperature-sensorName, Temperature*–TEMPERATURE_SENSORtemp
Outletesp.device.outletName, PowerOUTLETSMARTPLUGoutlet
Plugesp.device.plugName, PowerOUTLETSMARTPLUG–
Socketesp.device.socketName, PowerOUTLETSMARTPLUG–
Lockesp.device.lockName, Lock StateLOCKSMARTLOCKlock
Internal Blindsesp.device.blinds-internalNameBLINDSINTERIOR_BLIND–
External Blindsesp.device.blinds-externaNameBLINDSEXTERIOR_BLIND–
Garage Dooresp.device.garage-doorNameGARAGEGARAGE_DOOR–
Garage Lockesp.device.garage-door-lockNameGARAGESMARTLOCK–
Air Conditioneresp.device.air-conditionerNameAC_UNITAIR_CONDITIONER–

Standard UI types

The standard UI type added to a parameter is displayed as the corresponding UI shown in Table 9.6 in the ESP RainMaker app.

Table 9.6. Standard UI types

NameTypeData TypesRequirementsSample
Text (Default)esp.ui.textAllN/Atext
Toggle Switchesp.ui.toggleboolN/Atoggle
Slideresp.ui.sliderint, floatBounds (min, max)slider
Brightness Slideresp.ui.sliderintParam type = esp.param.brightnessbright
CCT Slideresp.ui.sliderintParam type = esp.param.cctcct
Saturation Slideresp.ui.sliderintParam type = esp.param.saturationsaturation
Hue Slideresp.ui.hue-sliderintParam type = esp.param.huehue
Hue Circleesp.ui.hue-circleintParam type = esp.param.hue
Push button (Big)
Dropdownesp.ui.dropdownint/stringBounds (min/max) for IntValid strs for Stringdropdown
Trigger (Android only)esp.ui.triggerboolN/Atrigger
Hidden (Android only)esp.ui.hiddenboolN/A
Param will be hidden

Standard parameter types

They are mapped to the parameters of corresponding names and UIs in the Alexa and Google Home apps.

Table 9.7. Standard parameter types

NameTypeData TypesUI TypePropertiesMin, Max, Step
Poweresp.param.powerboolesp.ui.toggleRead, WriteN/A
Brightnessesp.param.brightnessintesp.ui.sliderRead, Write0, 100, 1
CCTesp.param.cctintesp.ui.sliderRead, Write
2700, 6500, 100
Hueesp.param.hueintesp.ui.sliderRead, Write0, 360, 1
Saturationesp.param.saturationintesp.ui.sliderRead, Write0, 100, 1
Intensityesp.param.intensityintesp.ui.sliderRead, Write0, 100, 1
Speedesp.param.speedintesp.ui.sliderRead, Write0, 5, 1
Directionesp.param.directionintesp.ui.dropdownRead, Write0, 1, 1
OTA URLesp.param.ota_urlstringN/AWriteN/A
OTA Statusesp.param.ota_statusstringN/AReadN/A
OTA Infoesp.param.ota_infostringN/AReadN/A
Timezoneesp.param.tzstringN/ARead, WriteN/A
Timezone POSIXesp.param.tz_posixstringN/ARead, WriteN/A
Read, Write, Persist
Rebootesp.param.rebootboolN/ARead, WriteN/A
Factory-Resetesp.param.factory-resetboolN/ARead, WriteN/A
Wi-Fi-Resetesp.param.wifi-resetboolN/ARead, WriteN/A
Toggle Controlleresp.param.toggleboolAny type applicableRead, WriteN/A
Range Controlleresp.param.rangeint/floatAny type applicableRead, WriteApp Specific
Mode Controlleresp.param.modestringesp.ui.dropdownRead, WriteN/A
Setpoint Temperatureesp.param.setpoint-temperatureint/floatAny type applicableRead/WriteN/A
Lock Stateesp.param.lockstateboolAny type applicableRead/WriteN/A
Blinds Positionesp.param.blinds-positionintesp.ui.sliderRead/Write0, 100, 1
Garage Positionesp.param.garage-positionintesp.ui.sliderRead/Write0, 100, 1
Light Modeesp.param.light-modeintesp.ui.dropdown/ esp.ui.hiddenRead/Write0, 2, 1
AC Modeesp.paran.ac-modestringesp.ui.dropdownRead/WriteN/A

Standard service types

They are only used to quickly create services in the ESP RainMaker SDK.

Table 9.8. Standard service types

OTAesp.service.otaOTA URL, OTA Status, OTA Info
Timeesp.service.timeTZ, TZ-POSIX
Systemesp.service.systemReboot, Factory-Reset, Wi-Fi-Reset

On the Skill page of Alexa or the Google Service Compatibility page of Google Home, sync your ESP RainMaker devices. Link to your ESP RainMaker account. Then, you can use the two apps to control the devices and use voice commands to operate them.

Figure 9.14 displays the ESP RainMaker devices in Alexa. They can be controlled using voice commands such as "Alexa, please turn on the light".


Learn more about Alexa Skill at https://www.amazon.com/Espressif-Systems-ESP-RainMaker/dp/B0881W7RPV/.

Figure 9.14.ESP RainMaker devices in Alexa

Figure 9.15 displays the ESP RainMaker devices in the Google Home. They can be controlled using voice commands such as "Hey Google, please turn off the light".

Figure 9.15.ESP RainMaker devices in Google Home

ESP RainMaker builds an intermediate layer in the cloud backend. This layer maps the standard parameter types and device types that are built into firmware to the formats that Alexa Skill and Google Assistant can understand. Therefore, device types in ESP RainMaker, such as smart lights and switches, are mapped to similar device types in Alexa Skill and Google Assistant, and their parameters, such as switch, brightness, and color, are mapped to corresponding capabilities and traits. If you only set brightness, you will get a smart light with adjustable brightness in Alexa and Google Home. If you also include color and CCT, you can adjust its color and color temperature.