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. Development
  3. Node Child and MQTT Subscribe

Node Child and MQTT Subscribe

Scheduled Pinned Locked Moved Development
childsubsubscribemqtt
7 Posts 4 Posters 3.6k Views 1 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.
  • G Offline
    G Offline
    Gambituk
    wrote on last edited by
    #1

    Hello. I am trying to get a connection working with mysensors I have the two devices communicating, but in order to make smaller steps, i want to assign a static node address to the remote node that is running dallas sketch for temp.

    I read in other threads that :
    gw.begin(NULL,25,false); is the way to do it.. I have tried two values, 5 and 25.

    The serial output from the GW when i am running is like this.

    0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.3
    0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.2
    0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.1
    0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.0
    0;0;3;0;9;read: 25-25-0 s=255,c=0,t=17,pt=0,l=3:1.4
    0;0;3;0;9;read: 25-25-0 s=255,c=3,t=6,pt=1,l=1:0
    0;0;3;0;9;read: 25-25-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
    0;0;3;0;9;read: 25-25-0 s=255,c=3,t=12,pt=0,l=3:1.0
    0;0;3;0;9;read: 25-25-0 s=0,c=0,t=6,pt=0,l=3:1.4
    0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.9
    0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.8
    0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.9

    1. Is the first value after read the node and the second the child?

    2. If this is the case, and i wanted to check what was being sent to openhab via mqtt what would the topic be that i would subscribe to? (for example before i connect to the openHAB controller, i could use myMQTT to view the topic for troubleshooting?)

    Thanks for any help

    H 1 Reply Last reply
    0
    • G Gambituk

      Hello. I am trying to get a connection working with mysensors I have the two devices communicating, but in order to make smaller steps, i want to assign a static node address to the remote node that is running dallas sketch for temp.

      I read in other threads that :
      gw.begin(NULL,25,false); is the way to do it.. I have tried two values, 5 and 25.

      The serial output from the GW when i am running is like this.

      0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.3
      0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.2
      0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.1
      0;0;3;0;9;read: 5-5-0 s=0,c=1,t=0,pt=7,l=5:21.0
      0;0;3;0;9;read: 25-25-0 s=255,c=0,t=17,pt=0,l=3:1.4
      0;0;3;0;9;read: 25-25-0 s=255,c=3,t=6,pt=1,l=1:0
      0;0;3;0;9;read: 25-25-0 s=255,c=3,t=11,pt=0,l=18:Temperature Sensor
      0;0;3;0;9;read: 25-25-0 s=255,c=3,t=12,pt=0,l=3:1.0
      0;0;3;0;9;read: 25-25-0 s=0,c=0,t=6,pt=0,l=3:1.4
      0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.9
      0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.8
      0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.9

      1. Is the first value after read the node and the second the child?

      2. If this is the case, and i wanted to check what was being sent to openhab via mqtt what would the topic be that i would subscribe to? (for example before i connect to the openHAB controller, i could use myMQTT to view the topic for troubleshooting?)

      Thanks for any help

      H Offline
      H Offline
      hek
      Admin
      wrote on last edited by
      #2

      @Gambituk said:

      Is the first value after read the node and the second the child?

      No, it is which node the message came from (last hop).
      child-id is s=XXXX

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gambituk
        wrote on last edited by
        #3

        AH! ok. that part seems clear now. Any idea's about the MQTT part? I am really looking for a way to get a handle on what is being sent. Been searching all day (and most of yesterday :/)

        Thanks again,

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hek
          Admin
          wrote on last edited by
          #4

          Sorry.. I haven't much knowledge of the MQTT stuff.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            daulagari
            Hero Member
            wrote on last edited by
            #5

            In MQTT you can use wildcards so you can subscribe to everything published.

            I am not familiar to myMQTT but I know mosquitto_sub and that can be quite handy for debugging.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gambituk
              wrote on last edited by
              #6

              I just found that exact same feature... mosquitto_sub -h localhost -v -t '#' or mosquitto_sub -h 192.168.0.7 -v -t '#'

              That has totally helped me to see what is going on, and i can now see that openHAB section is working. but from the MQTTGateway sketch from the build page i get only something like this..

              connecting at 115200
              Started!
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:23.4
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:22.1
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:21.4
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:21.0
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.8
              0;0;3;0;9;read: 25-25-0 s=0,c=1,t=0,pt=7,l=5:20.6

              Should there be something happening to publish to mqtt? i kinda thought that was the point of this type of GW?

              Thanks again for all the help so far. I can try to do a tutorial when i am finished from my noob perspective that might be useful for others.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                Damme
                Code Contributor
                wrote on last edited by
                #7

                I have been away for a while but it seams quite some of you are experiencing problems, I'll try to take a look at it. If you find any more details, please let me know!

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                18

                Online

                12.0k

                Users

                11.2k

                Topics

                113.4k

                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