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. Troubleshooting
  3. Getting system time from the controller

Getting system time from the controller

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 4 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.
  • mfalkviddM mfalkvidd

    The received message looks like this:
    Received Message
    Sender: 0
    Last Node: 0
    Destination: 6
    Sensor Id: 255
    Command: INTERNAL
    Message Type: I_TIME
    Payload Type: P_STRING
    Payload Length: 10
    Signing: 0
    Payload: 1740594416

    https://www.mysensors.org/build/parser?log=450375 TSF%3AMSG%3AREAD%2C0-0-6%2Cs%3D255%2Cc%3D3%2Ct%3D1%2Cpt%3D0%2Cl%3D10%2Csg%3D0%3A1740594416

    1740594416 is Thu, 27 Feb 2025 11:56:37 GMT which looks reasonable.

    So question is, why doesn’t the node print the received time?

    dpconsD
    dpconsD
    dpcons
    wrote on last edited by
    #4

    @mfalkvidd
    Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
    Again, thanks

    dpconsD mfalkviddM 2 Replies Last reply
    0
    • dpconsD dpcons

      @mfalkvidd
      Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
      Again, thanks

      dpconsD
      dpconsD
      dpcons
      wrote on last edited by
      #5

      @dpcons sorry...esp8266 wemos mini is the actual device.

      1 Reply Last reply
      0
      • dpconsD dpcons

        @mfalkvidd
        Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
        Again, thanks

        mfalkviddM
        mfalkviddM
        mfalkvidd
        Mod
        wrote on last edited by
        #6

        @dpcons it could be that the gateway code for receiving time is (unintentionally) broken. I noticed that the other thread you found also was about a gateway.

        I have never used receivetime myself but I am pretty sure I have seen it working for other people on regular nodes.

        dpconsD 1 Reply Last reply
        0
        • nagelcN
          nagelcN
          nagelc
          wrote on last edited by
          #7

          I have found that controllers can be very slow to respond to time requests. Same experience for Domoticz and for Homeassistant. Try a wait(1500) after the time request.

          dpconsD 1 Reply Last reply
          0
          • nagelcN nagelc

            I have found that controllers can be very slow to respond to time requests. Same experience for Domoticz and for Homeassistant. Try a wait(1500) after the time request.

            dpconsD
            dpconsD
            dpcons
            wrote on last edited by
            #8

            @nagelc Thanks for responding. The response from the controller seems to be very quick. The problem is the 'receiveTime' routine never gets executed. mfalkvidd stated that the response in the serial output looked reasonable so I'm assuming the controller is responding OK. I tried adding the delay(1500) but same issue.
            Again, thanks for your response.

            1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @dpcons it could be that the gateway code for receiving time is (unintentionally) broken. I noticed that the other thread you found also was about a gateway.

              I have never used receivetime myself but I am pretty sure I have seen it working for other people on regular nodes.

              dpconsD
              dpconsD
              dpcons
              wrote on last edited by
              #9

              @mfalkvidd Thanks for the response. I once built the 'Display and Time' sensor and I remember it working...but that was about 3-4 years ago and I no longer have the device. Maybe I build it back up again and give it a shot!

              dpconsD 1 Reply Last reply
              0
              • dpconsD dpcons

                @mfalkvidd Thanks for the response. I once built the 'Display and Time' sensor and I remember it working...but that was about 3-4 years ago and I no longer have the device. Maybe I build it back up again and give it a shot!

                dpconsD
                dpconsD
                dpcons
                wrote on last edited by
                #10

                @dpcons I built the Time Display example and after a little futzing, I got it to talk to my NRF24L01 system but the receiveTimez() function looks broken. It appears to respond with data that's read, but function never executes.
                Looks like I'll punt for now.

                mfalkviddM 1 Reply Last reply
                0
                • mfalkviddM
                  mfalkviddM
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #11

                  I think the relevant code is here:
                  https://github.com/mysensors/MySensors/blob/e298769eb73ba2da781a34d66cae345c6840b7c0/core/MySensorsCore.cpp#L473

                  but I can’t see anything that looks broken.

                  1 Reply Last reply
                  0
                  • dpconsD dpcons

                    @dpcons I built the Time Display example and after a little futzing, I got it to talk to my NRF24L01 system but the receiveTimez() function looks broken. It appears to respond with data that's read, but function never executes.
                    Looks like I'll punt for now.

                    mfalkviddM
                    mfalkviddM
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #12

                    @dpcons try changing unsigned long in your sketch to uint32_t

                    Could be that the override needs to have an exact match.

                    dpconsD 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @dpcons try changing unsigned long in your sketch to uint32_t

                      Could be that the override needs to have an exact match.

                      dpconsD
                      dpconsD
                      dpcons
                      wrote on last edited by
                      #13

                      @mfalkvidd Thanks, I'll try that.

                      1 Reply Last reply
                      1

                      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


                      14

                      Online

                      12.4k

                      Users

                      11.2k

                      Topics

                      113.5k

                      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