Window Sensor Device
Posted: Sat Jan 14, 2023 2:20 pm
Hi!
I wonder, if it is possible to setup a device, which shows up as window in Google Home. Problem here is, that the window device type is supported by Google Home, but does not appear in the list of standard devices for Rainmaker. I then looked up the window device in the Google Docs (https://developers.home.google.com/clou ... des/window) and found out, that it needs to send the param openPercent for the command OpenClose. So I tried to rebuild this with a custom window device:
And added the primary param:
This device shows up in the Rainmaker app, but not in Google Home. The question now is, if this is possible at all, or if support for windows as standard device is needed. Thank you very much for an answer!
Regards, woermi
I wonder, if it is possible to setup a device, which shows up as window in Google Home. Problem here is, that the window device type is supported by Google Home, but does not appear in the list of standard devices for Rainmaker. I then looked up the window device in the Google Docs (https://developers.home.google.com/clou ... des/window) and found out, that it needs to send the param openPercent for the command OpenClose. So I tried to rebuild this with a custom window device:
Code: Select all
static Device window("Window", "esp.device.window", NULL);
Code: Select all
window.addNameParam();
Param window_state_param("openPercent", "esp.param.OpenClose", value(0), PROP_FLAG_READ | PROP_FLAG_WRITE);
window_state_param.addBounds(value(0), value(100), value(1));
window_state_param.addUIType(ESP_RMAKER_UI_SLIDER);
window.addParam(window_state_param);
window.assignPrimaryParam(window.getParamByName("openPercent"));
Regards, woermi