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

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

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

Postby fasani » Mon Jul 05, 2021 6:29 pm

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!
Last edited by fasani on Mon Jul 12, 2021 6:30 pm, edited 1 time in total.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

ESP_Piyush
Posts: 259
Joined: Wed Feb 20, 2019 7:02 am

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

Postby ESP_Piyush » Mon Jul 05, 2021 6:37 pm

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

Who is online

Users browsing this forum: No registered users and 27 guests