Closed maxakash closed 1 year ago
Hi @maxakash, Can you provide more logs? If possible, please share the source file so that I can help you better.
There is no need to use Rainmaker C APIs (Rainmaker using IDF) in Arduino. To add a new device (other than the standard devices), you can use the APIs provided by Arduino Rainmaker.
static Device internalBlinds;
void setup() {
// Code
internalBlinds = Device("Internal Blind");
Param deviceParam("XYZ Param", NULL, value(20), PROP_FLAG_READ | PROP_FLAG_WRITE | PROP_FLAG_PERSIST);
deviceParam.addUIType(ESP_RMAKER_UI_TEXT);
internalBlinds.addParam(deviceParam);
my_node.addDevice(internalBlinds); // my_node is the
// Code
}
You can read more about the APIs here
If this solves your problem, you can close this issue.
There is no need to use Rainmaker C APIs (Rainmaker using IDF) in Arduino. To add a new device (other than the standard devices), you can use the APIs provided by Arduino Rainmaker.
Example snippet
static Device internalBlinds; void setup() { // Code internalBlinds = Device("Internal Blind"); Param deviceParam("XYZ Param", NULL, value(20), PROP_FLAG_READ | PROP_FLAG_WRITE | PROP_FLAG_PERSIST); deviceParam.addUIType(ESP_RMAKER_UI_TEXT); internalBlinds.addParam(deviceParam); my_node.addDevice(internalBlinds); // my_node is the // Code }
You can read more about the APIs here
If this solves your problem, you can close this issue.
Thanks @sanketwadekar . This is what I was looking for.
Hey @sanketwadekar, I have set up my blinds using static Device curtain("Blinds", ESP_RMAKER_DEVICE_BLINDS_INTERNAL, NULL);
But still the blinds are not shown in Google Home. I just checked that openPercent
is a required trait for blinds.
I think it is not implemented in GVA due to which it is not shown in Google Home. Can you please check?
@maxakash Have you tried adding ESP_RMAKER_PARAM_BLINDS_POSITION (esp.param.blinds-position) parameter?
@maxakash Have you tried adding ESP_RMAKER_PARAM_BLINDS_POSITION (esp.param.blinds-position) parameter?
@shahpiyushv it worked after adding ESP_RMAKER_PARAM_BLINDS_POSITION. I was using it the wrong way. Thanks for your help.
Hey @shahpiyushv , is there any way to implement Google actions blinds attribute discreteOnlyOpenClose
, so that the blinds just have open and close function?
@maxakash , currently it is hard-coded with a value of false, so that we support the superset of the valid commands. Bit if there is some hardware limitation, we will allow setting this too. Can you file a separate issue for that with appropriate title?
I will close this issue since a new one #170 has been filed
I am trying to add Internal Blinds as a device along with other standard devices such as Fan and LightBulb. But I am not able to do so. First InternalBlind type is not found, and if I try to add it via
I get "Could not initialise node" error. Please help me how to add Internal Blinds. Thanks