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. Controllers
  3. Domoticz
  4. Domoticz data timeout

Domoticz data timeout

Scheduled Pinned Locked Moved Domoticz
24 Posts 5 Posters 6.5k Views 5 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.
  • P pjr

    I think with domoticz its might be enough to call sendHeartbeat() from your gateway every 30 seconds.
    It should update the m_LastHeartbeatReceive of the HW and thats what mainworker uses when it defines if the HW should be "rebooted".

    Here is a example(NOT TESTED):

    #define HEARTBEAT_SEND_FREQUENCY 30000
    unsigned long lastHeartBeatSend;
    ....
    void setup()
    {
      lastHeartBeatSend  = 0;
    }
    ...
    void loop()
    {
      unsigned long now = millis();
      if(now - lastHeartBeatSend > HEARTBEAT_SEND_FREQUENCY)
      {
        sendHeartbeat();
        lastHeartBeatSend = now;
      }
    }
    

    See:
    https://github.com/domoticz/domoticz/blob/8bb0420c3ba4a10bbacd6f2e2f9b40b06ff0c7ac/main/mainworker.cpp#L12864
    https://github.com/domoticz/domoticz/blob/8bb0420c3ba4a10bbacd6f2e2f9b40b06ff0c7ac/hardware/MySensorsBase.cpp#L487
    https://www.mysensors.org/download/sensor_api_20

    gbuicoG Offline
    gbuicoG Offline
    gbuico
    wrote on last edited by
    #21

    @pjr , what you are suggesting is exactly what I wanted at the beginning..... but... my understanding from the first answer I got and for this https://www.domoticz.com/forum/viewtopic.php?f=42&t=9775&sid=1fea4af7b12f84f656ca4aa825eb6115
    is that the sendHeartbeat() function is basically accepted but disregarded in Domoticz, meaning, would not create problems but not fixing the issues.
    Of course this is my understanding and would be glad to have additional opinions/tests

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pjr
      wrote on last edited by pjr
      #22

      @gbuico That thread is pretty old.

      The current(and most likely working) functionality is implemented here:
      https://github.com/domoticz/domoticz/commit/2d4e690c82b166ff8597a7deb44be17f3ad2560f#diff-a9f78798ba1bded6b56b3909b2a42848

      1 Reply Last reply
      0
      • gbuicoG Offline
        gbuicoG Offline
        gbuico
        wrote on last edited by
        #23

        @pjr, thanks for your update. I went to check the solution proposed in the link you attached... and let me confess... got the concept, but it's complexity is currently not something at my reach.
        Meaning.. as my solution is very small and working, for the time been I'll stick to it and spend my time for further function implementation.
        My only worry... your example was just a few lines... understandable... how did they end up with 1700 lines of code or this?
        Whatever.. I'l go back to it when I have some more time as I prefer an official implementation to a patch like mine...

        1 Reply Last reply
        0
        • gbuicoG gbuico

          @kimot , right now I'm using the Arduino IDE application which allows me to upload to NodeMCU just using the USB cable.
          Reading the ESPeasy documentation I understand that this type of connection is not an option and you must have a USB to TTL interface.
          I'd be very happy to hear that I don't need it... otherwise I'm going to get one on monday...

          K Offline
          K Offline
          kimot
          wrote on last edited by kimot
          #24

          @gbuico
          USB to TTL serial is on board on NodeMCU and Wemos.

          Download
          ESPEasy mega dev.13

          Upload to your NodeMCU using "FlashESP8266.exe" from .zip
          Upload to NodeMCU

          Use "....._normal_4096.bin" file

          Power off - on !!! your NodeMCU ( reconnect USB cable )

          Make basic setup:
          With smart phone or notebook connect to your NodeMCU, which works like wifi acces point now ( name like "ESP_Easy_0" )
          If password required - "configesp"
          Type in browser address 192.168.4.1
          wifi setup
          Set your home wifi access info in config page.
          You will see actual IP your NodeMCU in your wifi network.
          Connect to this IP and make basic setup.
          ( you can set Fixed IP, IP of your Domoticz, etc )
          ESPEasy setup

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


          24

          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