Announcement

Collapse
No announcement yet.

Creating multiple Features within a single Device/Parent on HS4

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

    Creating multiple Features within a single Device/Parent on HS4

    What am I missing?
    I'm trying to create multiple Features under one Device. The new (unassociated) topics already show up in the plugin. I can create a new device for a new Topic without any problem (checking the Assoc box). It creates both the Device (root) and Feature. So how do I create other features under that same Device? Each time it wants to create a new Device/Root pair. I've even created a second "feature" and let it create the new Device (they both show up correctly) then went back into the Feature to change it to the Device I'd like it stored with, and when I enter the other Device, both the new feature and new Device are deleted..
    I've changed the Default HS Parent to an existing HS Device, but the same thing happens when I try to change the Parent device in the Feature..

    What's the magic sauce to do this?

    Thanks

    #2
    The Edit tab has a grouping row. For the feature that you want to put under a different device change the grouping reference to the Ref of the desired parent device. If the prior device parent becomes orphaned because it lost its child feature then mcsMQTT will delete the orphaned parent device.

    Comment


      #3
      That's what I'm doing.

      Using Edit/Add (as well as clicking on the RefID button).. I then enter/replace the old RefID with the one I want it to use, and both the old Device and new Feature disappear from HS4 (curiously the Feature still shows up in mcsMQTT associations page with it's HS4 Device ID #, even though I can't find it anymore)

      So I just unchecked the Topic and the RefID number disappeared.
      I then Clicked on the A checkbox and a new RefID / Feature (3493) was created along with a new Device RefID (3492)
      I then click on the Feature RefID button (3493) on the Association page and replace the Parent ID RefID (3492) with the one I want it to use (3481) (it exists and has one feature within it from a previous A creation).
      Once I enter the new/old RefID into the parent, I'm no long able to see either of those devices (3492/3493) in HS4. (No filters on device management page)

      ??

      Comment


        #4
        It had worked in the past. I will take a look with current versions of plugin and HS4.

        Comment


          #5
          Thanks.

          Comment


            #6
            I do not see an issue with this function. The first two screenshots show the starting point where there are two topics and two device/feature pairs. Edit tab was used to change the grouping so that feature moved to the other device. The result is a single device with two features. How is what I am doing different than what you are doing?

            Starting State:

            Click image for larger version

Name:	Capture1.PNG
Views:	140
Size:	139.9 KB
ID:	1476522

            Click image for larger version

Name:	Capture2.PNG
Views:	128
Size:	98.4 KB
ID:	1476523

            Edit grouping of one of the items from 8542 to 8544

            Click image for larger version

Name:	Capture3.PNG
Views:	120
Size:	58.5 KB
ID:	1476524

            View HS Device page and see single device and two features

            Click image for larger version

Name:	Capture4.PNG
Views:	128
Size:	124.2 KB
ID:	1476525

            Comment


              #7
              That's what I'm doing, but not getting the same results.
              When I enter in the Device number both of the new Device & Feature disappear..

              I've got bigger issues now. I just updated to 5.15.11.0 just in case it was a vers issue (I had the IFCHANGE vers) and I now get this when I open the PI:

              5/27/2021 6:35:59 AM
              mcsMQTT
              Info
              BuildAssociationTableReverse at MCSMQTTHS4_2020.MQTTASP.HistoryCellEntry(MqttReport oMQTTReport, String sIndex) in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\MQTTA SP.vb:line 9998 at MCSMQTTHS4_2020.MQTTASP.HistoryColumn(String sIndex, MqttReport oMQTT) in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\MQTTA SP.vb:line 9861 at MCSMQTTHS4_2020.MQTTASP.BuildAssociationTableReverse() in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\MQTTA SP.vb:line 10411 Line 9998 Object reference not set to an instance of an object.

              Can't see any associated devices now..

              Comment


                #8
                I restored the two bin/mcsMQTT files you sent for the IFCHANGE fix and it's running again... ???

                Comment


                  #9
                  The code sequence for the case of two existing parent devices is shown below. I recognize where where one parent device is deleted, but do not recognize a second delete that you describe. I could add debug, but don't know were it would help. If you have suggestion I will do it. The code is manipulating the AssociatedDevices properties of the two devices and the one feature. The most current version of the plugin is at post #17 of mcsMQTT using 100% CPU forever - HomeSeer Message Board but I do not think the more recent changes affect the grouping.

                  In this code iRef is the Edit tab feature Ref. The aList are it's associations. The bList are the associations of the newly entered grouping ref. The clist is the updated associations for the parent of iRef and the delete occurs when clist has no items. The dictionaries are for association tab display so do not affect hs display pages.

                  Click image for larger version  Name:	Capture.PNG Views:	0 Size:	446.6 KB ID:	1476606

                  Comment


                    #10
                    Let me take a look. Right now I'm trying to get back to a stable vers.. Updating to the new 5.15.11.10 gives me the errors I posted earlier. Still getting this error (haven't determined what I do to make it occur though). Why is it trying to access a non-existent directory, or is that just a error msg reference issue?

                    PostBack 7 I115016422A0=false at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at MCSMQTTHS4_2020.MQTTASP.UpdateParentDisplay(String sSource) in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\MQTTA SP.vb:line 3953 at MCSMQTTHS4_2020.MQTTASP.postBackProc(String page, String data, String user, Int32 userRights) in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\MQTTA SP.vb:line 3537 Line 0 The given key was not present in the dictionary.

                    Does 5.15.11.10 contain the IFCHANGE addition?

                    Thanks,

                    Comment


                      #11
                      The error message is happening as a result of the "A"ssociate checkbox being unchecked.

                      The recent change log from mcsMQTT Plugin - HomeSeer Message Board shows IFCHANGE is in 5.15.12.0. The last zip file link I referenced is for 5.16.0.0.

                      Code:
                      PR662 5/4/2021 5.15.11.0 Add Voice Monkey as means to push to Echo devices
                      PR663 5/4/2021 5.15.11.0 Protect from Broadlink init exception ... [B]in Updater[/B]
                      PR664 5/12/2021 5.15.11.2 Add delay in Voice Monkey actions to assure announcement completes
                      PR665 5/25/2021 5.15.12.0 Added controlUse and DeviceAPI properties to Daikin/Intesis devices
                      PR666 5/25/2021 5.15.12.0 Added IfChange function , $$PREVIOUS: and $$PUBLISHED replacement vars
                      PR667 5/26/2020 5.16.0.0 Added OwnTracks page and MQTT tracking
                      My internet bandwidth no longer satisfies the timeout requirements of the HS Updater or my mcsSprinklers.com host so uploading can only be done for smaller files. Later today I will go into town and upload the Updater package for 5.16.0.0 so provide a full set of files that support the current version.

                      Comment


                        #12
                        Thanks.
                        Once you've uploaded it, I'll try to get a current version running and walk it through step by step, watching the HS4 devices as I create/move/delete them in mcsMQTT..

                        I suspect something else is occurring as the delete code you listed doesn't even support deleting the Feature device. My bin directory for mcsMQTT is full of all sorts of "random" dlls since I had some of the original codebase.. I'll also check my database structure against the current vers as well..

                        Z
                        BTW, Starlink shows service is available in your area.. No limits

                        Comment


                          #13
                          The Updater package is http://mcsSprinklers.com/HSPI_mcsMQTT_5_16_0_0.zip
                          The Source folder snapshot is http://mcsSprinklers.com/mcsMQTTHS4_Source.zip

                          I signed up for Starlink beta and never got the call. I also put in my $99 deposit when first able but no call as of yet. I'm guessing sometime this Fall.

                          Comment


                            #14
                            OK, tracked it down in UpdateParentGroup:

                            Code:
                            If bFound Then
                                  cList.Remove(iRef)
                                hs.UpdatePropertyByRef(iOldParent, HomeSeer.PluginSdk.Devices.EProperty.AssociatedDevices, cList)
                            End If
                            When I check for iRef in iOldParent before and after the UpdateProperty call , iRef is STILL listed, so when you later do hs.deletedevice(iOldParent), it looks like HS deletes the childs as well as the parent.

                            I wonder if UpdateProperty doesn't like cList to be empty? If mcsMQTT selects an existing Parent for related Topics, this won't be a problem, so that may be why it's not prevalent...
                            Can you use UpdateDeviceByRef to remove a single child?

                            Thanks

                            Comment


                              #15
                              Ahh... Once again the sunlight appears.. Looking at a previous post from dcorsus, it looks like it was fixed in 4.1.11.0... I'm running 4.1.10.0

                              Comment

                              Working...
                              X