Announcement

Collapse
No announcement yet.

Watchdog Behavior

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Watchdog Behavior

    The watchdog timer used to reset to zero after around 40 seconds on average. Now it never resets to zero until I activate a device linked to Hubitat Maker API. Activating one of these devices is successful even though watchdog shows many seconds and would continue to increase if I didn't activate a device.

    Hubitat Elevation plugin ver 3.3.6.0


    #2
    I believe that is the correct behavior If there is no activity (nothing communication back and forth) then the Watchdog isn't going to reset to zero. What I did (I have three HT hubs) is created a switch timer device in HT that when it turns On 10 seconds later it turns itself Off. Then I pulled over the switch timer device into HS and created an event in HS that every five minutes (depending on my hub) I turn ON that HT device switch and after 10 seconds HT resets the switch Off, this resets the Watchdog to zero. The way my HT hubs are set up I have one HT hub that 95% of the time doesn't have a switch being activated (they are either On or Off, basically static) so that hubs Watchdog would just count up.With the switch timer every five minutes it turns On and 10 seconds later it turns off Off and resets the Watchdog. It's very easy to set up the Switch Timer just search HT Switch Timer With Reset, add that code to driver code, create a virtual device in HT using that code, set your reset delay etc., put it in the API and pull it over to HS and create your event in HS, DONE.

    Comment


      #3
      Thanks... and thanks for the suggested way to keep comm active.

      Comment


        #4
        Quick question on this. My Hubitat was locked up this morning - it happens every so often. Green light on, not responsive. Watchdog was counting up and told me that it had been off-line for about 90 minutes. I rebooted the hubitat but the plugin did not reconnect. I waited for a few minutes and then I unloaded and loaded the plugin and everything was fine. How long should the plugin take to reconnect when the hubitat is restarted?

        Comment


          #5
          I set mine for 10 minutes. I have an event that says if the Watchdog value is greater that 600 then sync the hub. I also reboot my hubs twice a week with a reboot event.

          Comment


            #6
            Interesting - couple of questions related to this:

            Are you rebooting the hub through the reboot command in the plugin? I have never used that but it seems relatively simple to set this up to run at night.

            Have you had experience with the Hubitat hub locking up? I noticed it happens to me every couple of weeks or so. I wondered if this is normal or should I be looking to diagnose this. There is nothing in the logs when it happens that give me any clues.

            I had been planning to use a wave outlet controlled by homeseer to give me the option of power cycling the hubitat in the event it becomes unresponsive. However, perhaps the reboot every couple of days would prevent it from becoming unresponsive on the first place and this wouldn't be necessary.

            Thanks.

            Comment


              #7
              Yes I reboot the Hubitat Hub with the reboot command in the Hubitat plugin and a HS4 event to do it. I have noticed that over a period time the hubs would stall so I just do the automatic reboot. I've been doing it for so long now I don't remember how long it was before the stall but they (I have three) haven't stalled since. How I do the event is:

              1. At a certain time of the night/certian day of the week reboot hub
              2. Wait 5 minutes (could be shorter)
              3. Sync the Hub (shouldn't be needed but just in case)

              No Hubitat Hub problems

              Comment


                #8
                Thanks - I plan to implement this tonight. When you say "sync" the hub. Is there a specific command you are using or do you let the plugin reconnect on it's own? My experience this morning is the hubitat plugin did not reconnect - at least not in a few minutes - so I wasn't sure how long this would take or if I need to instruct it to reconnect.

                Comment


                  #9
                  The plugin only establishes the event reporting connection with Hubitat at startup. I changed this starting with version 4.4.1.1 to establish this connection at every Sync operation.

                  http://mcsSprinklers.com/HSPI_mcsHubitat_4_4_1_1.zip

                  The reboot button on the plugin will send a command to restart Hubitat, but if it is locked up there will be no effect.

                  The process I suggest as the Event action when the watchdog exceeds the time threshold is to command the power cycle via other technology such as wifi smart plug, zwave smart plug, etc. Wait 5 minutes or whatever your hub's worst-case startup time is, Command the plugin's Sync feature.

                  Comment


                    #10
                    I did set it up with a smart plug so I can restart it remotely. Of course, being an idiot, I used a plug that is connected to the Hubitat hub. So I will have to move that plug over to homeseer.

                    How can I programmatically issue a sync command through an event after the habitat has restarted? Thanks.

                    Comment


                      #11
                      You have a Sync feature that is part of the root hub device. Use the Control a Device event action and set it to any value (e.g.0)

                      Comment


                        #12
                        I am probably overlooking something obvious here but I don't see a way to set the value? Thanks.

                        Click image for larger version

Name:	Screen Shot 2021-03-08 at 5.16.00 PM.png
Views:	77
Size:	41.2 KB
ID:	1461717

                        Comment


                          #13
                          Also, I did a little more testing on shutting down the hubitat by cutting off the power. When it has restarted I don't think the "Connect / Re-Scan Devices" button re-establishes the connection. I hit it 5 times in row and no dice. I then unloaded and loaded the plugin from the manage plugins page and everything was back to normal.

                          Also, don't know if this is related. The "Perhaps go have a beer" (which is always an excellent idea) doesn't display every time I hit the connect button. For example it only displayed once in the 5 times I hit the connect button when testing.

                          Comment


                            #14
                            I just realized you are in the HS3 forum. The ability to control sync programmatically is only with HS4 plugin. I believe Jon00 has a utility to restart a plugin.

                            Comment


                              #15
                              In the last couple of weeks, I've been having the same problem and spent fair amount of time watching the watchdog count seconds

                              The 'beer' message does appear. You just need to be patient. (In my case, the refresh process often takes more than a minute).

                              Connect/Rescan and Watchdog buttons did not always help with re-establishing communication.
                              And so, I now have an event that launches a 'program' if Watchdog exceeds 250s. The program, the whole 5 lines of it , kills the Hubitat process.
                              Nothing else is needed - HS automatically restarts the plugin.

                              Based on the logs, the problem occurs several times per day; and often, it takes two-three plugin restarts to re-establish connection (this probably explains why Connect/Rescan at times appears non-functional).

                              My thing is that I've never had this problem before; and although there were some recent changes in the environment, I could not associate any of these changes with the issue.

                              Michael,

                              is there any way we can troubleshoot this?

                              Comment

                              Working...
                              X