Announcement

Collapse
No announcement yet.

MQTT plugin devices creating phantom parents

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

    MQTT plugin devices creating phantom parents

    I think this started when I migrated HS4 to a new PC, using Backup/Restore. I was actually surprised that is restored all my plugins and their configurations, including mcsMQTT..

    Anyhow, all my old plugin devices transferred over, and seem to mostly if not all, be working perfectly. My issue however is, these odd HS4 parent devices keep appearing, created by mcsMQTT that seem to correspond to preexisting child devices that were imported from the backup. What's odd, is that these children already have an associated parent. When I delete the orphaned parent device, it just comes back at some point.

    Old HS3 deviceutility page, showing a number of these orphaned parents:
    Click image for larger version  Name:	Screenshot (2).png Views:	0 Size:	358.0 KB ID:	1437750

    Advanced page of such a device:
    Click image for larger version  Name:	Screenshot (3).png Views:	0 Size:	21.7 KB ID:	1437748
    Here is the working plugin device I think this parent corresponds to (but am not sure) as you can see, it has a parent, #774 already:
    Click image for larger version  Name:	Screenshot (4).png Views:	0 Size:	310.8 KB ID:	1437751

    And the advanced page:
    Click image for larger version  Name:	Screenshot (6).png Views:	0 Size:	202.5 KB ID:	1437749

    And lastly, the association table showing the subscription associated with these devices:
    Click image for larger version  Name:	Screenshot (5).png Views:	0 Size:	419.5 KB ID:	1437752

    I'm hesitant to nuke all of these since they are working, but would also like these phantom devices to go away if possible.. Any suggestions?

    EDIT: One last bit of possibly relevant information, I think the child devices, 829 for example, were created back when mcsMQTT did not automatically create a parent device for each new subscribed topic/plugin device added. I used Jon00's utility to group several of these children togeather, and associate them to the same parent device - this was before these phantom parent devices started appearing, and before the backup/restore however, and was not a problem until now.
    https://forums.homeseer.com/forum/3r...r-3-homeseer-4

    Thank you,
    Evan

    #2
    Would you mind zipping up \data\mcsMQTT\mcsMQTT.db and either posting it or emailing to mcsSolutions at CenturyTel dot net?

    Comment


      #3
      Nothing exposed outside of the LAN, file attached. Thanks!
      Attached Files

      Comment


        #4
        I'm sorry. What I should have asked is for the mcsMQTT.db from your backup before it was modified by HS4 mcsMQTT and the new parent devices were created. I can try to create a dummy database, but better if I have real data which with to work.

        Comment


          #5
          Took me a bit to find my old backup, I'm 99% sure this is pre-restore. Thanks!
          Attached Files

          Comment


            #6
            Thank You for the effort. I will start my testing.

            Comment


              #7
              The issue appears to be that mcsMQTT did not clean up the database as groupings were being defined. I fixed this issue in http://mcsSprinklers.com/HSPI_mcsMQTT_5_9_7_1.zip for HS4 and http://mcsSprinklers.com/mcsMQTT_5_9_7_1.zip for HS3/HS4.

              mcsMQTT looks at the database and assures that devices that are referenced do exists and creates new ones if they are not present. The problem devices are in the database with a positive Ref value so it creates new ones when it does not find those in the database. I edited the database to change the Ref column to -1 for those you have identified. You can do the same using DB Browser for SQLite on the file \data\mcsMQTT\mcsMQTT.db. I have attached my edits to the first database you posted.

              The process is disable mcsMQTT. Install the new plugin. Use the attached database or one you edit by putting it in \data\mcsMQTT folder. Start the plugin. You can then delete the phantom parents from HS4. Good Luck.

              To install the HS4 plugin download the zip into the HS4 folder. Unzip updater_override.json into the HS4 folder. From the HS4 plugin tab select Add and select the only HS4 plugin available which is mcsMQTT. When done remove updater_override.json to restore normal Updater functionality.
              Attached Files

              Comment


                #8
                I think the upload stopped at the middle . The size of the archive is around 6 mb

                Comment

                Working...
                X