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. Controllers
  3. Home Assistant
  4. MQTT topics from HA contains trailing slash

MQTT topics from HA contains trailing slash

Scheduled Pinned Locked Moved Home Assistant
6 Posts 3 Posters 2.2k Views 3 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.
  • frizzy3dF Offline
    frizzy3dF Offline
    frizzy3d
    wrote on last edited by
    #1

    Hi,

    My node topics from the MQTT gateway doesn't contain trailing slashes, but their response topics published by HA do:

    INFO:homeassistant.core:Bus:Handling <Event mqtt_message_received[L]: qos=0, topic=mysensors-out/1/0/2/0/2, payload=>
    INFO:homeassistant.core:Bus:Handling <Event call_service[L]: service=publish, service_call_id=1977438992-1001, service_data=qos=0, topic=mysensors-in/1/0/1/0/2/, retain=True, payload=0, domain=mqtt>
    

    The MQTT gateway doesn't forward these trailing slash topics to any nodes. When I manually (mosquitto_pub) publish to a "corrected" topic, my node receives the message.

    My MySensors gateway is Raspberry Pi based, built from the development branch.
    HA is the latest release.

    Please help!
    Thanks!!

    1 Reply Last reply
    0
    • Martin TellblomM Offline
      Martin TellblomM Offline
      Martin Tellblom
      wrote on last edited by
      #2

      Have you tried to subscribe to the topic exactly as shows up in for example MQTT-SPY?

      MySensors MQTT Client Gateway, Openhab, Dashing, Razberry, 1-wire

      1 Reply Last reply
      0
      • frizzy3dF Offline
        frizzy3dF Offline
        frizzy3d
        wrote on last edited by
        #3

        I am able to subscribe to the topic with the trailing slash and see the messages coming from HA (using mosquitto_sub), so there's no problem reaching the broker. The gateway itself doesn't seem to subscribe to that topic pattern as nothing is shown in debug mode.

        Gateway does nothing:

        mosquitto_pub -t 'mysensors-in/1/0/1/0/2/' -m '1'
        

        Gateway converts message topic/payload into MySensors Serial protocol and the node receives it:

        mosquitto_pub -t 'mysensors-in/1/0/1/0/2' -m '1'
        
        1 Reply Last reply
        0
        • martinhjelmareM Offline
          martinhjelmareM Offline
          martinhjelmare
          Plugin Developer
          wrote on last edited by martinhjelmare
          #4

          Please activate debug logging for mysensors.mysensors and post the log after start of HA, including mysensors related lines.

          1 Reply Last reply
          0
          • martinhjelmareM Offline
            martinhjelmareM Offline
            martinhjelmare
            Plugin Developer
            wrote on last edited by
            #5

            I've confirmed the bug and have a fix. Should be able to include it in the HA release in two weeks (0.31).

            1 Reply Last reply
            0
            • frizzy3dF Offline
              frizzy3dF Offline
              frizzy3d
              wrote on last edited by
              #6

              That's excellent, thanks! I'm using a Node-RED function to change the topic name. That works for me until the fix is released.

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


              25

              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