Announcement

Collapse
No announcement yet.

HS Device VSP List

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

  • HS Device VSP List

    I have a small issue after chaning one of the HS Device VSP List, the edit box have dissapeared.
    What i did , is that i follow the instruction which say "Enter existing text to delete it" , and i saw "0 Off", and therefor inputed Off.
    After that, the input box was gone.
    I have tried to delete the device, but when i recreate it, it seems stuck, since i input the same publish string.
    Here is a picture
    https://www.screencast.com/t/dTudwa2EZ

    Also i wonder, is this directly synced to the actual device. Or is this a static Payload.
    Example, lets say that 0=close , and it will create a button close.
    If i go to the device and change it to Close with capital C, i guess the HS Device VSP will still be 0=close, as long as it follow the value 0 in this case?

    I have 2 other Devices which is identical with this, and those are ok.
    Here you can see one which is ok
    https://www.screencast.com/t/fKldcagNZGrw

    Do you know why the input box have disappeared

  • #2
    Looks like I broke this on a recent update. I will need to fix.

    There is special logic around open and close to maintain symmetry of Open-Close, open-close, OPEN-CLOSE. I will need to research the implications of editing the VSP. This applies to both subscribe and publish.

    For example, assume you subscribe to topic x/y and publish x/y/z for this device. "close" is provided by broker and you have "Close" shown in HS. When you press the "Close" button then the topic delivered, by default, will be "Close". You could have sent "0" rather than "Close". How will those subscribing to x/y/z react to "Close" rather than "close"?

    Comment


    • #3
      VSP Edit fixed in 3.4.0.2. The problem was a duplicate value was stored for two labels and the duplicate has been stored in the database. For your problem device you can either create a new one or you can edit what exists to delete "Off" even though "Off" may not be visible.

      Comment


      • #4
        Thank you for fixing the VSP edit

        Regarding my other question, i was basically just wondering if the VSP and the device value where synced, or if they where 2 different things , so lets say that the plugin create a device with 0=close, and i go to the created device and change the 0 value to Close , will this then change the VSP.

        It was more ment like a question to understand how the VSP and device value belongs together.
        In my case on this specific thing, i need to go trough node-red anyway, and there it doesent matter what it recieves, cause i first send any payload into a switch node, like 0 or close or Close (whatever i recieve from HS) , and then i convert it to json after that as for example {"action":"close"}.
        So i will always send the correct value to the Somfy Tahoma in the end.

        Comment


        • #5
          By the way,
          I installed this update on 2 homeseer, and both seems to not publish any devices.
          I wonder if it is just a Gui issue, because it say 0 of 3 devices on one, and 0 of 21 devices on the other PC.

          https://www.screencast.com/t/QueI6qfWIG

          Comment


          • #6
            VSP is used by HS3 to associate a DeviceValue with displayed text (status) and in some cases with text for controls. mcsMQTT will use the VSP pairings to convert a subscribed payload value to a number that is stored in HS3 when a subscribed topic is received.

            If we take the case of a VSP of {0=Off, 1=On} and the received payload is ON then mcsMQTT will not have a value to assign to ON. The design intent is that a third VSP of {2=ON} would be assigned and the value of 2 stored in HS3 DeviceValue. I did not confirm at this time that this actually occurs. Since ON and On are special cases there may be intermediate logic that is executed to transform ON to On.

            Going the next step and using Regular Expression replacement then a pattern can be defined that will replace incoming ON with On so when mcsMQTT looks up the VSP it will find On and store 1 in DeviceValue.

            In the publish direction the HS3 buttons will be labeled Off and On since that is the VSP definition. If the On button is pressed then the topic will be published and by default the On will be in the payload. If the payload template is used then $$value: could be used to put 1 in the payload because the DeviceValue for this pair is 1.

            There is no Regular Expression provisions for outgoing (publish) data so it is not possible to directly publish payload of ON if the VSP is On.

            Comment


            • #7
              Originally posted by Michael McSharry View Post
              VSP is used by HS3 to associate a DeviceValue with displayed text (status) and in some cases with text for controls. mcsMQTT will use the VSP pairings to convert a subscribed payload value to a number that is stored in HS3 when a subscribed topic is received.

              If we take the case of a VSP of {0=Off, 1=On} and the received payload is ON then mcsMQTT will not have a value to assign to ON. The design intent is that a third VSP of {2=ON} would be assigned and the value of 2 stored in HS3 DeviceValue. I did not confirm at this time that this actually occurs. Since ON and On are special cases there may be intermediate logic that is executed to transform ON to On.

              Going the next step and using Regular Expression replacement then a pattern can be defined that will replace incoming ON with On so when mcsMQTT looks up the VSP it will find On and store 1 in DeviceValue.

              In the publish direction the HS3 buttons will be labeled Off and On since that is the VSP definition. If the On button is pressed then the topic will be published and by default the On will be in the payload. If the payload template is used then $$value: could be used to put 1 in the payload because the DeviceValue for this pair is 1.

              There is no Regular Expression provisions for outgoing (publish) data so it is not possible to directly publish payload of ON if the VSP is On.
              Great, then i understand it, thanks for a good explanation
              Now i only need my devices to be shown in assosiation list
              They are in the database , because when i edit one device in the Edit tab, then i see it have all its value. Just not showing in assosiation tab at all.

              Comment


              • #8
                They are in the database , because when i edit one device in the Edit tab, then i see it have all its value. Just not showing in assosiation tab at all.
                Are you creating a new subscribe topic that has not yet been published by the broker?

                New rows are not added to Association tab until either the page is refreshed or a filter selection is changed. Confirm your filters and checkboxes are correct. Click then unclick something like show only accepted or other master filter checkbox and this will cause the filters to be rebuilt and then the row may appear. In a last resort then restart the plugin. Let me know what should have worked and did not work so I can fix it.

                Comment


                • #9
                  I didnt add any new yet, i just saw that all my 20 subcribe that i had , disappeared after the update.
                  On the other pc i had 3 subscribe, and they are also not showing

                  As you can see, the devices are still showing the topic
                  https://www.screencast.com/t/LjUCVvUF3

                  But nothing is displayed in the assosiation list.
                  https://www.screencast.com/t/jLZj8tBXQKm

                  Comment


                  • #10
                    There is likely a message in the Debug log \Data\mcsMQTT\mcsMQTT_Debug.txt or it even could be in HS Log. Take a look and/or post.

                    Comment


                    • #11
                      mcsMQTT Debug.txt

                      I also attach the log from the second homseeer, but i didnt find the same error there.
                      mcsMQTT Debug from other pc.txt
                      Last edited by frankis78; May 20th, 2018, 03:00 PM.

                      Comment


                      • #12
                        The one you see if from older debug with prior plugin version. The easiest way for me to debug is to recreate your setup with \Data\mcsMQTT\mcsMQTT.db and \Config\mcsMQTT.ini. If you have broker credentials in the .ini they should be removed as I do not need them for debug. Can you post these two files?

                        Comment


                        • #13
                          Ok, here they are
                          mcsMQTT.zip

                          I can tell that yesterday when i updated the plugin, all was still in assosiation list.
                          Only on the latest update, they where not showing.

                          Comment


                          • #14
                            There are three tables in the database and the most recently added did not have protection for quotes in the topic. I added that protection with 3.4.0.3. This should fix your display issue.

                            Comment


                            • #15
                              Thanks, but unfortunately it still doesent display.
                              All is working as normal, and the mqtt is working, but it wont show any assosiations.

                              Comment

                              Working...
                              X