Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Bug Reports
  3. Presentation of local sensor with GatewayESP8266MQTTClient seems to fail

Presentation of local sensor with GatewayESP8266MQTTClient seems to fail

Scheduled Pinned Locked Moved Bug Reports
3 Posts 2 Posters 1.5k Views 2 Watching
  • 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.
  • J Offline
    J Offline
    jpaulin
    wrote on last edited by jpaulin
    #1

    Hi MySensors,

    I was doing some tests yesterday with an ESP8266-01 as an MQTT Client Gateway. Really impressive work from you Henrik and the rest of the team.

    When trying to add a local sensor to the ESP8266MQTTClient Gatway, the Presentation part doesn't seems to work. Nothing is being sent to the MQTT Broker.

    #include <ESP8266WiFi.h>
    #include <MySensor.h>

    MyMessage msg(1,V_TRIPPED);

    void setup() {
    }

    void presentation() {
    // Present locally attached sensors here
    sendSketchInfo("Test", "1.0");
    present(1, S_DOOR);
    }

    If I add the same commands to the loop they're being sent forward to the Broker.

    void loop() {
    // Present locally attached sensors here
    sendSketchInfo("Test", "1.0");
    present(1, S_DOOR);
    wait(5000);
    }

    I'm using ESP8266-01 for my tests without any radio (NRF24L01/RFM69) attached.
    The rest is working great, so far.

    // Enables and select radio type (if attached)
    //#define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69

    I'm using the development branch, and it's up-to date.

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      Hmm.. that has probably been forgotten for the MQTT client gateway...

      Could you try adding:

      if (presentation)
          presentation();
      

      Here:
      https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyGatewayTransportMQTTClient.cpp#L148

      J 1 Reply Last reply
      1
      • hekH hek

        Hmm.. that has probably been forgotten for the MQTT client gateway...

        Could you try adding:

        if (presentation)
            presentation();
        

        Here:
        https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyGatewayTransportMQTTClient.cpp#L148

        J Offline
        J Offline
        jpaulin
        wrote on last edited by
        #3

        @hek
        Yes, that fixed the issue. Thanks. :smiley:

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        17

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular