Skip to content
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

rainmaker: multiple device callbacks not getting registered #8249

Merged
merged 1 commit into from
May 31, 2023

Conversation

sanketwadekar
Copy link
Contributor

@sanketwadekar sanketwadekar commented May 25, 2023

Description of Change

This PR fixes an issue of multiple device callbacks (one callback per device) were not getting registered and invoked.
Consider an example where I create two devices, a switch and a fan; each of them having their own write callbacks. On controlling either switch/fan through Rainmaker app, the callback that got registered at last gets invoked. This is also seen in the issue reported here

Test Scenarios

I have tested this PR by creating four devices; Switch, Lightbulb, Temp. sensor and Fan; each of them having their own callback. On controlling the device through app, respective callbacks were getting invoked.

Related links

Closes #8231

@CLAassistant
Copy link

CLAassistant commented May 25, 2023

CLA assistant check
All committers have signed the CLA.

@sanketwadekar
Copy link
Contributor Author

@shahpiyushv @vikramdattu PTAL

Copy link

@vikramdattu vikramdattu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe in the PR and commit the exact issue, and how this change fixes it.

libraries/RainMaker/src/RMakerDevice.cpp Show resolved Hide resolved
@SuGlider SuGlider added the Area: Rainmaker Issue is related to ESP Rainmaker. label May 25, 2023
@SuGlider SuGlider added this to the 2.0.10 milestone May 25, 2023
@lishnih
Copy link

lishnih commented May 26, 2023

Good day,
I tried this commit but it's not successful for me: Core 1 panic'ed (InstructionFetchError). Exception was unhandled.
Maybe I can assist somehow?

@sanketwadekar
Copy link
Contributor Author

Good day,
I tried this commit but it's not successful for me: Core 1 panic'ed (InstructionFetchError). Exception was unhandled.
Maybe I can assist somehow?

@lishnih I tried this PR with the example you shared in your issue description and it worked fine. Please share your sketch that gives InstructionFetchError exception.

@lishnih
Copy link

lishnih commented May 26, 2023

I withdraw my comment, I tried it again and found out that I defined Switch variable inside setup() therefore I got the exception. With global variable I have no issue.

@me-no-dev me-no-dev merged commit 2c4dead into espressif:master May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Rainmaker Issue is related to ESP Rainmaker.
Projects
Development

Successfully merging this pull request may close these issues.

RainMaker device callback issue
6 participants