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. Send time request over arduino "monitor serial"

Send time request over arduino "monitor serial"

Scheduled Pinned Locked Moved Development
14 Posts 3 Posters 4.0k 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.
  • ch3b7C Offline
    ch3b7C Offline
    ch3b7
    wrote on last edited by
    #1

    How can i send a time request ?? " over monitor serial in arduino ...

    1;255;3;0;1;14:55:30 06/01/2015" something like this??

    thanks! im finally complete the most part of my windows controller in .net ^^

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

      You can't.

      The serial messages you enter in monitor is only destined to radio network. Whilst the time request is sent from a node over radio network to gateway/controller.

      1 Reply Last reply
      0
      • ch3b7C Offline
        ch3b7C Offline
        ch3b7
        wrote on last edited by
        #3

        thanks man!

        1 Reply Last reply
        0
        • ch3b7C Offline
          ch3b7C Offline
          ch3b7
          wrote on last edited by
          #4

          when the node send "gw.requestTime(receiveTime); " i cant answer from arduino monitor serial no?

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

            yes, you can

            1 Reply Last reply
            0
            • ch3b7C Offline
              ch3b7C Offline
              ch3b7
              wrote on last edited by
              #6

              how, who need send?? or an example

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

                Something like:

                <node-id>;255;3;0;1;<seconds since 1970>\n

                1 Reply Last reply
                0
                • ch3b7C Offline
                  ch3b7C Offline
                  ch3b7
                  wrote on last edited by
                  #8

                  thanks, the problem is i dont know who is "<seconds since 1970> any example? im use a custom controller.

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

                    Depends on your programming language. Normally you would have a function returning milliseconds since 1970. Just divide this with 1000.

                    1 Reply Last reply
                    0
                    • ch3b7C Offline
                      ch3b7C Offline
                      ch3b7
                      wrote on last edited by ch3b7
                      #10

                      WORK! im get "1420578901" ^^ thanks HEK!

                      im have other question about the light actuator with a button, i send the command to tun on/off its works, but can the node can send again the new state when received the turn on/off command? sorry for my bad english im from argentina^^ im needed to update the state in my controller and know if the command sended work.

                      this work but when i press the button the controller send 2 sets commands

                      **void incomingMessage(const MyMessage &message) {
                      // We only expect one type of message from controller. But we better check anyway.
                      if (message.isAck()) {
                      Serial.println("This is an ack from gateway");
                      }
                      if (message.type == V_LIGHT) {
                      // Change relay state
                      state = message.getBool();
                      digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
                      // Store state in eeprom
                      gw.saveState(CHILD_ID, state);
                      // Write some debug info
                      Serial.print("Incoming change for sensor:");
                      Serial.print(message.sensor);
                      Serial.print(", New status: ");
                      Serial.println(message.getBool());
                      gw.send(msg.set(state), false); // Send new state and request ack back
                      } **

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

                        Just request ack from the node by setting ack parameter to 1.

                        <node-id>;<child-sensor-id>;<message-type>;<ack>;<sub-type>;<payload>\n

                        The node will then respond back with the same message in return. (You don't need to update sketch code)

                        1 Reply Last reply
                        0
                        • ch3b7C Offline
                          ch3b7C Offline
                          ch3b7
                          wrote on last edited by
                          #12

                          THANKS for your help!!

                          E 1 Reply Last reply
                          0
                          • ch3b7C ch3b7

                            THANKS for your help!!

                            E Offline
                            E Offline
                            ericvdb
                            wrote on last edited by
                            #13

                            @ch3b7 do you mind sharing your .net code?

                            1 Reply Last reply
                            0
                            • ch3b7C Offline
                              ch3b7C Offline
                              ch3b7
                              wrote on last edited by
                              #14

                              HERE my source code my-sensors-controller-net

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


                              22

                              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