Checking MQTT Subscribe Acknowlegements in Python

Поделиться
HTML-код
  • Опубликовано: 27 авг 2024
  • www.steves-inte... - This video was create d in response to a question on the website regarding multiple topic subscriptions and how you check that they have been accepted so that you can either continue,try again or stop the script from proceeding.Checking MQTT Subscribe Acknowledgements in Python.
    We go through the Python code that I use in one of my MQTT tools as an example implementation.
    Other videos and tutorials
    Subscribing to Topics Using the Python MQTT Client
    • Subscribing to Topics ...
    ----------------------
    Introduction to MQTT
    • An Introduction to MQT...
    -----------------------
    Understanding MQTT Clean Sessions
    • Understanding MQTT Cle...
    -----------------
    MQTT Keep Alives Explained
    • MQTT Keep Alives Expla...
    -------------
    Python MQTT Client The Loop and Callbacks explained
    / o4yhgvlrl2
    ------------
    A Beginners Guide to MQTT Topics
    • A Beginners Guide to M...
    If you find these videos useful then you might want to consider buying me a coffee
    www.paypal.me/...
  • ХоббиХобби

Комментарии • 5

  • @FisVii77
    @FisVii77 5 лет назад

    love these python mqtt and node red videos keep em up.

  • @snehilsingh5081
    @snehilsingh5081 4 года назад

    Hi sir i really like your video but i want to know what happens when i publish the data but there is not subscriber active so is it going to print any exception or if not then how we should get to know that subscriber is down or the file where we have written code for subscriber is not executed yet please help me with this any help will be appreciated ...Thanks

    • @stevecope
      @stevecope  4 года назад +1

      MQTT works like radio or TV. What happens when a radio channel publishes and no one is tuned in?
      Nothing -they don't know who if anyone is listening.
      Does that make sense?
      Rgds
      Steve

    • @snehilsingh5081
      @snehilsingh5081 4 года назад

      @@stevecope thanks sir for clear example but what if i want to know at the time of publishing data that subscriber is down or not ? is there any way in MQTT to track that cause i have created simple services one for Publish data and one for subscribe it and under normal circumstances if there is no subscriber running when a message is published then the data will be not delivered.. so here is the problem i always need to start the subscriber before the publisher otherwise i'm facing data loss so please just want little suggestion any help will be fine for me ....and sorry for writing these many thing here in chat i was trying tell the intension behind that question which i asked you .....thanks

    • @stevecope
      @stevecope  4 года назад

      Hi
      You have to design this in. Take a look at this tutorial on the site
      www.steves-internet-guide.com/checking-active-mqtt-client-connections/
      rgds
      steve