Announcement

Collapse
No announcement yet.

VSP Management

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

    VSP Management

    When mcsMQTT associates a topic to a HS device it uses the Control/Status type on the Edit tab to know which HS device UI it should create. If there is a publish topic then it will setup a UI that includes Control. The Button and List types create Value Status Pairs where each text pattern received in the payload is assigned an unique integer. The text/number relationships can be viewed and edited on the Edit tab.

    The same text will be used for the control such as label of a button and the status reported for a device. If this default setup is not adequate then edits can be made on the VSP tab in Device Management. For example, if the text in payload is OPENED and the desired button label is OPEN then change the line OPENED such that it is status only rather than both. Add a new line with text of OPEN and control only. The same numeric value is used for both OPEN and OPENED.

    Once manual edits are made then no further changes can be made in the device properties for this device in mcsMQTT Edit tab. This is because HS made it only possible for s plugin to write VSP so a plugin does not know if a used manually changed them.

    if the MQTT topic reports only two states of OFF and ON, but you would like a control to also have a TOGGLE then there are two ways to accomplish it. One is to extend the above example to add a line that is control only with text TOGGLE and another number different that that used for ON and OFF.

    The second way is to perform the VSP change on the mcsMQTT Edit tab by adding TOGGLE there. Look at the tool tip for the syntax of adding VSP. It will not matter that it also defines a status for TOGGLE because the MQTT topic will never report a TOGGLE state.

    in the publish template the substitution variable will be either $$VALUE: or $$STATUS: depending upon desire for the text or the number from the VSP relationship to be published in the payload.
Working...
X