Announcement

Collapse
No announcement yet.

Newbie Needs Help Configuring Garage Door Status/Control HS3 Object for Arduino

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

  • Newbie Needs Help Configuring Garage Door Status/Control HS3 Object for Arduino


    I am an experienced Arduino developer, with a lot of experienceusing MQTT. But I am relatively new to mcsMQTT (have played with it for 3-4 hours without much success). The mcsMQTT plug in seems to have an incredible amount of flexibility, but I am afraid that that amounts to just a long piece of rope that I'm hanging myself with. Perhaps someone can help or point me to some other online resource (I've been using the mcsMQTT.pdf file thus far, to little avail).

    I have full control over the Arduino end, so I am perfectly willing to setup the MQTT topic and payload values to be whatever will make it easiest for mcsMQTT to use.

    The Arduino app will be a home grown garage door opener control. Very straight forward: 2 status values (Open or Closed), and 2 commands (open the door and close the door). Plus, there are two garage doors. So I need to refer to each individual door as either the Large garage door or the Small garage door.

    I have successfully connected mcsMQTT to my MQTT broker, and have been playing with various topics such as an incoming (to mcsMQTT) topic/payload of "GarageDoor/LargeDoor open" or "GarageDoor/LargeDoor closed" to indicate status, and outgoing (transmitted from mcsMQTT) topic/payload of "GarageDoor/LargeDoor/Control open" to command the door to open, and "GarageDoor/LargeDoor/Control close" to command the door to close.

    I was able to successfully get whatever incoming payload (open or closed) to show in HS3 as open or closed. And I was able to setup a status graphic so show open or closed. But when using the status graphic, the text displayed by the graphic never changed. So that is not acceptible. I was doing this via the Edit Status Text screen under the Status Graphics tab, using 2 "status" entries.

    At other points in my sandboxing work I was able to get two control buttons labeled Open and Close to appear on the main HS3 screen, and when either button was pressed, I saw the MQTT message of "GarageDoor/LargeDoor/Control open" get transmitted.

    But I could not get both status display behavior AND control behavior to work at the same time. Fixing one always messed something up on the other.

    Please help!

    Thanks!

  • #2
    I suspect your difficulty is trying to configure HS with Status/Value info but mcsMQTT is not aware of what you are doing. In mcsMQTT click on the Ref button of GarageDoor/LargeDoor topic that was accepted and mapped into a HS device. This will bring up the Edit tab for this topic/device. Your Control/Status UI should be Button. You should also see two VSP items listed below it of open and closed and these are assigned values of what should be 1 and 0 respectively. mcsMQTT will create all the HS Device entries for Status Graphics tab.

    After you have done this you can edit the Status Graphic HS Device Management page such as separating status and control so that perhaps the status will show Closed and the control will show Close. If you do this it is important to not change the number and do not change the text payload (e.g. Closed) for Status that is received from your Arduino.

    In the mcsMQTT manual I described a garage door controller that accepts desired position of the door from HS or Alexa and then manages the door's pushbutton to achieve this position. In my case I used the inputs that were already available on my garage door that reported the closed and open position contact closure. It has retry logic implemented also when the door does not achieve the desired position. The implementation was with ESP8266 using a modified Sonoff Basic. You are welcome to this, but my suggestion in any case is that you let your micro manage the pushbutton to achieve the desired position rather than using HS logic that assumes it has the correct current position status. This should provide a more reliable implementation.

    Comment


    • #3
      Thanks for this info, Michael. I set the Control/Status UI to Button, and separated the Status Graphics entries so I have 2 entries for "status" and 2 entries for "control". See screen shot below.

      The following now works correctly:
      1. "Open Door" and "Close Door" buttons appear on the HS3 main page and when I click on them, the MQTT message gets transmitted correctly, with payload set to "Open Door" and "Close Door".
      2. If I transmit in a MQTT message with the correct topic and a payload of "Open" or "Closed", the status graphic updates correctly to show the correct open/closed state.

      The only thing that does not work: The text that shows beside the status icon never changes. On the Advanced tab I see that the "String" property is set to "xx" which is what is showing. But I do not see how to change that (it is a read only field on the Advanced tab). How do I get that to change? Am I going to have to use HS3 scripting?



      Click image for larger version

Name:	Image3.jpg
Views:	56
Size:	105.3 KB
ID:	1320107


      The "Advanced" page showing the (read only) "String" property that shows on the screen all the time.

      Click image for larger version

Name:	Image1.jpg
Views:	64
Size:	134.5 KB
ID:	1320105


      And here is my Status Graphics page:

      Click image for larger version

Name:	Image2.jpg
Views:	56
Size:	184.8 KB
ID:	1320106

      Comment


      • #4
        In earlier versions the DeviceString was always set to null when a non-text Control/Status UI was being used and the DeviceValue updated. When investigating efficiency I determined the biggest consumer of the CPU was the calls to HS so I minimized these.

        What I should do is clear the DeviceString when the Control/Status UI is changed from Text. Next release.

        With the version you have you will need to either delete the association which will delete the device and then set it up again now that Button has been selected. Should be easier to run one-line script of &hs.SetDeviceString(121,"",false).

        The other thing you should do is change the VSP values of 2 and 3 so that they are 0 and 1 to match the status values.

        Comment


        • #5
          I setup a script to run as you suggested, and now the text tracks the status icon. So it is all working! Many thanks!

          Click image for larger version

Name:	Image4.jpg
Views:	67
Size:	96.3 KB
ID:	1320132

          Comment


          • #6
            You do not need to run the event based upon a trigger. It only needs to be done one time to clear the string.

            Comment


            • #7
              WARNING!

              There are some safety issues one needs to take into account before automating your garage door.

              The door much all safety features working such as safety beam and pressure sensors incase someone falls under the door. Most doors made in the last several years have all of this.

              You're also required to have both an audio and visual warning several seconds before the door starts to close by any means other than manually when you can see the door. The most common visual signal is to flash lights.

              If you don't have these and someone gets hurt your insurance may not cover you and you could be fined.

              My Liftmaster door has all of these features but the notifications only work with either the auto close on the wall unit or when commanded using their interface. In your case the delay and warning notifications will have to be done by your interface.
              HomeSeer Version: HS3 Standard Edition 3.0.0.531 | Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
              Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
              IP Address: 10.0.2.16 | Number of Devices: 417 | Number of Events: 667 | Available Threads: 399 | HSTouch Enabled: True

              Enabled Plug-Ins: AirplaySpeak: 3.0.0.13 | BLBackup: 2.0.61.0 | EasyTrigger: 3.0.0.65 | LiftMaster MyQ: 1.3.7006.42100
              mcsMQTT: 4.0.2.2 | PHLocation2: 3.0.0.53 | Pushover 3P: 0.0.0.45 | Z-Wave: 3.0.1.262

              Z-Net version: 1.0.23 using a HomeSeer SmartStick+: 6.04 (ZDK 6.81.3)

              Comment

              Working...
              X