Page 1 of 1

Switch example events: I see only Event 1 fired <SOLVED>

Posted: Mon Jul 05, 2021 6:29 pm
by fasani
Hello,
I was researching about the events, that are in the Switch example:
https://github.com/espressif/esp-rainma ... app_main.c

If in the event_handler I add a Serial output like:
printf("EVENT ID:%d\n", event_id);

The only event that is fired is the number 1: RainMaker Initialised

Why the others like MQTT connected are not being fired?
Even I see the Serial info:
I (7712) esp_mqtt_glue: MQTT Connected so it's connected but the event does not seem to be fired.

Is there a way to get this events fired?


Thanks a lot in advance!

Re: Switch example events: I see only Event 1 fired

Posted: Mon Jul 05, 2021 6:37 pm
by ESP_Piyush
Hello,

Thanks for reporting. This is indeed a bug. Please add the below code just after this line.

Code: Select all

ESP_ERROR_CHECK(esp_event_handler_register(RMAKER_COMMON_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL));