Announcement

Collapse
No announcement yet.

HS Database Unit Disassociation with Plugin DB

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

  • HS Database Unit Disassociation with Plugin DB

    I reported this in another thread and decided to start a thread related just to just this observation/issue. Since I thought/hoped it was a fluke I recreated the DB linkages/associations. They held for quite some time 1-2 weeks. Low and behold, of 18 Omni units (out of many more from the panel in the plugin) that have HS devices associated with them, three associations disappeared tonight and the plug toggle is red.

    I've been trying to track down logs and note date/time the HS DB got a command that the Plugin didn't send understandably is they are disassociated.

    Very odd. Last time I deleted the HS devices and used the Plugin to recreate. I'm thinking if I just load a back up HS zip file it should all come back. Any thoughts on this?

    update: I manually repaired the database on October 18.

  • #2
    This is going to be one of those things that will be difficult to reproduce on my system.
    When the plugin starts, it does synchronize the HS OMNI Units with the OMNI units on the panel.
    This info is stored in a global collection that exists only when the plugin is running - this is done for speed when looking up various reference data.
    The only way they can be removed is through either the HS GUI by removing the device (not recommended), or deleting the device through the plugin page (recommended).

    That said, I need to see what I can do to grab more information as soon as you notice it.
    Thinking out loud, it might not be a bad idea to periodically 'refresh' that association at some interval.
    Also, it might be possible to move that association from memory to a SQLite DB, but that would add a little overhead to processing.

    Much to think about, but I think we can try to come up with something to make it more persistent.

    Let's keep this issue in this thread and build on it as we go along.




    HS3Pro Running on a Raspberry Pi3
    68 Z-Wave Nodes, 174 Events, 326 Devices
    UPB modules via OMNI plugin/panel
    Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
    HSTouch Clients: 3 Android, 1 Joggler

    Comment


    • #3
      Thanks for the info regarding how some portions of the plugin work.

      Originally posted by rmasonjr View Post
      When the plugin starts, it does synchronize the HS OMNI Units with the OMNI units on the panel.
      Works fine.

      Originally posted by rmasonjr View Post
      This info is stored in a global collection that exists only when the plugin is running - this is done for speed when looking up various reference data.
      There must be some persistence somewhere, correct? Otherwise, how does the plugin restore the relationship each time it starts up?

      Originally posted by rmasonjr View Post
      The only way they can be removed is through either the HS GUI by removing the device (not recommended), or deleting the device through the plugin page (recommended).
      The only time I delete the device via the HS GUI is to "repair" the orphaned relationship between HS and the plugin. Need to delete the HS device so the plugin can create a new one with the plugin toggle function.

      Originally posted by rmasonjr View Post
      That said, I need to see what I can do to grab more information as soon as you notice it.
      Thinking out loud, it might not be a bad idea to periodically 'refresh' that association at some interval.
      I will try to be more diligent about tracking when it happens. It's hard to know when it happens as only when devices suddenly stop responding do I go looking.
      How would I "refresh" the association periodically as you suggest?

      Sometimes added overhead that makes a system more robust and resilient is worth it...IMO.





      Comment


      • #4
        The current persistence is in PED (Plugin Extra Data). Basically, the HS device is 'stamped' with the OMNI unit number when it is created. So, when the plugin starts up, it find all HS devices that have PED unit numbers. That tells the plugin which devices belong to omni. Then, the OMNI has the unit numbers so the plugin associates the OMNI unit numbers to the HS unit numbers.

        I'll have to add code to dump the values in the plugin.
        The only way now to refresh the relationship is to toggle the plugin off/on in the manage plugins page.
        HS3Pro Running on a Raspberry Pi3
        68 Z-Wave Nodes, 174 Events, 326 Devices
        UPB modules via OMNI plugin/panel
        Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
        HSTouch Clients: 3 Android, 1 Joggler

        Comment


        • #5
          Originally posted by rmasonjr View Post
          The only way now to refresh the relationship is to toggle the plugin off/on in the manage plugins page.
          I just tested this and it does not behave as you describe. When the you enable a unit in OMNI it does not "refresh" a previous relationship, rather it creates a new HS device.

          This is a device that "lost" the OMNI relationship that needs to be refreshed or relinked.
          Reference ID 166
          Technology Address OMNI-Q57
          Status 0 = OFF
          Value 0 = "OFF"
          String
          Supports Status True
          Dimmable True
          Interface OMNI
          Extra Data Store 1 Named entries, 0 UnNamed entries.
          Device Type Internal Plug-In API, Type: Plug-In Type 4, SubType: B-Nook Table
          Device Type (String)

          After going to OMNI and toggle the enable it created this device:
          Reference ID 181
          Technology Address OMNI-Q65
          Status 100 = ON
          Value 100 = "Dim 100%"
          String
          Supports Status True
          Dimmable True
          Interface OMNI
          Extra Data Store 2 Named entries, 0 UnNamed entries.
          Device Type Internal Plug-In API, Type: Plug-In Type 4, SubType: B-Nook Table
          Device Type (String)
          Misc Settings Do Not Log, Show Values, Generate Voice Command, SET_DOES_NOT_CHANGE_LAST_CHANGE
          Device Image File images/HAI/hai.jpg
          Thumbnail Image File images/HAI/hai.jpg
          Relationship Status Child
          Associated Devices .Hidden OMNI Root Device
          Additional Display Data OMNI
          3.0.2.17
          It's not possible to toggle it OFF then ON as when the disconnect occurs OMNI shows it as OFF so all you can do is enable it back to ON.

          Hope this is helpful.

          Comment


          • #6
            Interesting, especially the 1 Named entry on the orphaned device. That tells me that the PED update is not happening or is being lost somewhere along the way.
            I'll post back when I take a look.
            HS3Pro Running on a Raspberry Pi3
            68 Z-Wave Nodes, 174 Events, 326 Devices
            UPB modules via OMNI plugin/panel
            Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
            HSTouch Clients: 3 Android, 1 Joggler

            Comment


            • #7
              Originally posted by raprap View Post

              I just tested this and it does not behave as you describe. When the you enable a unit in OMNI it does not "refresh" a previous relationship, rather it creates a new HS device.
              No, you'll need to toggle the plugin off/on from the manage plugins page, not the device...

              HS3Pro Running on a Raspberry Pi3
              68 Z-Wave Nodes, 174 Events, 326 Devices
              UPB modules via OMNI plugin/panel
              Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
              HSTouch Clients: 3 Android, 1 Joggler

              Comment


              • #8
                Originally posted by rmasonjr View Post
                Interesting, especially the 1 Named entry on the orphaned device. That tells me that the PED update is not happening or is being lost somewhere along the way.
                I'll post back when I take a look.
                Great, thanks...progress.

                Comment


                • #9
                  Originally posted by rmasonjr View Post
                  No, you'll need to toggle the plugin off/on from the manage plugins page, not the device...
                  Ah, I now see that I misread your comment regarding toggle the plugin OFF/ON. I have done this too, I have also rebooted Zee. Neither of these actions refresh the relationship.

                  Comment


                  • #10
                    Update... A few days ago I deleted the orphaned HS devices and used the plugin to recreate them. All was back to ground zero. Low and behold, yesterday one of them disassociated from the plugin but just one. Very odd. I waited about 24 hours and no others disassociated.

                    Comment


                    • #11
                      With a much more stable configuration (no disconnects at all since) back to functional aspects of the system and developing automation. First thing, the dissociations still occur and my observations are:

                      With all these Plugin discovered devices...
                      Click image for larger version  Name:	Capture.JPG Views:	1 Size:	172.8 KB ID:	1270893

                      Unit #51 is one that always disconnects. I check it all the time to see if the panel is online and when it doesn't respond I see it is orphaned occured yesterday when I also noticed unit #60 was not responding...orphaned. I deleted the HS device and had the plugin recreate. I also added another, unit 61, this morning as you can see all gone...orphaned. Odd that it is unit #51 and higher, although prior to this I did see other devices orphan.

                      Looking at the HS device list...
                      Click image for larger version  Name:	Capture2.JPG Views:	1 Size:	19.1 KB ID:	1270894

                      You will see reference #34, one of the originally discovered devices. This and many others never orphaned. Notice Ref # 202 and #203. Why in the 200+ range? Having to recreate the devices over and over again.

                      Comparing an "OK" device and an orphaned device Click image for larger version

Name:	image_74796.jpg
Views:	39
Size:	131.7 KB
ID:	1270897

                      Ref ID #34 is Unit #12 and Ref ID 202 is Unit #51

                      The only way I have found to bring back the relationship is to delete the HS device and have the plug in recreate. I have not tried to restore from a backup configuration file but if that works it would a much better "return to normal" path.


                      I hope this helps in some way with troubleshooting the issue.

                      Comment


                      • #12
                        I can confirm the restoring a backup configuration file does not restore the Plugin Unit to HS Device relationships. I deleted the HS devices affect and had the Plugin recreate.

                        Devices created with plugin 3.0.2.17 and earlier have this entry:
                        Extra Data Store 2 Named entries, 0 UnNamed entries.
                        Devices created with plugin .18 have this entry:
                        Extra Data Store 1 Named entries, 0 UnNamed entries.

                        Comment


                        • #13
                          raprap

                          If you havent already, remove that device that shows "1 Named Entry" through the OMNI page, and through the HS device page.
                          Next, create an event to do the following:
                          Click image for larger version

Name:	screenshot.png
Views:	28
Size:	30.6 KB
ID:	1271444

                          Next, recreate that device through the OMNI page. Let this run for a while and see if it goes from "2 Named Entries" back to 1.
                          This will help me see if there is code that is getting somehow cached when creating the 2 named entries.
                          HS3Pro Running on a Raspberry Pi3
                          68 Z-Wave Nodes, 174 Events, 326 Devices
                          UPB modules via OMNI plugin/panel
                          Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
                          HSTouch Clients: 3 Android, 1 Joggler

                          Comment


                          • #14
                            Thanks, Rob. I'll get to this later today. Where is the output of the script stored?

                            I don't have access to Linux Tools nor can I SSH into the server. When I updated the mSD card somehow usernames/pwds got all scrambled despite what I have entered, with permissions, into the HS3 setup.

                            Comment


                            • #15
                              Originally posted by raprap View Post
                              Thanks, Rob. I'll get to this later today. Where is the output of the script stored?

                              I don't have access to Linux Tools nor can I SSH into the server. When I updated the mSD card somehow usernames/pwds got all scrambled despite what I have entered, with permissions, into the HS3 setup.
                              I think it just logs to the main hs log.

                              Sent from my Galaxy S7 Edge using Tapatalk

                              HS3Pro Running on a Raspberry Pi3
                              68 Z-Wave Nodes, 174 Events, 326 Devices
                              UPB modules via OMNI plugin/panel
                              Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
                              HSTouch Clients: 3 Android, 1 Joggler

                              Comment

                              Working...
                              X