Announcement

Collapse
No announcement yet.

Adding control items that are not showing in the association listing

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

    Adding control items that are not showing in the association listing

    Looking for some help in adding some 'control' items to control a Garadget garage door controller via MQTT.

    The control items are not showing in the association listing ((no pink listings) (all green status items are there)).

    I'm looking to add:

    /garadget/{device-name}/command


    Acceptable payloads:
    • open - to open the door
    • close - to close the door
    • stop - to stop the door if in motion
    • get-config - to request the config update posted to config topic (see below)
    • get-status - to request the status update posted to status topic (see below)

    Thanks!

    -Philip

    #2
    I assume that Garadget uses MQTT protocol and that is reports something about position of door on garadget/{device-name}. Note that you have an empty position in the topic with /garadget.

    Continuing the assumption that oyu have associated this status topic with HS. This means you have a Pub Topic that needs to be completed for the commands. As a minimum you will have status reported as something like "opened" or "closed". These will be mapped into HS Device/Status pairs by mcsMQTT with values of 0 and 1 and your Control/Status UI will be button as viewed from the Edit tab.

    If you want to add a control of stop to this then from the Edit tab add a VSP of stop with value of 2. This will create the third button.

    Do the same for get-config and get-status. Get Config sees especially odd as this means there will be something published on a topic that include config informaiton. This config topic is a better place to put the Pub topic for control.

    Comment


      #3
      A picture is worth 1000 words!

      Thanks!

      -Philip
      Attached Files

      Comment


        #4
        Row 214 looks to be your door status. If the A column checkbox is checked then mcsMQTT creates a HS device. The page will then show another text box for Pub: In that text box enter garadget/garage/command

        When you publish the command you want the payloads to be "open" and "close" rather than "opened" and "closed". There are two ways to approach it. One is to use HS Device Management to separate status and control text. This is option 1 described below. The second is to leave the buttons with opened and closed and have mcsMQTT remove the trailined "ed" as it publishes. This is option 2.
        1. The Device Management page of HS allows the Value/Status pairs to be viewed and edited. You should have two entries with "Both" radio on each. Change the Both to "Status". Enter two more rows with values that are the same as the closed and opened values, but select "Status" and use the text you want to show on the button and the text you want to send for the command. This will be "open" and "close".
        2. The Edit tab provides a Payload template text box. You get to the edit tab from the Association tab by clicking the Ref number button or the 214 hyperlink. In the payload template text box enter <<Replace($$LABEL:,"ed","")>> This tells mcsMQTT to use the label that is on the button and substitute null for "ed"

        To extend this to the status request command then follow similar guidance that was provided in post #2

        Comment


          #5
          Hi - Thanks for the direction.

          I was confused as adding garadget/garage/command did not seem to cause any action (I was looking for an OK, Save, etc.). I edit the command directly in HS and direct control of the garage is working!

          Thanks for building this plug-in and for your assistance! Please let me know how I can contribute to the beer/wine/cake fund?

          Best,

          -Philip

          Comment


            #6
            Glad you got it going. The thank you is the reward.

            Comment

            Working...
            X