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

    Send Message from the Controller to a Node (MySensors)

    scheduled pinned locked moved Troubleshooting
    5 posts 3 posters 2.0k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • A offline
      andyphan
      global:last-edited-by, jkandasa

      I setup a RFM69 transceiver wireless network utilizing MySensors /MyController - Built in MQTT broker and MQTT gateway. All node and sensors resources are discovered OK. All sensor data sent to gateway from nodes received OK.

      Everything else seemed working OK except I haven't figured out how to send a MySensors' format message from the Controller/Gateway to a node and a child sensor. I tried to send a raw message and forward payload to a node using the UI tool on MyController. The node never received the message.

      The receiving node has the following sketch

      //========= Receiving Message from GW======
       void receive(const MyMessage &message)
      {
          Serial.print("received msg type");
          Serial.println(message.type);
          Serial.print("Incoming change for sensor:");
          Serial.println(message.sensor);
       }
      

      Nothing showed on Serial Screen.

      Can someone point me to the right direction? I'm miss-understood something?

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

        @andyphan Have you enabled serial debug? What is the message you sent?

        one-reply-to-this-post last-reply-time reply quote 0
        • T offline
          Tag MOD
          global:last-edited-by,

          Hi!,

          Found this example that works in my network.

          does this work for you?

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

            It works now. I mistakenly had one of the connected sensor to sleep upon iddle. The node only receives messages when none of the attached sensor is sleeping.

            T one-reply-to-this-post last-reply-time reply quote 0
            • T offline
              Tag MOD @andyphan
              global:last-edited-by,

              @andyphan 👍

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

              0

              online

              644

              users

              532

              topics

              3.4k

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