Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    How can I implement the MQTT protocol in the SDK?

    Flic Hub SDK
    4
    5
    1398
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • flic r
      flic r last edited by

      I checked out the JavaScript mqtt.js module but that comes to a total of 16.000 lines of JS code and as I am not an expert in JS programming, I was wondering if it is really worth to copy&paste this into the module on the hub and try to get it running from there.

      My purpose would be just to publish MQTT requests directly to a MQTT broker. Nothing fancy. (this would be better than using a HTTP-to-MQTT gateway).

      Any hints?

      PS: Better would be to have MQTT already there.

      PPS: Node.js is the basis for the SDK, as I understand, so why not implement MQTT from Node.js as well?

      1 Reply Last reply Reply Quote 2
      • claudia
        claudia administrators last edited by

        Hi, please refer to the newest topic. https://community.flic.io/topic/18233/release-of-mqtt-client?_=1674825212929
        We now provide an MQTT client. 😎

        1 Reply Last reply Reply Quote 0
        • flic u
          flic u last edited by

          I think a mqtt client would be more than enough. Preferably with TLS support.
          No need for a server

          1 Reply Last reply Reply Quote 0
          • flic r
            flic r @xAPPO last edited by

            @xAPPO thx for asking. I started out with the following MQTT implementation (without having tried anything yet):

            https://www.npmjs.com/package/mqtt/v/2.9.0#browserify

            I couldn't find a simple "publish" javascript implementation for use - that would have been my ideal solution.

            Any ideas or hints?

            1 Reply Last reply Reply Quote 0
            • xAPPO
              xAPPO last edited by

              Is the code you looked at just a client or implements a server too which would really add to the code complexity and size ?

              flic r 1 Reply Last reply Reply Quote 0
              • First post
                Last post