Garage Door/Gate Controller

Bhadre access controller is a smart controller that can be used for controlling and managing access to any restricted or public areas. The restricted areas can be a house, office, building, garage doors and gates, or anything similar. It can also be a private parking lot of an apartment complex or office. Public areas are public parking lots (paid or free), public transportation systems, cinema halls, GYMs, caravan parks and so on. WifiSecureAccess access controller can be integrated with any of the existing controller. With this integration, one can also use Google Home, Google Nest, Google Smart Home or Amazon Alexa to operate the door/gate. The doors/gates can be operated from anywhere remote. One can also know the current status of the door/gate (whether open or closed) from remote. Notifications can be configured to send if the door/gate remains open for a long time. If it is a garage door or gate, one can configure AutoClose such that the garage door/gate gets automatically closed after a pre-configured delay. Multiple users can be authorized to open/close the door/gate. The owner of the controller can revoke this authorization any time. It is also possible to configure the door/gate such that the authorization gets automatically revoked after a date/time. In addition, one can configure open and close times such that only between these times the authororized persons can access the door/gate. It is also possible to set authorizations such that some people are allowed to use only during some specific time period on pre-configured days of the week. Two factor authentication such as pin or face recognition can also be optionally configured in places where high securtity is required. Entry to a public place can also be controlled based on age, gender or citizenship. When used for paid parking lots, public transport, or cinema halls, entry fees are charged automatically and debited to their credit card using Stripe system. Booking a place or holding a place in public places such as cinema halls and parking lots are also possible. This documentation describes how the smart controller can be installed and how the smart device can be configured to meet all the needs.

1  Controller unit

For controlling a gate or a garage door, the controller used is this one with the details shown below. It is a small unit with dimensions 53mmx53mmx25mm. It has a USB-C power port and a 2-pin JST socket to use a JST cable to wire it to garage door/gate.
Fig 37: Gate Controller Version 5

In this document, we will describe how this controller can be installed on a gate or a garage door that has either a manual push button to open/close. This controller can be used only with gataes and garage doors that have manual push buttons to open and close. Some of the gates may have two push buttons - one for opening and another for closing. This controller can be used with all such garages and gates rregardless whether it has just one push button or separate push buttons for open/close. Before we get to wiring this to the garage door or gate, we will power it ON and do an initial configuration.

2  Applying Power to the Controller

The gate/garage door controller takes 5VDC power through its USB-C connector. So, use a USB power adapter and cable it to the USB-C connector of the controller using a USB-C cable.
Fig 61: Gate Controller board (Apply power using USB-C cable to the USB-C connector)

The Door/solenoid controller takes 12VDC. You need to use an external 12VDC power adapter and connect the two wires of that to the two terminals marked GND and 12VINof the J6 (green) connector of the controller.

3  Initial Setup and Configuration

In order to use this garage door/Gate controller, the controller has to be configured. This initial configuration can be done either before or after cabling it to the garage/Gate. However, we recommend that you do this initial minimum configuration of this controller prior to wiring this to your garage/gate. Click here to see the instructions on setting up and configuring this controller.

4  Integrating Smart controller to existing garage doors or gates

Before we try to wire this controller to gartage door or gate, have a look at the inside of the controller and its various connectors and components. If need arises, the controller can be opened by using a flat screw driver as explained earlier in section 2.1 above. It is very rarely that you will find a need to open its box. For garages and gates with single push button for both opening aand closing, there will never arise a need to open its box. You can use a flat screw driver to open the box as shown in the pictures below.
Fig 12: Opening the controller box



Pictures below show all the connectors and the labels on each connector. These will help when cabling and installing the controller.
Fig 38: Gate Controller board

In order to integrate the smart controller to your garage doors or gates, you need to locate the two terminals of a manual push button on your existing garage door controller. There are plenty of manufactures of garage doors and gates and, therefore, the controller of those garage doors and gates can come in various designs. However, all of them will have a manual switch (push button) to open/close. This switch may either be located on the PCB of the garage door controller, or it may be mounted on the wall or elsewhere in the garage. On some garage door/gate controllers, you may find two terminals on a terminal block on the main controller marked as 'Push Button'. Here are some example pictures:

