Announcement

Collapse
No announcement yet.

Request: specify parent ref before creating feature

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

    Request: specify parent ref before creating feature

    Hi Michael,

    Those root devices are making me crazy in HS4. I would really like to have a single root for a device, no matter which topic. When I setup a new device with power, temperature, IP address and Watts, I have 4 root devices... So I went as far as modifying the devices.json to set up my devices with a single root , and it works (but I do not recommend it, as it is quite tricky) and is a lot of work and error prone. And after a restart of mcsMQTT it also recreates some of those root devices (but only the first time??)

    So, here is a suggestion: can we specify a root device/root reference BEFORE the association is being created? So it will create the feature as part of the specified root device? That would solve most of my problems. And is also (partly) a workaround for the current issue where HS4 is unable to move a feature to another root device.

    Thanks for considering!
    stefxx

    #2
    Also, how does the plugin finds the features as part of a CSV type? It seems that as soon as I change anything on the CSV sub-features, they won't update anymore. Just trying to understand how this works. Thanks!
    stefxx

    Comment


      #3
      Good idea for the parent. I will do like I did for the location where the user can select between it being based upon the Topic or a specific user-defined location.

      For CSV and others that have multiple JSON keys that need to be managed specially the Device PED of the associated parent Topic is used to remember the Feature reference numbers. What types of things are you doing that affects the update ability?

      Comment


        #4
        Thanks. That sounds like a good solution!

        About the CSV, that has nothing to do with my changes. It simply doesn't work. When I select "CSV", it creates the features and set the values correctly. But is doesn't update on new incoming messages anymore...

        Something else I noticed, when you remove an obsolete topic from the Associations tab, the feature will also be removed, even if other topics are using the same feature...
        stefxx

        Comment


          #5
          I did the update for the static parent device and also fixed the obsolete device removal issue you pointed out. The only issue I saw with update of CSV data is that the browser needs to be refreshed when viewing the HS devices.html page. I still need to update the manual and HS3 plugin before posting so likely tomorrow morning. As part of the update I decided to move the CSV info into the mcsMQTT database rather than the PED. This provided more flexibility as HS devices and features are manipulated. When using the update be sensitive to any CSV devices you have already setup.

          Comment


            #6
            If you want me to test, let me know. Otherwise I will wait for your update. Thanks!
            stefxx

            Comment


              #7
              Update at http://mcsSprinklers.com/HSPI_mcsMQTT_5_6_4_0.zip for HS4. The HS3 version is also available at http://mcsSprinklers.com/mcsMQTT_5_6_4_0.zip. While retrofitting changes for HS3 plugin makes for a good self-review opportunity it is a chore and takes longer than one would think.

              Comment


                #8
                Hi Michael,

                I am trying to unzip the file on linux. But got this error :

                Archive: HSPI_mcsMQTT_5_6_4_0.zip
                End-of-central-directory signature not found. Either this file is not
                a zipfile, or it constitutes one disk of a multi-part archive. In the
                latter case the central directory and zipfile comment will be found on
                the last disk(s) of this archive.
                unzip: cannot find zipfile directory in one of HSPI_mcsMQTT_5_6_4_0.zip or
                HSPI_mcsMQTT_5_6_4_0.zip.zip, and cannot find HSPI_mcsMQTT_5_6_4_0.zip.ZIP, period.



                I tried to redownload but same result.

                Comment


                  #9
                  I got the same error with the HS4 zip. Seems to be corrupt.
                  stefxx

                  Comment


                    #10
                    The upload stopped in the middle. I restarted it.

                    Comment


                      #11
                      Thanks, the ZIP is ok now. And first testing on the root device seems to work fine. Very happy with it. Thanks!!
                      stefxx

                      Comment


                        #12
                        Works perfect here too for the root devices, thanks Michael

                        Comment

                        Working...
                        X