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. Own action on heatbeat request

Own action on heatbeat request

Scheduled Pinned Locked Moved Development
7 Posts 4 Posters 1.2k 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.
  • wimdW Offline
    wimdW Offline
    wimd
    wrote on last edited by
    #1

    Hi,
    I would like to capture the heartbeat request send by a controller (in my case Domoticz).
    However this does not work within the receive funtction.
    What did I overlook?

    void receive(const MyMessage &message)
    {
        if (message.type == I_HEARTBEAT_REQUEST) { 
          Serial.println("heartbeat request");
        }   
    }```
    1 Reply Last reply
    0
    • rejoe2R Offline
      rejoe2R Offline
      rejoe2
      wrote on last edited by
      #2

      Afaik, heartbeat (and other internal messages) are designed for "internal" use, so the automatics behind that is - without further changes in the internal coding - not meant to be used by "regular" receive function.

      Why don't you just use other data types like S_CUSTOM to get the same result?

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

      1 Reply Last reply
      2
      • K Offline
        K Offline
        kimot
        wrote on last edited by
        #3

        @wimd said in Own action on heatbeat request:

        I_HEARTBEAT_REQUEST

        It looks is done automatically:

        MySensorsCore.cpp

        bool _processInternalMessages(void)
        .
        .
        .
        
        		} else if (type == I_HEARTBEAT_REQUEST) {
        			(void)sendHeartbeat();
        		} else if (type == I_TIME) {
        			// Deliver time to callback
        			if (receiveTime) {
        				receiveTime(_msg.getULong());
        
        1 Reply Last reply
        1
        • wimdW Offline
          wimdW Offline
          wimd
          wrote on last edited by wimd
          #4

          All works fine.
          I can update Text sensor or send a switch command.
          But when it comes to the heartbeat request there is no response form the gateway.
          I

          rejoe2R 1 Reply Last reply
          0
          • wimdW wimd

            All works fine.
            I can update Text sensor or send a switch command.
            But when it comes to the heartbeat request there is no response form the gateway.
            I

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

            @wimd In case you are looking for an option to check if the GW is available: There somewhere is an option to check, if uplink is available. Don't have a link by hand, but search for that, there's somewhere at least one sketch in the forum offering that (light-switch afai remember).

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

            wimdW 1 Reply Last reply
            0
            • rejoe2R rejoe2

              @wimd In case you are looking for an option to check if the GW is available: There somewhere is an option to check, if uplink is available. Don't have a link by hand, but search for that, there's somewhere at least one sketch in the forum offering that (light-switch afai remember).

              wimdW Offline
              wimdW Offline
              wimd
              wrote on last edited by
              #6

              I have now a heartbeat response form the gateway.

              For my test stetup I did not define any transport layer and this is probably the reason why the gateway did not respond to the heatbeatrequest from domoticz.

              1 Reply Last reply
              0
              • N Offline
                N Offline
                nekitoss
                wrote on last edited by nekitoss
                #7

                @wimd Could you share how you done that?
                I also want to check if gate is alive (backup-batterypowered node - if mains or gateway died, send me a message).
                I also use domoticz.

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


                18

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                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