Fig 39: Cabling Controller to the Gate/Garage Door




Fig 40: Garage Doors and Gates


Fig 41: An example of a terminal block on the back of a garage door controller


Fig 42: Another view of an example of a terminal block on the back of a garage door controller


Here is another garage door controller from another manufacturer:
Fig 43: Another view of an example of a terminal block on the back of a Glyderol garage door controller

Or, in some cases, you may find a push button on the wall.
Fig 44: Cabling controller to the manual push button of the Gate/Garage door

You can cable the smart controller to either the push button terminals on the main controller, or to the two terminals inside the push button on the wall. Test manually before cabling the smart controller to the push button terminals to confirm that this is compatible. To test it manually, short between the two terminals using a bare wire. You should be seeing the garage door either opens or closes. If so, this is compatible to the WiFiSecureAccess smart controller

If the garage door/gate is compatible, cable the WifiSecureAccess smart controller to the push button terminals of the garage door. Cable COM and NO terminals of the J2 connector of the WiFiSecureAccess controller to the push button terminals of the garage door/gate controller. Mount the controller anywhere convenient, preferably close to the pushbutton terminals (either on the wall, or near the terminal blocks on the garage controller).

Gates with two push buttons - one for Opening and another for Closing

There are some gates with two separate manual push buttons - one for opening and another for closing. In most of those cases, the gate's controller usually closes the gate automatically a few seconds after it is opened. In those cases, smart device needs to be cabled to the Open terminals of the gate controller, as closing is done automatically a few saecond after opening.
Fig 45A: Cabling of the device to a gate with two push buttons

However, if you want the smart device to open as well as close that type of gate, the cabling of the smart device to the controller of that gate has to be done differently. To interface the WiFiSecureAccess smart device to that type of gates, you need to install two normally open Single Point Single Throw (SPST) switches on those gates. One is to be installed such that the switch closes and conducts when the gate is in fully closed position. Another SPST switch is to be installed such that it closes and conducts when the gate is in fully open position. Then cable the WiFiSecureAccess smart device through these two SPST switches as shown in the figure below. In this figure, the picture of the gate controller board is from the installation manual of a Lift Master gate available in USA. For any other similar gates, look for these Open and Close terminals on its controller board.

Note: For this to work, the parameter 'Separate ON/OFF Button' must be set to 'Yes' in 'Ports and Security' menu under Devices Admin in Dahboard.
Fig 45B: Cabling of the device to a gate with two push buttons

5  Installling Magnetic Sensor on garage doors or gates

Next, install the magnetic sensor. This is optional. If you install this sensor, you can know from remote whether or not the garage is currently open or closed. This will also help sending alarm notifications. Install the sensor at a convenient position on the garage door such that the distance from that to the WiFiSecureAccess controller is not too long. Install as per your convenience such that the two parts (A and B) of the sensor align themselves (within 10mm space between them) when the garage is closed. If you can fix them such that the gap is around 1cm, that will be much better. If the gap is longer, there can be instances that it can read incorrect position of the garage door. Fix the part (Part B) with the cable on the fixed frame and the other one (part A) on the moving frame of the garage. The following are some pictures that will help you install this. Note: Both the parts of the magnetic sensor have double-sided mounting tape at their back. So, you can mount it anywhere convenient, and no screw is required.

Fig 46: Magnetic switch on the garage door


Fig 47: Two parts of a magnetic switch


Fig 48: Installing magnetic switch


Fig 49: Installing Garage Door Controller


Fig 49A: Installing magnetic switch (another example)

Then cable the sensor to D7 of the smart device (with one terminal of the sensor D7 and the other terminal to GND on the smart device).

After installing the sensor, you need to test if it is working properly. In section 3.7 of this documentation, you will see how to check if the sensor is currently ON or OFF (Refer Fig 114). The sensor must be ON when the garage/gate is closed and OFF when it is open.

