ESP32 umqtt.simple userdata and client handle in a callback

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
outsidewall
Posts: 7
Joined: Mon Apr 20, 2020 9:27 pm

ESP32 umqtt.simple userdata and client handle in a callback

Post by outsidewall » Mon Jul 27, 2020 12:58 pm

Hello,

I'm using umqtt.simple and am trying to find a way to pass the client mqtt handle and userdata into the message callback.
So far, it seems the only way is by variables that have the scope of the program, not ideal.
I have used paho-mqtt on a raspberry pi, which seems to support the mqtt handle and pass userdata into the callback/mqtt object. It seems paho is way to complex for micropython, thus is there any other way around this.
I have thought of branching umqtt and moding it...

Any thoughts?

Regards John

Post Reply