Page 1 of 1

Window Sensor Device

Posted: Sat Jan 14, 2023 2:20 pm
by woermi
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:

Code: Select all

static Device window("Window", "esp.device.window", NULL);
And added the primary param:

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"));
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

Re: Window Sensor Device

Posted: Mon Jan 16, 2023 8:52 am
by sanketwadekar
Hello,
If the "Window" type is not in the list of supported device types of Rainmaker, then it will not be accessible through the Google Home app. You can raise a feature request issue on Github for the same.
Thanks