PS: In order for it to use the sensor to detect the current position of the door/gate, not only that you have to install the sensor, but also you have to et the field "Door Sensor Connected" in the menu 'Ports and Security" under Device Admin in the Dashboard (Ref section 3.14 of this documentation).

After installing and testing the sensor, you need to enable at least one of the two notifications so that the controller will use it. Section 3.14 of this documentation tells you how to enable the notifications. If you do not enable any one notification, the controller will not read the sensor. If it does not read sensor, and if you open or close the door either manually, or by using any other remote, the controller will not know it and whatever it reports may be out of sync. So, to use sensor, not only that you have to install the sensor, but also must enable at least one notification. Even if you do not want any notifications, you can let it sound buzzer at least once when it stays open for a long time ( say 5 minutes). Refer 3.14 of this documentation for enabling it.

Note:The doors, garage doors and gates can be operated even without the sensor. As mentioned earlier, the sensor helps in knowing the current position of the garage door (whether open or closed) from remote accurately. You can also enable sending notifications if the garage remains open for a long time. Sending notifications are possible only if the sensor is installed.

6  Integrating with a Boom Gate or any similar gate

If this is a parking lot, or any public access place with a boom gate or any similar gate with its own controller, WifiSecureAccess controller can be integrated with it. Most of those boom gate controllers will have a manual push button terminal to manually operate the gate. Either a push button is already connected, or one can connect a push button to it. If so, by pushing that push button, one can open or close the gate. Once you locate those two terminals of that push button, you can cable the RELAY terminals COM and NO of the WiFiSecureAccess controller to those two terminals of the push button. That is all what is needed to integrate WiFiSecureAccess controller to a boom gate or any similar gate with its own controller.

Fig 50: Boom gate and other access gates

You need to interface WiFiSecureAccess controller to every gate of the public place or the parking lot. The controller can be installed anywhere secure so that nobody other than the owner can access it. Then, run cables from that to the boom gate controller. It is important that WiFi is available at the location where the controller is installed. Install the scanner (or just the QRCode or NFC tag) anywhere convenient for the public to scan when entering the public place or parking lot. You can print additional QRCode, if you want, as per the instructions given in the next section of this document. If you are installing the scanner instead of just QRCode or NFC tag, and if you want the LED and buzzer of that to be active, then it has to be cabled to the WiFiSecureaccess controller using the flat cable that came with the unit. However, the length of that cable is only 1.5 meter and is not advisable to extend it. So, if you want the scanner to be cabled to the controller, the controller has to be near the scanner. The pictures below show how the WiFiSecureAccess controller can be cabled to a boom gate.
Fig 51: Cabling Relay of Smart Device to Boom Gate

Fig 51A below shows a typical cabling diagram for a Magnetic Autocontrol barrier boom gate. Magnetic Autocontrol is one of the available barrier boom gates used by customers. For any other make and model of boom gates, refer to their User Manual to find the trigger points to connect the device to.
Fig 51A: Cabling Device to Magnetic Autocontrol Barrier Boom Gate

7  Enabling Sensor, Enabling Notifications and Setting Duration to keep the Door/Gate open

As mentioned earlier, installing and enabling sensor is optional. However, without the sensor enabled, the current position of the door/gate (open or closed) that you see in the app or a browser may not be correct. If you also operate the door/gate either manually or by any other remote control, or if someone keeps the door/gate open, WiFiSecureAccess system will not know about it unless the sensor is enabled. So, in the absence of the sensor, what you see as the current position (open or closed) on the app or browser may not be correct.

Also, in order to send notifications, or to sound buzzer when the door/gate stays open for a long time, you need to install the magnetic sensor on the door/gate and cable it to the smart controller as explained earlier in section 2.7 of this documentation. Check if the sensor is working before enabling notifications. You can see whether the sensor is currently ON or OFF by clicking 'Device Details' under Device Admin in the dashboard menu (refer Fig 114). Check if it reads ON when the door is closed and OFF when door is open (or, vice versa depending on how you installed the sensor). If it is not working, check if the gap between the two parts of the sensor is within 10mm when they come close (closed position of the door/gate). Also, check the cable and connections.

