Announcement

Collapse
No announcement yet.

Question: How are the initial VS Pair values determined?

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

  • Question: How are the initial VS Pair values determined?

    Hi Michael,
    I have two devices that I use for testing purposes. They're Arduino based boards and run the same basic sketch except for the network configuration info, so there are no network communication issues. So other than that they are identical, both hardware and software. They're connected to a breadboard and have an LED and a push button to toggle the LED.

    My initial setup procedure is to have the device subscribe and publish an MQTT message which creates an unaccepted association in the PI. I usually press the button a couple times while watching the received payload to make sure the On and Off payloads are received, then check the accept box, then add the topic the topic the PI device publishes to.

    My confusion comes when the initial VS pairs are created. The values that the PI creates for the second device are backward. I've had to manually edit the VS pairs and flip-flop the status text, control use as well as the graphic values. Please see the attached screenshots. So when the PI receives On it sets the device value to 0 and Off to 1. Kind of weird right? Shouldn't the Off text be translated to a value of 0 and On to 1?

    It's easy enough to fix by editing the VS pairs manually but for some reason, the PI is sending reversed values to HS.
    Attached Files

  • #2
    When the list type was added a more general approach was taken for VSP. It keeps track of each text payload received up to a max of twelve different text values. When a topic is accepted then it makes an assessment of what VSP UI seems best.

    There are still case-insensitive On, Off, Open, Closed. If one or both of the pairs is found then it is suppose to associate Off and Closed to 0 and the other of the pair to 1 and use a Button UI for control is the publish topic is entered. I take it that that is not happening, but is assigning values based upon the order in which each was received. I will look at this.

    If there was only one text value seen then it will try to form a mate for the special words.

    If it is not a special word then it will assign values based upon the order the payload text was received.

    Comment


    • #3
      I looked into it and see that I was only doing it for the case of just one of the two in the pair was received. I update in 3.2.16.1 to do it also for case that both are received.

      Comment


      • #4
        Thanks, works perfectly

        Comment

        Working...
        X