• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    MQTT sample setup on ESP8266

    scheduled pinned locked moved MyControllerDevice (ESP8266)
    29 posts 5 posters 30.1k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • Stephan35S offline
      Stephan35
      global:last-edited-by,

      Again me ,
      Is it possible to test MQTT to mycontroller without ESP ?
      Can you give me, please, some MQTT order example to understand what is wrong.
      MQTT works fine , made some test with domoticz implemented on the same server.
      Thanks.

      one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @Stephan35
        global:last-edited-by,

        @Stephan35 said:

        First i try autodetect MQTT server, but failed .

        On MyController server your have to enable mcc.mdns.service.enable=true on mycontroller.properties and stop and start.

        #define FACTORY_RESET_PIN 4
        #define FACTORY_RESET_PIN_STATE 4
        #define FACTORY_RESET_TIME 1000*1 //hold the button 9 seconds

        No success , still no AP .

        FACTORY_RESET_PIN_STATE should be either 0 or 1. When you press the button, If your pin(FACTORY_RESET_PIN) connects on GND, Then you have to enter 0, otherwise 1.

        MC[I]: Sending mDNS query[_mc_mqtt._tcp]...
        Skipping compressed pointer

        Yes, Sometimes I see this error when we use mDNS enabled on ESP device. This error happens on mDNS library.

        one-reply-to-this-post last-reply-time reply quote 0
        • Stephan35S offline
          Stephan35
          global:last-edited-by,

          These lines missing at the end of mycrontroller.properties files , very strange :

          mcc.clear.message.queue.on.start=true
          mcc.clear.smart.sleep.msg.queue.on.start=true

          #========================================================================

          MyController mDNS service settings

          Enable or disable mDNS service

          #========================================================================
          mcc.mdns.service.enable=true

          Anyway, now ESP is connected to my home wireless , i forced ip of mqtt, because discover does not work correctly, and , i dont see anything with mqtt.

          So i decided to fully reinstall mycontroller , to understand where i am wrong .

          one-reply-to-this-post last-reply-time reply quote 0
          • Stephan35S offline
            Stephan35
            global:last-edited-by,

            Ok now i installed lasted git version.

            Here is screen shot :

            0_1487365886889_Capture d’écran_2017-02-17_22-08-55.png

            Gateway

            0_1487365900097_Capture d’écran_2017-02-17_22-08-29.png

            And arduino usb debug
            0_1487365868189_Capture d’écran_2017-02-17_22-10-26.png

            Esp is configured as mentionned at AP Setting

            Now, what next ?

            MyController seem to be interesting, but, very hard to get it work ... for me .

            Is there somewhere any video ? to explain how it work with example and sample.

            Thanks

            jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
            • jkandasaJ offline
              jkandasa @Stephan35
              global:last-edited-by,

              @Stephan35

              Now, what next ?

              You can use your ESP as a node and can fun with your sensors with monitor, reports, and actions...

              MyController seem to be interesting, but, very hard to get it work ... for me .
              Is there somewhere any video ? to explain how it work with example and sample.

              I am sorry for this. Right now we do not have any videos. I will update a video when I get time. Thank you for your valuable feedback.

              one-reply-to-this-post last-reply-time reply quote 0
              • Stephan35S offline
                Stephan35
                global:last-edited-by,

                Thank for your support.

                You can use your ESP as a node and can fun with your sensors with monitor, reports, and actions...

                I am very sad : nothing appear in node and sensor.
                So i was completly wrong about thinking autodiscover node with MQTT ?
                I have to add manually all node and sensors ?
                Or my arduino sketch does not contain good command to put it in mycontroller ?

                Thanks
                Best regards

                one-reply-to-this-post last-reply-time reply quote 0
                • Stephan35S offline
                  Stephan35
                  global:last-edited-by,

                  Hello,
                  Me again .
                  So now esp seem to send data to mqtt , here is usb logger :

                  0_1487718035316_Capture d’écran_2017-02-22_00-00-26.png

                  If i correctly understand, ESP_8C0125 connect to broker and subscribe to in_esp/ESP_8c0125
                  [in_esp/ESP_8C0125/#]

                  Ok , here is mqtt box sniffer :
                  0_1487718204528_Capture d’écran_2017-02-22_00-03-14.png

                  etc
                  etc
                  etc

                  MyController does not see anything ... Arrghhh , going to be mad !!! 😡

                  ID Client have to set to esp_client , but esp client is ESP_8C0125 ?
                  If changed ti ESP_8C0125, failed connect ...

                  inverting in_esp and out_esp does not change anything ?

                  0_1487718404870_Capture d’écran_2017-02-22_00-06-29.png

                  Can you drive me please to get it work ..... 😞

                  Thanks

                  jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                  • jkandasaJ offline
                    jkandasa @Stephan35
                    global:last-edited-by,

                    @Stephan35 Sorry for the inconvenience caused.

                    I see you have selected MySensors as a network type. Which is wrong. You have to select MyController as network type if you use https://github.com/mycontroller-org/MyControllerDevice
                    I believe you are using built in MQTT broker. What is your MyController local IP? Is it 192.168.0.25?

                    Here is screenshot from my setup,
                    0_1487750138920_upload-b9ad5e29-a9a3-473c-a23a-6a6f72f0df83

                    • in_esp >> feed data to ESP devices
                    • out_esp >> data from ESP devices
                    one-reply-to-this-post last-reply-time reply quote 0
                    • Stephan35S offline
                      Stephan35
                      global:last-edited-by, Stephan35

                      Ok,

                      What is your MyController local IP? Is it 192.168.0.25?

                      Yes MyController local IP is 192.168.0.25 (depending of wich router is connected to)

                      believe you are using built in MQTT broker.

                      What do you mean by using built in MQTT broker ? this one : First image of this post

                      Because i have installed mosquitto also , do MyController have it self mqtt broker ?
                      AND SHOULD IT WORK ALONE ???
                      I guess my big mistake was there ... 😇

                      Also , I have so solve install from github to get last version as your .

                      Thanks again for support 👍

                      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                      • jkandasaJ offline
                        jkandasa @Stephan35
                        global:last-edited-by,

                        @Stephan35

                        What do you mean by using built in MQTT broker ? this one : First image of this post
                        Because i have installed mosquitto also , do MyController have it self mqtt broker ?
                        AND SHOULD IT WORK ALONE ???

                        Yes, MyController has built in broker. No need to install any external brokers like mosquitto. If you want to use an external broker. Kindly disable internal (inbuilt) broker first.

                        Also , I have so solve install from github to get last version as your .

                        You can download most recent version from here.

                        From your post picture, I see you have selected MySensors as a network. Which is wrong. Select MyController as a network type.

                        one-reply-to-this-post last-reply-time reply quote 0
                        • Stephan35S offline
                          Stephan35
                          global:last-edited-by,

                          Here is some good news !!!

                          First after getting update from github , here is some screen shot from GUI

                          0_1487795384107_Capture d’écran_2017-02-22_21-29-34.png

                          We can see that MyController is in the list !

                          Also, Esp send correctly data to mosquitto (which i use by default)

                          0_1487795639762_Capture d’écran_2017-02-22_21-33-47.png

                          0_1487795522154_Capture d’écran_2017-02-22_21-31-14.png

                          Now , i have to test and learn to send data , like temperature or lighmeter .

                          Thank you for your time and your support.

                          😆

                          one-reply-to-this-post last-reply-time reply quote 2
                          • first-post
                            last-post

                          0

                          online

                          644

                          users

                          532

                          topics

                          3.4k

                          posts
                          Copyright © 2015-2025 MyController.org | Contributors | Localization