Installing sensor on the door/gate is also required if you want to know the current position of the door/gate accurately from remote.

If you have installed sensor, check and make sure that D7_type in the device configuration is selected as "TWO STATE ON/OFF". To do that, click on "Configure Device" under Device Admin in the dashboard menu. That will open a page as shown below.

Fig 125: Configure Notifications

On this page, you should be seeing D7_type as TWO STATE ON/OFF. If not, select it as TWO STATE ON/OFF and press submit.

On this same configuration page (Fig 125), you can set the fields for sending notifications. Notification Email field shows the email address to send email notifications. By default, this is set to the email address of the owner of this device. You can change it to any other email address, if you want. If this email field is left blank, no emails will be sent.

The fields Notification Webhook URL is the URL of your webhook to which a call will be made when conditions are met to send notifications. Webhook key/token is the key or the token of your webhook. You may enter those in these two fields, if you are interested in making such calls to send notifications. If the Webhook URL is left blank, it will not make any such calls to webhook URL. The call is an HTTP POST call with the key token in the header ('Authorization': webhook_key), and with some data in the body in JSON format. The data will have the device name, sensor_name, current value of the sensor, and a message. The following is the type of call that will be made:

HTTPS POST call
url: The Notification webhook URL configured
headers = {'Authorization': webhook_key, 'Content-Type': 'application/json', 'Accept': 'application/json',}
data = {"controlDevice": control_device, "sensorDevice": sensor_device, "sensor": sensor_name, "message": msg_webhook, "currentVal": current_value, "limitSet": limitVal, "msg_code": msg_code}
requests.post(notification_webhook, data=json.dumps(data), headers=headers)

Next, the notifications have to be enabled such that it sends notifications when the garage door stays open for a long time. It is also possible to configure it to sound an alarm (buzzer) either once or repeatedly when the garage stays open.

To enable notifications, click on Configure Auto Controls under Device Admin in the dashboard menu. That will show you a page similar to the following.

Fig 126: Enabling Notifications

On this page, you will see three rows of controls. The first row is about auto close. A garage door or gate (other than parking gate) is assumed to be not in AutoClose by default. In other words, they do not close by themselves after opening. A door or a lock (electric strike or magnetic lock) is in AutoClose mode by default. In other words, the voltage applied across it will be remove a few seconds after it is opened. The field 'Duration to stay active' in the first row of controls on this page is the duration the actuator should be kept energised when opening. You can set it to anything that you like. This value is ignored when it is controlling a garage or gate which are not in AutoClose. More about that can be found in the next subsection of this document.

To send email notifications or to send a webhook call when the door/gate stays open, you need to set the next two rows on this page. The last row on this page is the setting for sending emails notification. To enable email notification, click on 'Sensor Port' in the last row of this page and select 'D7 ON/OFF'. Then set the delay time. This is the time it will wait to send notifications or to sound buzzer since the garage was opened. If you want the notifications to be sent periodically when garage stays open, you can also set the 'Repeat Time Period' in seconds.

Similarly, if you want the buzzer to sound, you can select 'Sensor Port' as 'D7 ON/OFF' for the row corresponding to BUZZER (last but one row in Fig 126). Here also, you can set the delay time and time period of the alarm as you desire. Note that, normally the defaults will work.

Selecting 'Sensor Port' as 'None' will disable that notification. That will also disable reading the sensor, and the current status of the door that it reports may not be correct.

Note: It is important to enable any one of the notifications (either sounding buzzer or sending email) for knowing the current position of the door/gate accurately from remote. This is because the sensor is read only if any one of the notifications is enabled.

Special Note: On this page of Auto Controls (Fig 126), you can see a field "Activate when sensor is". This is by default "OFF". Do not change this if the sensor is installed as described earlier with two of its parts (A and B) aligning themselves (they come next to each other) when the door/gate is fully closed. In fact, that is the best installation for a garage door. However, there is a less desirable option of installing the two parts of the sensor such that they align themselves when the door/gate is fully open. If you install the sensor that way, this field "Activate when sensor is" has to be set to "ON". We are not recommending this installation because it may report that the door/gate is closed when it is half open.

