Announcement

Collapse
No announcement yet.

4Duino and MQTT protocol

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4Duino and MQTT protocol

    Hi,
    I have installed a MQTT broker on linux.

    I have tried to use the library PubSubClient to send packets MQTT to my brocker, but the compiler returns me many errors.

    are there some examples?
    are there other Library?

    many thank's

  • #2
    Dear refrhe,

    We do not have any examples but you can try this other library, Native MQTT client library in github:
    --> https://github.com/tuanpmt/esp_mqtt

    Here is a link for fully working MQTT examples:
    --> http://www.esp8266.com/viewtopic.php?f=29&t=8746

    Best regards,

    Comment


    • #3
      Hello
      I tried to compile the code with 4D Workshop.

      I have several errors.

      ESP8266WiFi.h need Queue.h and other includes.

      If I compile the example with Arduino IDE, everything works

      suggestions?

      Comment


      • #4
        Dear refrhe,

        Could you please post the exact error message from the compiler?

        Could you please indicate what version of Arduino IDE are you using?

        Please post or attach the example you used that compiled successfully.

        Best regards,

        Comment


        • #5
          hi
          i use the library
          https://github.com/knolleary/pubsubc...eases/tag/v2.6

          and the example in
          pubsubclient-2.6\examples\mqtt_esp8266

          this example work fine with arduino and ESP module, arduino is 1.8.1

          i try use this library in Workshop 4 with 4Duino
          when i try include
          ESP8266WiFi.h
          PubSubClient.h

          in function
          WiFiClient espClient;
          PubSubClient client(espClient);

          the compiler return error queue.h not found

          Comment


          • #6
            Dear reffhe

            I tried to compile the example but it wont compile. One error is that it
            cannot find the file functional --> #include<functional>.

            I checked the library and you need to install a JSON file for board Manager in Arduino IDE
            to choose an ESP8266 Board to compile it.

            This is what is written in the example:

            To install the ESP8266 board, (using Arduino 1.6.4+):
            - Add the following 3rd party board manager under "File -> Preferences -> Additional Boards Manager URLs":
            http://arduino.esp8266.com/stable/pa...com_index.json
            - Open the "Tools -> Board -> Board Manager" and click install for the ESP8266"
            - Select your ESP8266 in "Tools -> Board"

            In the list of the board, it expects an ESP8266 board and not a combination of Arduino & ESP8266 module.

            Best regards,

            Comment

            Working...
            X