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.7k 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.
  • H Offline
    H 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
      • H Offline
        H 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
          • H Offline
            H 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
              • H Offline
                H 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

                      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


                      12

                      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