Announcement

Collapse
No announcement yet.

Payload changed since 5.13?

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

    Payload changed since 5.13?

    Hi Michael,

    Recently, I believe since version 5.13, the mcsMQTT plugin is using the device label instead of the configured payload when controlling a device. For instance:

    Click image for larger version

Name:	Screenshot 2021-01-29 174627.png
Views:	94
Size:	10.7 KB
ID:	1452313

    Aan/Uit is Dutch for On/Off. By using the above VSP list, I would have the HS4 feature using Aan/Uit, while the plugin would use ON/OFF to control the device. Perfect!

    However, now it is sending Aan/Uit to the device using MQTT. Obviously, that doesn't work.

    Click image for larger version

Name:	Screenshot 2021-01-29 175218.png
Views:	108
Size:	4.0 KB
ID:	1452312

    Thanks!
    stefxx

    #2
    $$LABEL: $$STATUS: $$VSP: and $$VALUE: are candidate templates to pick what is published. See if any of these work for you.

    Comment


      #3
      Thanks. Yes, I know. Just wondered why it suddenly changed between versions...
      stefxx

      Comment


        #4
        The change log contains the following.

        PR584 12/29/2020 5.12.0.8 CAPI control labels get text rather than status

        Both HS versions have a bug where the label of a selector is always returned as the first selector entry rather than the label actually selected in the SetIOMulti call. It will, or perhaps has been, fixed in HS4. It will never be fixed in HS3 so I needed to design something that works for both. I also know that the VSP status vs. VSP command text can be different and I had not fully considered the implications. When they were the same it did not matter what assumptions I made.

        Comment


          #5
          Thanks, makes perfect sense!
          stefxx

          Comment


            #6
            Still very happy with the scripting functions. Otherwise I had to change 80+ Tasmota devices (some of them with multiple functions) manually. Thanks!
            stefxx

            Comment


              #7
              I'm glad it helps. Also sorry about the changes that caused you some additional effort. I did update the scripting interface for the changes that have been occurring. Typically additions. The Updater is pretty current now with both the plugin and the docs.

              Comment


                #8
                I can see where default behavior has potential for widespread effect. It seems the $$VSP: and default behavior should be swapped to retain the maximum backward compatibility. Please confirm your scripting edits did use $$VSP: as your solution.

                Comment


                  #9
                  Hi Michael, yes, I can confirm that using $$VSP: as the payload template works for version 5.14.2.0 of the plugin. I've been using this now for 2 days without issues.
                  stefxx

                  Comment


                    #10
                    I did make the swap in http://mcsSprinklers.com/HSPI_mcsMQTT_5_14_2_3.zip. The default template now get it from VSP key and $$VSP: gets it from VSP status. This gives you a chance to exercise that script again. I will be putting it Updater very soon to minimize the overall impact of those that upgrade.

                    Comment


                      #11
                      Thanks. I installed 5.14.2.3 and removed the payload template again. Everything works fine!
                      stefxx

                      Comment

                      Working...
                      X