-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact sensor on Arduino IDE - Trigger Alexa routine (MEGH-5311) #301
Comments
Please check out the custom air cooler example for reference. There you will see that custom device type my.device.air-cooler has been used while defining a device . Similarly, some parameters are defined like here, with the types (Eg. ESP_RMAKER_PARAM_MODE) passed explicitly. Just use standard sensor device types and the corresponding param types from this page, and that should be sufficient. |
When i try to compile with a standard sensor type like "doorbell" i've a compilation errror, "not recognized type":
It seems very simple but it doesn't work for me... |
Another question, If I have to create a new device, how should I declare a parameter so that Alexa interprets it as a contact or a motion sensor so that I can trigger a routine? |
This is code, I just need to create a device recognized by Alexa as a button to trigger a routine //This example demonstrates the ESP RainMaker with a custom Air Cooler device #define DEFAULT_doorbell false const char *service_name = "PROV_123"; static int gpio_doorbell = 17; // The framework provides some standard device types like switch, lightbulb, fan, temperature sensor. // WARNING: sysProvEvent is called from a separate FreeRTOS task (thread)! void write_callback(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx) if (strcmp(param_name, "doorbell") == 0) { void setup()
#if CONFIG_IDF_TARGET_ESP32S2 void loop()
} |
Hello, I'd like to develop a project with Espressif but I've to solve the problem described, can you help me? |
@lukeferrero Please check the pointers in my comment above once again for better understanding. Your code has the device defined as Please refer the standard types document once again to understand valid device types and the parameters required under them. |
Thank you very much Piyush Shah. I modified the code but Alexa still to recognize the device not as a valid trigger for routine... luca |
I read in details this post #174 |
Did you also you try creating the parameter using |
It works! |
Is your feature request related to a problem?
I need to trigger Alexa routines, to do this I need a contact sensors or motion sensor type device. In the examples there are only "standard device". Is it possible to obtain an example with this kind of device?
I also tried to modify the switch example but those standard types seems not available.
Thank you.
Describe the solution you'd like.
No response
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: