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. sendHeartbeat not work right

sendHeartbeat not work right

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 790 Views 4 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.
  • Ivan ZI Offline
    Ivan ZI Offline
    Ivan Z
    Hardware Contributor
    wrote on last edited by
    #1

    I send Heartbeat, but receive in system I_DISCOVER_RESPONSE

    Sketch code

    void loop() {
       unsigned long tick = millis();
       if (tick - previsionTime > HeartBitInterval) {
         previsionTime = tick;
         sendHeartbeat(); 
       }
    }
    

    Node log

    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.0
    
    16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
    
    ...
    
    14960 TSF:MSG:SEND,115-115-0-0,s=2,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:1
    48934 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    48941 TSF:MSG:BC
    49762 TSF:MSG:SEND,115-115-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0
    49772 TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    49780 TSF:MSG:BC
    49782 TSF:MSG:READ,0-6-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    49788 TSF:MSG:BC
    1254332 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    1254340 TSF:MSG:BC
    1255313 TSF:MSG:SEND,115-115-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0
    1255323 TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    1255331 TSF:MSG:BC
    

    Log in system: MajorDomo

    2018-11-29 10:26:19 699 >> 3:Internal; Gate:1; Node:115; Sensor:255; Ack:0; Sub:21:I_DISCOVER_RESPONSE; Msg:0
    2018-11-29 10:25:47 133 >> 1:Set; Gate:1; Node:115; Sensor:2; Ack:0; Sub:2:V_STATUS; Msg:1
    
    ...
    
    1 Reply Last reply
    0
    • rejoe2R Offline
      rejoe2R Offline
      rejoe2
      wrote on last edited by
      #2

      @ivan-z said in sendHeartbeat not work right:
      Not quite sure, but imo the node doesn't enter loop() at all. Sure it is registered to the controller?
      You may add some serial output when loop() is processed the first time (or use setup() routine)

      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

      1 Reply Last reply
      0
      • Ivan ZI Offline
        Ivan ZI Offline
        Ivan Z
        Hardware Contributor
        wrote on last edited by
        #3

        This is only part of the code.

        Full version sketch
        https://github.com/Shagrat2/MSMDLed/blob/master/MSMDLed.ino

        rejoe2R 1 Reply Last reply
        0
        • Ivan ZI Ivan Z

          This is only part of the code.

          Full version sketch
          https://github.com/Shagrat2/MSMDLed/blob/master/MSMDLed.ino

          rejoe2R Offline
          rejoe2R Offline
          rejoe2
          wrote on last edited by
          #4

          @ivan-z Wow, looks great!
          Nevertheless make sure, loop() is effectively entered.
          So first step for debugging might be to add a

          Serial.println("Entering  - before()");
          

          at the beginning of the corresponding subroutine (do this for before(), presentation() and setup() and at the end of setup(), I'd recommend an additional Serial.println("exiting setup()";.

          Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

          1 Reply Last reply
          0
          • Ivan ZI Offline
            Ivan ZI Offline
            Ivan Z
            Hardware Contributor
            wrote on last edited by
            #5

            before = work
            presentation = work
            setup = work

            ???

            1 Reply Last reply
            0
            • rejoe2R Offline
              rejoe2R Offline
              rejoe2
              wrote on last edited by
              #6

              Is setup() also exiting correctly or only entering?
              If all this happens, add a one-time routine in loop().

              Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

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


              19

              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