Announcement

Collapse
No announcement yet.

Homeseer loses connection to Hubitat

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

    Homeseer loses connection to Hubitat

    I am running HomeSeer Version: HS3 Pro Edition 3.0.0.548; Operating System: Microsoft Windows 10 Pro - Work Station; 3.0.10.0: Hubitat. Recently, the Hubitat device has had a couple of updates, which may relate to this problem. The Hubitat version is 2.2.1.116. Over the past few days, I have found that Hubitat and HomeSeer are not communicating. To get the communication back, I have been disabling the plug in and restarting it. By the way, when it is connected, the plug in works great. I especially like the availability of Echo Speaks. What other information would you need? Thanks.
    "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
    "Reboot and rejoice!" F. Pishotta, 1989

    #2
    The architecture of the plugin is to open a socket for Hubitat Elevation to communicate whatever Maker API wants to send. Maker API should be sending device changes when they occur. All data received from Maker API over this socket is sent to the debug file if debug has been enabled in the plugin's setup config.

    I suggest the following next steps
    1. Enable the debug so a record exists of what was last communicated
    2. If there is a means to view Maker API data on Hubitat Elevation then confirm that updates are still occurring on that side
    3. The plugin has a Sync/Connect button on either the root device (HS4) or Config page (HS3). Use this button to ask Maker API to send current information. The debug file should show any received data

    When I was doing Echo Speaks I noticed it was chatty as music was playing on Echo and during this time it locked up. Since I was in development mode and doing breakpoints etc it could of been me rather then Hubitat that induced the communication breakage.

    I hearbeat via Maker API would be nice so the plugin can monitor and reset everything if the hearbeat is missing. Perhaps there is something that can be setup in Hubitat to create the heartbeat based upon a timer. If you know how to do something like this then I can add the monitoring/restart of the plugin.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      The architecture of the plugin is to open a socket for Hubitat Elevation to communicate whatever Maker API wants to send. Maker API should be sending device changes when they occur. All data received from Maker API over this socket is sent to the debug file if debug has been enabled in the plugin's setup config.

      I suggest the following next steps
      1. Enable the debug so a record exists of what was last communicated
      2. If there is a means to view Maker API data on Hubitat Elevation then confirm that updates are still occurring on that side
      3. The plugin has a Sync/Connect button on either the root device (HS4) or Config page (HS3). Use this button to ask Maker API to send current information. The debug file should show any received data

      When I was doing Echo Speaks I noticed it was chatty as music was playing on Echo and during this time it locked up. Since I was in development mode and doing breakpoints etc it could of been me rather then Hubitat that induced the communication breakage.

      I hearbeat via Maker API would be nice so the plugin can monitor and reset everything if the hearbeat is missing. Perhaps there is something that can be setup in Hubitat to create the heartbeat based upon a timer. If you know how to do something like this then I can add the monitoring/restart of the plugin.
      Michael:
      Thanks. Debug has been implemented for the plug in. I will follow the other above instructions, the next time the disconnect occurs.

      I have not had that issue with Echo Speaks, which I have used mainly for announcements. One of things that I am doing is using a virtual switch in Hubitat (e.g., "Ford returns"), setting up a rule to speak through a specific Echo, when the switch is turned on (e.g., "Ford is returning"). The switch is turned on by HomeSeer, when the RFID detects the presence of the Ford. This works very well.

      Maker API past log seems only to provide the past couple of hours. I'm not sure why. I did a search on setting up a heartbeat, but need to learn more on how to set this up within Hubitat.

      Elliott
      "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
      "Reboot and rejoice!" F. Pishotta, 1989

      Comment


        #4
        They have a device/app for heartbeat of the devices you want to monitor your devices which works well,does reporting, etc. You create a VD and the data/reporting comes in there. Too much info for the mcsHubitat plugin so leave it over in the HT side. I. haven't seen anything for the hub or maker other than the discussion of creating a timer for the HTTP traffic that resets itself after 30 seconds if there is traffic there warns if not but I'll dig a bit further.

        Comment


          #5
          Originally posted by Bigstevep View Post
          They have a device/app for heartbeat of the devices you want to monitor your devices which works well,does reporting, etc. You create a VD and the data/reporting comes in there. Too much info for the mcsHubitat plugin so leave it over in the HT side. I. haven't seen anything for the hub or maker other than the discussion of creating a timer for the HTTP traffic that resets itself after 30 seconds if there is traffic there warns if not but I'll dig a bit further.
          Thank you for this response. Could you please point me to something more specific? The only thing that I found, which maybe what you refer to, is the HTTP presence sensor for Hubitat (https://community.hubitat.com/t/upda...ce-sensor/9072).
          "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
          "Reboot and rejoice!" F. Pishotta, 1989

          Comment


            #6
            I would think something like a virtual device in hubitat that counts up every minute. This virtual device value change would be picked up by Maker API and message delivered to HS. A lack of an update in two minutes would tell the plugin that the connection has been dropped.

            Comment


              #7
              Originally posted by Richel View Post

              Thank you for this response. Could you please point me to something more specific? The only thing that I found, which maybe what you refer to, is the HTTP presence sensor for Hubitat (https://community.hubitat.com/t/upda...ce-sensor/9072).
              Look for the device/apps called Hub Watchdog. In github you can find them to monitor devices, etc. but like I said not the hub The presence sensor for the hub I seem to remember you can find in HS3 but I run HS4 and it's not there anymore. There are many more features to the mcsHubitat plugin in HS4 than HS3 that are very useful but not presence. When I get some time I'll see about a hub watchdog that covers the hub but I haven't found one yet..It could also just be a ping on the maker URL(s) that would work as well, don't know.

              Comment


                #8
                I was not aware anything was removed from the HS3 plugin when moving to HS4. Can you point me to this presence support?

                Comment


                  #9
                  Originally posted by Bigstevep View Post

                  Look for the device/apps called Hub Watchdog. In github you can find them to monitor devices, etc. but like I said not the hub The presence sensor for the hub I seem to remember you can find in HS3 but I run HS4 and it's not there anymore. There are many more features to the mcsHubitat plugin in HS4 than HS3 that are very useful but not presence. When I get some time I'll see about a hub watchdog that covers the hub but I haven't found one yet..It could also just be a ping on the maker URL(s) that would work as well, don't know.
                  Thank you!
                  "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                  "Reboot and rejoice!" F. Pishotta, 1989

                  Comment


                    #10
                    So, I was thinking that the issue is on the HomeSeer side and that I would want to know when HomeSeer is not communicating with Hubitat. With this in mind, I created a virtual switch in Hubitat ("Connectivity"). I then created an event in HomeSeer to turn on the switch every 30 s. If Hubitat and HomeSeer are not communicating, it will not be able to turn on. This first event has a second (“Then”), conditional, manual, event to check if the Connectivity switch is "on" and if it is not "on," send me a message. This is all that I need to know and I can reset the plug in, if the connectivity is lost. Of course, there is always the possibility that at the point in time that HomeSeer turns the switch on, connectivity is lost and the switch will always be "on."
                    "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                    "Reboot and rejoice!" F. Pishotta, 1989

                    Comment


                      #11
                      That looks like a good workaround. Did you test it buy shutting the HT hub down (reboot)? Like I said I'm running HS4 and it has the capability to reboot hub, sync hub, simulate and change modes. Since there were reported instances of the HT hub slowing down, missing commands, etc. I have an event that runs twice a week in the middle of the night on my hubs (2). It reboots the hubs, waits 10 minutes (could be a shorter time) then syncs the hubs. This has worked flawlessly (you can see it in the HT logs) and I've never had a problem of losing connectivity. I'll keep looking for a hub watchdog. I found some code but haven't tried it yet.

                      Comment


                        #12
                        Thanks. Yes, I have tested it by rebooting the Hubitat hub and it works as designed. I also found a way to restart a plug in. I could put the restart into the event, if needed.
                        "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                        "Reboot and rejoice!" F. Pishotta, 1989

                        Comment


                          #13
                          Still would be nice to know more info about why communications are lost and the minimum necessary to reestablish them. The HS4 event to command Sync would be the minimum if both hub and HS are healthy but the socket failed. If a plugin shuts itself down then I think HS will restart it so a plugin restart action or feature would be the next level from the HS side. If the plugin is able to monitor the condition then it will also be able to take the necessary recovery action in a somewhat transparent manner without the need for any user events. If it was to restart the hub then the best it could do generically is to raise an event trigger that the hub needs to be reset and the user would need to have an event looking for this trigger and their own custom event action.

                          Comment


                            #14
                            Originally posted by Michael McSharry View Post
                            I was not aware anything was removed from the HS3 plugin when moving to HS4. Can you point me to this presence support?
                            Richel will have to answer that, I'm on HS4

                            Comment


                              #15
                              Originally posted by Michael McSharry View Post
                              Still would be nice to know more info about why communications are lost and the minimum necessary to reestablish them. The HS4 event to command Sync would be the minimum if both hub and HS are healthy but the socket failed. If a plugin shuts itself down then I think HS will restart it so a plugin restart action or feature would be the next level from the HS side. If the plugin is able to monitor the condition then it will also be able to take the necessary recovery action in a somewhat transparent manner without the need for any user events. If it was to restart the hub then the best it could do generically is to raise an event trigger that the hub needs to be reset and the user would need to have an event looking for this trigger and their own custom event action.
                              Found this but it's on the HT side:

                              The simplest way to implement a watchdog, IMHO, is to simply schedule a timer (e.g. runIn(300, watchdogAlarm, overwrite: true) ). Then, every time your http data comes in, simply issue another runIn(300, watchdogAlarm, overwrite: true). As long as the http events come in within the 300 seconds, the “watchdogAlarm” function will never be called. Otherwise it will and you can then perform whatever action is desired.

                              Later corrected by HT staff:
                              overwrite: true)

                              True is the default, so its not required.

                              If something was in the plugin with a timer like this it would work.

                              The other thing is that on another system I manage the plugin failed to load. Upon further investigation I found stupid Windows rebooted the PC and when HS started it failed. I just shutdown the plugin and restarted it and all was good. I mention this because HS does not stop the plugin on error or restart it.

                              Comment

                              Working...
                              X