OpenMQTTGateway
OpenMQTTGateway copied to clipboard
[SYS] Use PicoMQTT for MQTT communication
Description:
This replaces the MQTT library from PubSubClient to PicoMQTT.
This PR doesn't change functionality, the changes shouldn't affect the end user, because the project should work just as before.
Switching to PicoMQTT opens the path to implementing a MQTT broker withing OMG.
TODO
A few things still need to be updated before this is merged:
- The project does not build for the
rfbridge-direct,shelly-plus1andnodemcuv2-pilightenvironments. These configurations use outdated board core versions, which are not supported by PicoMQTT. Simply updating the configs to use newer core versions results in linker errors. - Just like in the original code, MQTT settings are reverted to old values when a new configuration doesn't work. However, the original logic around this was complex and recently updated, so it needs a careful review.
Checklist:
- [x] The pull request is done against the latest development branch
- [x] Only one feature/fix was added per PR and the code change compiles without warnings
- [x] I accept the DCO.
The configurations, which failed to build should be fixed now. Their board cores are upgraded:
- In contrast to other configs,
shelly-plus1uses the Tasmota core, it's now updated to use 2.0.7. This is the minimum version supported by PicoMQTT. Unfortunately, upgrading to a newer version of the core is not possible, because it doesn't include support for the legacy SPIFFS file system, which OMG uses. rfbridge-directandnodemcuv2-pilightare upgraded to use the same core version as all other espressif8266 configs. Unfortunately, simply updating the platform version number was not sufficient. There were linking errors in the ESPiLight library. I found that the root cause for that was the updated GCC version in the newer core, which has different default compilation flags -- more details can be found here. The problem is now fixed with an extra-fcommonbuild flag.
Let's see if all configs now succeed in the CI.
@1technophile, I think this PR is now ready to review, please let me know if there's anything that needs updated.
I need to add #1979 , it has been removed by the merge
@1technophile no problem, I have now additionally squashed the fixup commit too, so this should be ready for merging as is.
Thanks