how can i get the google home to show thermostat controls? i saw another post with a very similar problem to mine (https://esp32.com/viewtopic.php?f=41&p=107275) but still couldnt figure it out..
ive attached a screenshot of what the google home shows. everything works as it should on the ESP rainmaker app.. heres the relevant code:
void Rainmaker::setup() {
// Configure the input GPIOs
pinMode(gpio_reset, INPUT);
//------------------------------------------- Declaring Node -----------------------------------------------------//
Node my_node;
my_node = RMaker.initNode("AC Node");
isUsingIntFanSpeed = true;
/* Create the device */
const esp_rmaker_device_t* acDevice = ac.getDeviceHandle();
/* Create the power switch parameter */
esp_rmaker_param_t* powerParam = esp_rmaker_param_create(POWER_PARAM_NAME, ESP_RMAKER_PARAM_POWER, value(false), PROP_FLAG_READ | PROP_FLAG_WRITE);
esp_rmaker_param_add_ui_type(powerParam, ESP_RMAKER_UI_TOGGLE);
esp_rmaker_device_add_param(acDevice, powerParam);
/* Create the setpoint temperature parameter */
esp_rmaker_param_t* setTempParam = esp_rmaker_param_create(SET_TEMP_PARAM_NAME, ESP_RMAKER_PARAM_RANGE, value(25), PROP_FLAG_READ | PROP_FLAG_WRITE);
esp_rmaker_param_add_ui_type(setTempParam, ESP_RMAKER_UI_SLIDER);
esp_rmaker_param_add_bounds(setTempParam, value(16), value(30), value(1));
esp_rmaker_device_add_param(acDevice, setTempParam);
esp_rmaker_param_t* tempValParam = esp_rmaker_param_create(TEMP_VAL_PARAM_NAME, ESP_RMAKER_PARAM_TEMPERATURE, value(25), PROP_FLAG_READ);
esp_rmaker_device_add_param(acDevice, tempValParam);
/* Create the fan speed parameter */
esp_rmaker_param_t* fanSpeedParam = esp_rmaker_param_create(FAN_PARAM_NAME, "esp.param.speed", value(0), PROP_FLAG_READ | PROP_FLAG_WRITE);
esp_rmaker_param_add_ui_type(fanSpeedParam, ESP_RMAKER_UI_SLIDER);
esp_rmaker_param_add_bounds(fanSpeedParam, value(0), value(5), value(1));
esp_rmaker_device_add_param(acDevice, fanSpeedParam);
/* Create the AC mode parameter */
esp_rmaker_param_t* acModeParam = esp_rmaker_param_create(MODE_PARAM_NAME, ESP_RMAKER_PARAM_AC_MODE, value(mode_values[0]), PROP_FLAG_READ | PROP_FLAG_WRITE);
esp_rmaker_param_add_ui_type(acModeParam, ESP_RMAKER_UI_DROPDOWN);
esp_rmaker_param_add_valid_str_list(acModeParam, mode_values, sizeof(mode_values) / sizeof(mode_values[0]));
//esp_rmaker_param_add_bounds(acModeParam, esp_rmaker_int(0), esp_rmaker_int(5), esp_rmaker_int(1));
esp_rmaker_device_add_param(acDevice, acModeParam);
/* Add the device to the Rainmaker Node */
ac.addCb(write_callback);
ac.assignPrimaryParam(setTempParam);
//ac.assignPrimaryParam(powerParam);
my_node.addDevice(ac);
// This is optional
RMaker.enableOTA(OTA_USING_PARAMS);
RMaker.enableTZService();
RMaker.enableSchedule();
Serial.printf("\nStarting ESP-RainMaker\n");
RMaker.start();
WiFi.onEvent(sysProvEvent);
#if CONFIG_IDF_TARGET_ESP32
WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name);
#else
WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name);
#endif
xSemaphoreGive(callbackSemaphore);
}
GVA thermostat
GVA thermostat
- Attachments
-
- WhatsApp Image 2023-07-19 at 12.05.30.jpeg (36.04 KiB) Viewed 4125 times
Re: GVA thermostat
To have Google Home display the thermostat controls, you need to set the parameter types appropriately.
To make sure Google Home recognize your device as a thermostat and shows the relevant controls, you should use the following parameter types for specific parameters:
Power Switch:
Parameter Type: ESP_RMAKER_PARAM_POWER
UI Type: ESP_RMAKER_UI_TOGGLE
Setpoint Temperature:
Parameter Type: ESP_RMAKER_PARAM_RANGE
UI Type: ESP_RMAKER_UI_SLIDER
Temperature Value (Read-only):
Parameter Type: ESP_RMAKER_PARAM_TEMPERATURE
Fan Speed:
Parameter Type: "esp.param.speed" (You need to replace "esp.param.speed" with a proper parameter type recognized by Google Home for fan speed control).
UI Type: ESP_RMAKER_UI_SLIDER
AC Mode:
Parameter Type: ESP_RMAKER_PARAM_AC_MODE
UI Type: ESP_RMAKER_UI_DROPDOWN
Ensure that the parameter types and UI types are set as mentioned above for the respective parameters.
Additionally, make sure your device is properly linked to your Google Home account using the Google Home app. After linking, Google Home should automatically recognize the device and its capabilities based on the defined parameters and UI types.
To make sure Google Home recognize your device as a thermostat and shows the relevant controls, you should use the following parameter types for specific parameters:
Power Switch:
Parameter Type: ESP_RMAKER_PARAM_POWER
UI Type: ESP_RMAKER_UI_TOGGLE
Setpoint Temperature:
Parameter Type: ESP_RMAKER_PARAM_RANGE
UI Type: ESP_RMAKER_UI_SLIDER
Temperature Value (Read-only):
Parameter Type: ESP_RMAKER_PARAM_TEMPERATURE
Fan Speed:
Parameter Type: "esp.param.speed" (You need to replace "esp.param.speed" with a proper parameter type recognized by Google Home for fan speed control).
UI Type: ESP_RMAKER_UI_SLIDER
AC Mode:
Parameter Type: ESP_RMAKER_PARAM_AC_MODE
UI Type: ESP_RMAKER_UI_DROPDOWN
Ensure that the parameter types and UI types are set as mentioned above for the respective parameters.
Additionally, make sure your device is properly linked to your Google Home account using the Google Home app. After linking, Google Home should automatically recognize the device and its capabilities based on the defined parameters and UI types.
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: GVA thermostat
Thanks for the inputs @bidrohini . Meanwhile, some parameters required for a thermostat are indeed missing. These are being tested internally and will be available on the public RainMaker soon. We will update the standard types docs accordingly.
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: GVA thermostat
New release for the skills has been pushed out. Can you try again? Probably a reboot of the device may be required.
Who is online
Users browsing this forum: No registered users and 10 guests