8  Configuring Auto Close for gates and garage doors

By default, garage door will not close by itself after opening. So, you will have to manually close it any time after opening it. With WiFisecureAccess smart controller, it is also possible to configure auto-closing of the garage door. For example, say, you want the garage door automatically closed 2 minutes after it is opened. This can be done by appending a word AutoClose in the port label of the port of the smart device connected to garage door controller. To configure this, click on 'Configure ports' under Device Admin in the dashboard menu. Then change the name of the relay1 Label from 'GARAGE' to 'GARAGE AutoClose'. Then press submit.

Note: The word AutoClose is a single word, case insensitive.

Fig 127: Setting AutoClose


Next, you need to set the duration for which the garage door should remain open before closing it automatically. Click on Configure Auto Controls under Device admin in the dashboard menu. Then in the first row, change the value of 'Duration to stay activated (sec)' to whatever you prefer. If you want the garage door to remain open for 2 minutes before closing, then set this to 120. Press submit.

Note: This first row of control on this page has no effect if AutoClose is not set. The field 'Duration to stay active' is used only if AutoClose is set. So, if AutoClose is not set, The value in this field can be anything other than 0.
Fig 128: Setting AutoClose Duration



Note: The duration is the time since you press the button to open the garage and not the time since the garage door comes to a full open position. So, make sure not to set this duration lower than the time needed for the garage/date to come to a full open position.

With the above configuration with AutoClose, the garage will automatically get closed two minutes after it is opened. With this autoClose in place, suppose that you want to keep the garage remain open anytime after you open it, you can use either Google Home or alexa, and say 'Hey google, Open *name of the device* during the time the garage is open. So, if you try to do so during the period when the garage is open (when in autoclose mode), it will cancel autoclose and will stay open. You can also do this by activating the device using the app when the door/gate is in open position. Then, if you want to close the garage, you can say "Hey Google, Close *name of the device*". Or, alternatively, activate the device using the app. This is a special handy feature of our smart device that you can configure and use.

PS. Make sure that the firmware of the device is 4.5 or above to get all the latest features of AutoClose. Update firmware if current firmware is less than 4.5

PS. It is assumed that the cabling of the smart device is to the push button terminal of the garage door controller. Therefore, the smart device applies a pulse to it for opening or closing. If you are using it for opening a gate where it needs anything other than a pulse, this AutoClose feature will not work. Please contact us for any help

9  Configuring Scheduled Actions or Additional Automatic Controls



After the initial configurations, if you are interested in configuring additional automatic controls such as openong or closing the garage/gate automatically regularly at some time of a day or a week, refer to this document


10  Monitoring a Device in Real Time

Access through any door or gate can be monitored on real time by the owner of that device. When minitoring on a browser window, it will display whenever a user opens or closes that door or gate. To monitor, click on 'Monitor a Door' under "Devices Admin' in the Dashboard menu. It will prompt for the device name. Select it from the pulldown menu. Only those devices in parking_lot/Public place and those in access control mode with assigned device group will be seen in the pulldown menu. Once selected, it will open a browser window. The window will be empty initially with just a title displayed. If you keep this window open, you can see a new line appearing whenever a user either opens or closes that door/gate connected to that device. You will also hear a beep sound whenever that happens. This window will display the email address of the person who opens/closes the gate. If this is a parking lot, it will display the Vehicle registration number. It will also display whether this is an entry or exit. The display also has a count at the top showing the number of users in that place since you started monitoring. This number is the toal number entered minus the total number that exited. If this door/gate is an entry gate only, there will not be anyone exiting it, and vice versa. However, if this gate is for entry as well as exit, the total number displayed is the total entered - total exited. Opening a door/gate from remote will be displayed as Entry/Exit and will not be counted in the number displayed.