-
Notifications
You must be signed in to change notification settings - Fork 638
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
MQTT Will message is invalid #171
Comments
For me it is working fine, I get the will topic ~40 seconds after disconnecting the board... |
Original comment by Abílio Costa (Bitbucket: amfcosta, GitHub: Unknown): Weird. The device on which you tested was being used? Try to toggle its state sometimes before disconnecting, just to try and get that memory zone rewritten. Could it be that when you tested, despite being freed, the memory still had the valid contents? This is what I'm getting from mosquitto_sub:
The topics vary a bit ("yGetter", "1Getter", "Getter"), that's why it looks like invalid memory reads. Tested on a Sonoff S20 and a Sonoff TH10. |
Caught it! Moved the variable to global scope. Right now in the dev branch, will be released soon. |
Original comment by Abílio Costa (Bitbucket: amfcosta, GitHub: Unknown): Great! :D |
Pushed with 1.8.3. |
Removing milestone: 1.8.3 (automated comment) |
Originally reported by: Abílio Costa (Bitbucket: amfcosta, GitHub: Unknown)
The MQTT will message is not correct. It seems to be reading another memory part.
After looking at the code, I think the issue is here (haven't tested yet): https://bitbucket.org/xoseperez/espurna/src/e327a219a81af889d81701e94f41eb78ec5db426/code/espurna/mqtt.ino?at=master&fileviewer=file-view-default#mqtt.ino-251
On line 251, the will char* is being freed, but it is probably stored by the mqtt lib when mqtt.setWill(...) is called.
The text was updated successfully, but these errors were encountered: