MQTT with Python
Vložit
- čas přidán 7. 09. 2024
- Blog:
www.halvorsen....
CZcams Channel @Industrial IT and Automation
/ industrialitandautomation
Python Resources:
www.halvorsen....
Python Programming Videos:
• Python Programming
Python for Science and Engineering Videos:
• Python for Science and...
Python for Control Engineering Videos:
• Python for Control Eng...
Python for Software Development Videos:
• Python for Software De...
Many thanks Hans, I look forward to learning from you.
Great, thanks Hans
Great tutorial Hans. This is really helpful
Useful information, particularly about MQTT X. But every example I can find of Python MQTT code does either publish or subscribe but not both. In any practical code, you are likely to want to subscribe to some topics and publish to other topics in the same script. If you just scrunch the two examples together, it does not work because client.loop_forever() blocks everything except for responses to incoming MQTT messages. It would be much more helpful to show a single example which could be adapted to either role: comment out the subscribe call(s) and it just does publish, comment out the publish call(s) and it just does subscribe. This way we'd have a template which can be used for one, the other or both.
Can we publish a topic from a device and subscribe it from another device using python?