Hi all,
I’m trying to set up TD for the MQTT protocol (a machine 2 machine protocol) based on this library mosquitto.org/documentation/python/
I have a simple case that works in console python. To test it from cmd.exe just run
python receive.py
and
python publish.py
What I can’t figure out is how to get this running in TD without stalling the main render loop.
I’ve read that there is a mqtt loop_start() alternative to loop() that is supposed to do the looping in a separate thread, but I can’t get it to work and I’m not even sure if this is allowed given that we are not supposed to update TD nodes from different threads …
If anyone used MQTT before or has the time to look into this it would be highly appreciated.
Many thanks
Achim
PS: Python lib is in here:
mosquitto.org/files/source/mosqu … 3.2.tar.gz
under ‘mosquitto-1.3.2\mosquitto-1.3.2\lib\python’
mqtt.zip (1022 Bytes)