WiFiSecureAccess Access Control System

1  Introduction Last updated: 2021-10-20

WiFiSecureAccess 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), 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 or 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 notifications 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 authrorized persons can access the door/gate. It is also possible to set authrorizations such that some people are allowed to use only during some specific time period on pre-configured days of the week. When used for paid parking lots and 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.


Fig 1: Controller.

This smart device can be purchased either from eBay or from Amazon. It will be available through other sources in the future. Search for WifisecureAccess in eBay or Amazon.


Buy Now


2  Installation of Hardware

In this section, we will describe how the access control system can be installed on your door or gate using WiFiSecureAccess access controller.

2.1  Proposed Installation of WiFisecureAccess controller on a door

The picture below is the proposed installation diagram of wiFisecureAccess controller on a door with electric strike of magnetic lock. The components of installation are 1) WiFisecureAccess controller, 2) Scanner (optional), 3) Electric strike or magnetic lock, 4) Magnetic sensor (optional). The scanner and the magnetic sensor are optional and they may be installed only if you want their features.

Fig 53D: Fitting Controller on Door

Scanner is used only if you want to scan either the QRCode or NFC tag using a smartphone to open the door or gate. On the other hand, if you are going to use only either the GoogleHome or Alexa, or the 'Activate a device' button on the WiFiSecureAccess App on your smart phone, you do not need to install the scanner. If you are installing scanner, install it outside the door as shown in the picture above. The controller has to be installed on the inside of the door for security reasons. Connect the scanner to the controller using the flat cable that comes with the controller when you buy it. Connecting the scanner to the controller is also optional. If you connect the scanner to the controller, the LED and buzzer on the scanner becomes active and will show the same status as those on the controller. In addition, scanner can be used to apply power to the controller from outside in the event of a power failure as explained later in section 6 of this document. In addition, if the WiFi in the house/building fails by any reason, and if you are locked out, you can still open the door by doing a factory reset of the controller by using the scanner, and then using the hotspot of your smart phone. this is also explained later in section 6 of this documenation. If you do not want these features, you need not cable the scanner to the controller. Also, if you are using only GoogleHome or Alexa to open/close the door gate, and not using any other method, you do not have to intall the scanner on the outside at all.

The magnetic sensor is also optional. That helps the controller to know the current status of the door whether it is currently open or closed. This also helps in sending notifications and sounding alarms when the door remains open for a long time. If you do not want these features, you need not install the magnetic sensor.

2.2  Installation of an electric strike on a door

To install keyless entry using WiFiSecureaccess contoller, you need to install either an electric strike or a magnetic lock on the door. You have to choose the right kind of electric strike or magnetic lock that fits on your door frame. This part does not come with the wifisecureaccess controller, as the type of electric strike or magnetic lock that you need depends on your door frame and your personal likes. These are available to buy from Amazon or from any other sources you prefer.

Fig 53-0: An Electric Door Strike

If you have already installed one, and if its voltage rating and current rating matches with our device's solid state switch, you can connect this device directly to that actuator (or electric strike). If you do not have one fitted on the door yet, we recommend purchasing one and installing it. There are various types of electric strikes available. You can buy them from Ebay or Amazon. Given below is a link to an electric strike in Amazon. This is a Fail-Secure type. We recommend using a 'Fail Secure' type of an electric strike on the door, even though 'Fail Safe' type can also be used. If you are using 'Fail Safe' type, do the cabling as per Fig 18B. Listed below is just an example. You can search in Ebay or Amazon for Fail Secure Door Electric strike.

(If this link is broken, search for 'Fail Secure Door Electric Strike' in amazon.com
Buy Now

Fig 53 shows a picture of an installed door strike. You can search in YouTube for installation guides for installing an electric strike. Alternatively, you can get this installed by a tradesperson. Once the door strike is fitted on the door, install the smart device behind the door inside the house so that it is secure. Fix it on the wall or anywhere conveniently closer to the door.

Fig 53: An Electric Strike fitted on a door

Fig 53A: Installing an Electric Strike on the door

2.3  Installation of a magnetic lock on a door

If you prefer to use a magnetic lock instead of an electric strike, you can do so, if your door is suitable for that.

Fig 53-1: A magnetic Door Lock


This is also available to buy through eBay or Amazon. Given below is a link to buy from Amazon. Note: These are just examples and not necessarily our recommendations. You can buy any similar product so long as its voltage and current ratings match with our controller (12VDC, 500mA).

(If this link is broken, search for 'Magnetic door lock' in amazon.com
Buy Now

Fig 53B and Fig 53C show pictures of installation of magnetic locks on doors.
Fig 53B: Installing a magnetric lock on the door

Fig 53C: Installing magnetric locks on double doors

2.4  Cabling electric strikes and magnetic locks to the controller

The following diagrams show how to cable the electric strike and magnetic lock to WiFiSecureAccess controller.

Fig 17: Cabling of 12V External Loads to Smart device


Fig 18: A sample cabling of a solenoid

If you have a higher power solenoid with current rating higher than 500ma, then you need an external power supply to match the current and voltage rating of the solenoid. If so, do the cabling as per Fig 18A, 18B and 18C. The cabling is done to the RELAY of the smart device. The relay terminals (COM and NO) have 10A current rating. It can take voltages up to 240V.
Fig 18A: Cabling a Solenoid through relay of the Smart Device (Normally OFF)

Fig 18B: Cabling a Solenoid through relay of the Smart Device (Normally ON)

Fig 18C: Cabling a HigherPower Solenoid to Smart Device


2.5  Installing magnetic sensor on a door

You can install a limit switch or a magnetic switch on the door such that it closes when the door is closed. Here is a picture of the sensor installed on a door.

Fig 55A: Magnetic Sensor on a door

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).

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 enable either one of the notifications (either buzzer or email as per section 3.14 of this documentation).

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

2.6  Integrating Smart controller to existing garage doors or gates

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 2_0: Garage Doors and Gates


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


Fig 2A: 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 2B: Another view of an example of a terminal block on the back of a garage door controller

Or, in some cases, you may find a push button on the wall.
Fig 2C: Another view of an example of a terminal block on the back of a garage door controller

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 is compatible, cable the WifiSecureAccess smart controller to the push button terminals of the garage door. Refer to Fig 1 to see which wire from the smart controller is to be cabled to the push button terminals. Mount the controller anywhere convenient, preferably close to the pushbutton terminals (either on the wall, or near the terminal blocks on the garage controller). Note: The controller unit has a double-sided mounting tape at its back. So, you can mount it anywhere convenient, and no screw is required.
Fig 2D: Cable Smart device to the push button terminals of the existing garage door controller

2.7  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 2E: Magnetic switch on the garage door


Fig 2F: Two parts of a magnetic switch


Fig 2G: Installing magnetic switch


Fig 2F: 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).

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 enable either one of the notifications (either buzzer or email as per section 3.14 of this documentation).

Note:The garage door 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. The following pictures show the inside cabling of the WiFiSecureaccess smart controller.
Fig 2H: Inside view of the Garage Door Controller

Fig 2I: Inside view of the Garage Door Controller

2.8  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 2J: Boom gate

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 convinient 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. You can also buy another NFC tag and associate it with this controller and install that tag at the entry, if you prefer so (Described 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 contriller 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 2A: Cabling Relay of Smart Device to Boom Gate

Fig 2B: Cabling Relay of Smart Device to Boom Gate

2.9  Installing an ultrasound sensor in a bay in parking lots to detect a vehicle

When used in parking lots, need may arise to detect if a vehicle is parked in a bay. Ultrasound sensors can be useed for this. This is optional. HC-SR04 Distance Transducer Sensors can be cabled to WiFisecureaccess controller, and that will help the controller to sense if there is a vehicle parked in a bay. This sensor is available for purchase, and it does not come with WiFisecureAccess controller. These sensors are low-cost sensors which are readily available in the market. You will find them on ebay and amazon. Here is a link from Amazon.
Note: This is just one link to show the type of sensor. We are not recommending to buy this. You can search and buy this from any supplier of your choice.

(If this link is broken, search for HC-SR04 in Amazanon.com)
Buy Now

Figure 22 shows how to connect this ultrasound sensor to WiFiSecureAccess controller. Use connector PJ3 on the smart device. This connector has four pins (GND, D1, D6 3V3). Use a flat cable to connect D1 to i'Trig', D6 to 'Echo', GND to GND and 3V3 to VCC as marked in Fig 23.

Fig 22: Cabling Ultrasound Sensor


Fig 23: Ultrasound Sensor

Installation of ultrasound in each and every bay of a parking lot is optional. To install an ultrasound sensor at each bay, you also need a WiFiSecureAccess controller at each and every bay. You need to install this only if you want to detect if there is a vehicle parked in each bay. If installing In a parking bay, install the sensor in the bay at convenient location so that it senses when the vehicle is parked.

Refer to section 5.2 for configuring the WiFisecureAccess controller to enable the use of ultrasound sensors connected to it.

2.10  Applying Power to the Controller

The controller can take either 110VAC power, or 240VAC, or 12VDC power. Depending on what power is available at the location where you are installing the controller, you connect any one of the popwer source to the controller. Fig 2I shows the internal connectors within the smart controller. The controller comes with ac AC cord cabled to the 110/240VAC connector within the device, and the internal jumper set to 110/240VAC. So, if you are using either 110VAC or 240VAC, you do not have to do anything internal to the box. Just connect the power plug of the controller to an AC socket on the wall. However, if you want to use 12VDC power instead of the 110/240VAC power, you have to open the plastic box of the controller and remove the AC power cord. Then connect 12VDC to the 12VDC connector shown in the above picture. If you do so, place the jumper between DC and the middle pin. Refer to Fig 2I to identify the appropriate connector and jumper.

Once all the installation and cabling are completed, power on the device by plugging its power cord to a 110/240VAC socket (or 12VDC, if you have re-cabled the device for 12VDC power).

3  Setup and Configuration

In this section, we will describe how to set up the device and how to configure it so that it works as per your requirements. Before you procced with the steps in this section, connect power to the controller as per section 2.10 of this documentation.

3.1  Setting up the App on your Smart Phone

If you have not downloaded the wifisecureaccess app yet, please download it to your smartphone now. Search for wifisecureaccess in either Apple Store or Google Play store.

App Store Icon Google Play Icon

Once downloaded, open the app and press Admin Dashboard. It will prompt you to enter your username and password to login. If you have not registered yet with https://wifisecureaccess.com, press 'Create NEW Account' button on this page and register.
Fig 3: App's opening page

Fig 3A: Login Page

Fig 3B: Register (Create a new account)

Follow the prompts and instructions. It needs your email address as user name. You need to set your password. first name, last name and telephone numbers are optional. Password must have at least 8 characters (maximum 20 characters) and it must contain at least one lower case letter, one upper case letter, one numeric. The system will prompt you for your email verification. The system uses email address as your username. It also uses it to send notifications of events in the device, if you have configured the device to send you notifications.

The other two fields "Enable Two Factor Auth' and 'Timezone' will be defaulted to 'No' and 'US/Pacific' respectively. You can enable Two Factor Authentication by selecting 'Yes' for this field, if you want to. When selected 'Yes', a confirmation code will be sent to your email whenever you try to login. This is an additional layer of security for your account. The timezone is your timezone. Select it from the pull-down menu. The default is US/Pacific. Setting this to your timezone will help the system display the times of all your activity in your local time. All these parameters can be changed any time later by clicking 'My Profile' under 'User Admin" in the Dashboard.

If you are using a smart phone to register, you will see a page similar to Fig 3C. Or, any time in the future, if you open the app and click on the Admin Dashboard, the same display will be shown. You will notice that all the admin menu is collapsed. To see the admin menu, click on the three lines at the top right corner of this page as shown in Fig 3C and 3D.
Fig 3C: Dashboard Menu on Smartphone (collapsed)


Fig 3D: Dashboard Menu on Smast Phone

3.2  Setting WiFi of the Device

There are two ways of setting the WiFi of the device

  • Using the hotspot of your smart phone
  • Setting the device as a web server and using a browser (Chrome preferred) on your computer or smart phone. Refer to section 3.5 of this documentation for this method.

Using the HotSpot on your smart phone

If this is a brand new device, its WiFi has been factory reset to the following:

So, when the device is powered ON, it is trying to join this WiFi. Therefore, in order to initially connect to WiFi, you need to setup a mobile hotspot on your smart phone temporarily to this SSID and password so that the device gets connected to internet which will enable you to change its WiFi. Note: (The device is not capable of 5G and so, WiFi must be 2.4G.)

If you are using iPhone, change its Personal hotspot WiFi settings to match the above and put Personal hotspot ON. To change your iphone's SSID, you need to change the name of your phone to MyPhone. This can be done in settings → General → About → Name. To change password, Settings → Personal Hotspot → Wi_Fi Password. Once changed, click on Allow Others to Join so that your Personal Hotspot is ON with this SSID and password.

If you are using an android phone, go to settings → Tethering and Mobile hotspot. Then click Mobile hotspot. Then click on the three dots at the top right and click 'Configure hotspot'. Then change the ssid and password of your mobile hotsopt to 'MyPhone' and '12345678'. Note: If your smartphone is capable of 5G hotspot as well as 2.4G, make sure that 2.4G is selected as the device is not capable of 5G. Also, check the Timeout settings of the hotspot. Set it such that it does not timeout too soon while you are using Hotspot. You can set it to Never time-out. After setting it, switch on your mobile hotspot (in the previous menu).


Once the personal Hotspot is ON, put on the device, if it is not already ON. You will notice that the device will join that WiFi and connect to internet. You will see in a few seconds that the LED changes colour to RED, and staying RED. If that is not happening, make sure that your personal Hotspot is configured correctly and that it is ON. If this is not happening, there is a problem with the WiFi. You can do a factory reset of the device as explained in section 3.5 of this documentation and try again. If the device is still not joining WiFi, ask for help by contacting contact@wifisecureaccess.com.

If the device is connected to WiFi and conected to internet, the LED will stay steady RED. Then, you need to take the ownership of this device as explained in section 3.3 below before you can set its WiFi.

3.3  Taking Ownership of the Device


There are two ways in which you can take the ownership of a new device that you just bought. One method is by scanning the QRCode of the device using your smartphone, and the other method is by using a browser on a computer. Before you proceed, make sure that you have turned on the device and it has joined the WiFi of the Hotspot of your smart phone, as explained in the previous section of this documentation.

In the first method. open wifisecureaccess app on your smartphone and go to Scanning page and press Scan QRCode button. The camera will come ON. Scan the QR code of the device. The QRCode is on the label pasted on the box. Then follow the prompt. You will be prompted to confirm the buzzer sound as well as the color of the LED a few times to make sure that you have this device in front of you, having connected to internet. If everything is correct, it will assign the ownership of this newly bought device to yourself.

For the second method, open https://wifisecureaccess.com and click on Dashboard. If you are already logged in, you can see a tab "Take Device Ownership" in the sidebar menu. If this is your first device, you will see that on the main page as well. Click on that, and follow the prompt. After getting the confirmation that the device is turned on and connected to internet through its WiFi, you will be prompted to enter the QRCode or Mac address of the device. On the label of the device, you will see either the mac address or the QRcode of the device. Enter it as shown on the label. Follow the rest of the prompts. If you respond to all the prompts correctly, the ownership of the device will be assigned to you and a popup window will appear confirming it.

Fig 6: Intial page view.

Once you have taken ownership of the device, your main dashboard page may look like the one shown in Fig 6A, if you are using a smartphone. And, if you expand the dashboard menu, you may see several otions as shown in Fig 6B. If you are using a browser on a computer, you will see the dashboard menu on the left side bar.

Fig 6A: Dashboard view when you own a device

Fig 6B:Dashboard expanded menu when you own a device

Once the ownership is transferred, click on 'Access Control Admin' in the Dashboard menu. Then click on 'My Devices in Access Control'. You will see your device listed there. If you have more than one device, all of them will be listed there. Once the device is assigned to you, nobody other than you will be able to configure it. In the later sections of this documentation, you will learn how to allow others to use this device. You will also learn how to configure this for your specific needs and how to use it.

3.4  Changing WiFi of the Device

If the device is already connected to internet, you can change its WiFi any time as per the steps given here. In the dashboard menu, click on 'Devices Admin' to expand that menu. Then click on 'Set WiFi'. It will take you to a page where it will prompt you to enter the SSID and password of your WiFi. Make sure that the WiFi is 2.4G and not 5G. The device is not capable of 5G WiFi. If the device is running firmware version greater than 4.2, you will see a pulldown menu with all the available WiFi at that location. You can choose one, or select 'Other...' to enter any other ssid. Once entered, click Submit. If successful, you will see the device restarting, the led blinks blue and then changes to steady Red. The device is now set to go and ready for use.

If you accidentally entered wrong ssid or password, or if the device is not getting connected to the new WiFi, the device will revert back to the previous ssid and will try connecting to it. If it is unsuccessful to connect to previous ssid, it will stay in that loop of attempting to connect, and LED will stay BLUE with occasional flashing. You can also do a factory reset as per the steps given in section 3.5 of this documentation. If you are running older firmwares, you will have to do a factory reset and repeat the steps given in section 3.2 and 3.4, if you entered wrong ssid and password

Fig 8: Setting WiFi of the Device.

The device will remember the WiFi that you set and will connect to that WiFi hereafter whenever power cycled or reset. If you have used mobile hotspot of your smartphone to get initial connection, you can switch that off now. You can change your smart phone's name and WiFi password to whatever they were initially. After switching off the hotspot on your mobile phone, try resetting the device by pressing the reset button on the device. If everything is set correctly, the device will restart and join the WiFi. You will see LED blinking Blue while trying to join WiFi and then turning to red when successfully connected to WiFi and connected to internet and the cloud server.

If this is not happening, there is something wrong either with the ssid and password that you entered, or with your internet connection through WiFi. Make sure that the ssid and password that you set are that of a 2.4G wifi and not 5G. Make sure that your router has internet connection. If anything has gone wrong, do a factory reset of WiFi as per the steps in section 3.5 of this documentation, and then try to set WiFi again.

3.5  Doing a Factory Reset of WiFi

The WiFi of this device can be reset to the factory reset any time, if you find a need for it. The factory reset WiFi is : ssid = MyPhone and password = 12345678.

If the device is running firmware version 4.2 and above, you can also set its WiFi using a browser on your computer or Smart Phone by doing a factory reset. This is another method of setting WiFi of the device. After doing a factory reset, follow the steps given here in this section to do so.

To do a factory reset, open the box of the device, and locate two push buttons marked Reset(SW1) and Facory Reset(SW2). Factory Reset Button is also called WiFi reset button. Refer to Fig 8A below to locate these push buttons. If the device is operating at 110V/240VAC, make sure not to touch any of the high voltage tracks or terminals to avoid getting shock. Then, press and hold SW2 (Factory Reset button). While holding it, press and release SW1 (Reset button). Keep holding Factory Reset button until the device restarts and LED changes to flashing blue/green. Then, LED will change to BLUE. At this moment, the ssid and password of the device has been reset to 'MyPhone' and '12345678' respectively. You can release holding the factory reset push button.

Fig 8A: Factory Reset Push button on the device.


If the device is running firmware version below 4.2, it will attempt to connect to wifi swith SSID = MyPhone and password = 12345678. This is the method that we discussed in section 3.2 earlier in this documentation. You will see LED Blue and flashing occasionally. If you have enabled hotspot on your smartphone, the device will connect to it. and the LED will turn solid RED. If it is unable to connect, LED will flash blue occasionally and stay in that loop until connected. Refer to section 3.2 of this documentaion, and then follow section 3.3 to take ownership of the device and section 3.4 to change its wifi.

When the device is running firmware version 4.2 and above, the device will go into access point mode and operate as a web server. It will advertise an SSID = WiFiSecureAccess. LED will stay solid BLUE without any occasional blinking. Follow the steps below to set its wifi at this time. (Note: If you press reset push button again at this time, the device will change to the previous mode and will attempt to connect to factory reset ssid)

Setting WiFi of the device using a browser when the device is web server mode

If your device is running firmware version 4.2 and above, factory reset will put the device in web server mode advertising an SSID = WiFiSecureAccess, and LED will stay solid BLUE without any occasional flashing. If you look at the available WiFi in your smart phone or computer, you will see this WiFiSecureAccess there. You will see this only after doing a factory reset of the device that is running firmware version 4.2 and above. Now, connect your computer or smart phone to this WiFi. Once your computer or smartphone is connected to this WiFi, open a browser (Chrome preferred) on your computer or smart phone and enter the ip address 192.168.1.1 in the url. You will see a window similar to the one shown in Fig 8B below.

Fig 8B: Setting WiFi using a browser.

On this page, it will list all the available SSIDs. Enter your SSID and Password and press Submit button. If your entry is correct, the device will set the WiFi of your device to that. Then it will try to connect to that wifi. You will see LED flashing occasionally BLUE. If it is able to connect to this wifi, you will see the LED changing to RED and staying RED (solid RED). If this is a brand new device, as a next step, you need to assign the ownership of this device as explained in section 3.3 of this documentation. If ownership is already assigned, the device is ready to be used.

If it is unable to connect, the device will beep twice (after a few seconds of attemtps) and will revert back to the factory reset ssid (MyPhone). Then, it will try to connect to factory reset ssid. If so, follow the steps as explained in section 3.2, or do the factory reset again and enter the correct ssid and password.

3.6  Setting a backup WiFi

If the device is running firmware version 4.2 and above, and if you have more than one WiFi at your premises, you can set up a backup WiFi on this device so that the device will switch over to the backup WiFi whenever the main wiFi fails. Unless you set a backup WiFi, the default backup wiFi is the main WiFi that you have set. If you want to set a backup WiFi, open the dashboard and click on 'Set Backup WiFi' under Device Admin. You will see a page similat to Fig 8C. Just like the way you set the main WiFi in section 3.4, this page shows all the available WiFi in a pull down menu. You can select one of those, or select 'Other ...' to set anything else. Once selected, press Submit. If successful, the device saves this backup WiFi and will switch to this WiFi whenever the main WiFi fails with three attempts.

Fig 8C: Setting Backup WiFi



3.7  Initial Configuration of the Device

Once the wifi is set, and once the device is online and connected to the internet, you can check its default configuration. The device comes with a default configuration with its name as its macaddress and its port named as RELAY. The device also assumes that it is cabled to an electric strike or a magnetic switch on the door. If the controller is cabled to an electric strike or a magnetic switch, it is ready to be used with a smart phone without doing any further configuration. You can now operate it either using the WiFiSecureAccess App on the smartphone, or by GoogleHome or Alexa. The door can now be discovered by GoogleHome as well as Alexa. But, before you start using it, it is recommended to at least change the name of the device. Let us first go through current settings.

To start with, click on Access Control admin in the dashboard menu. Then click on My Devices in Access Control. You will see this device listed there. If this is your first controller, you will see only one device. If you have more than one device, all will be listed here. If you have not changed the name of the device yet, you may see its name as its mac address.
Note: The pictures shown in this document are snapshots taken when using a computer. If you are doing this on a smartphone, your view will be similar, but without a dashboard menu at the left side. When using smart phone, to see the dashboard menu, you have to click on the three lines at the top right as shown in Fig 6A and 6B above.

Fig 9: Devices List.

PS: The output port to which the controller is connected (normally RELAY, until changed) may not show the current status (Open/Closed) correctly unless a sensor is installed and at least one notification is enabled. More about it later in section 3.14 of this documentation.

Now on this page, click on any device. It will show the details of that device. You will see its two output ports (RELAY and BUZZER). It will show whether the output ports are currently Open or Closed, or ON or OFF. If it is ON or Open, you will see a green circle with a check mark. If it is OFF or Closed, you will see an orange circle with a cross mark. You can click on the orange button of BUZZER. You will hear the buzzer sounding. Click this button again to put that off. If you click on the orange button on RELAY, you will get an error message saying that this cannot be activated from this page, as it is in Access mode.



Fig 10: Device Details.

Now, click on Sensor Value on this page. You will see one sensor listed here: D7. If you have cabled Ultrasound sensor to the controller and if enabled, you will see an additional sensor named U_SOUND. You will also see the current values sensed by these inputs. D7 is an ON/OFF type input. If you have connected a magnetic sensor connected to D7 as explained in section 2 above, and if you bring the two parts of the magnetic sensor close to each other, and if you refresh this page, you will see that this displays as ON. If you have ultrasound sensor, you can see the distance mesured byt it.

Fig 11: Device Details.

Now, click on Device information. You will see a page similar to the following.
Fig 12: Device Details.

On this page (Fig 12), It will display all the details of this device such as its mac address, QRCode, NFC TagID, name of the device, firmware version, and so on. These are all for information. You may have a close look at all of them. Number of reconnects in this is the number of times the device lost connection to the server since the last reboot. If you see a higher number here, that indicates a weak wifi, or some frequent issues in connecting to internet.

On the firmware version tab, it will show you the current version and the latest version available. If the firmware is not up to date, you will see an orange button to click on to update its firmware.

Checking and Updating Device Firmware

We Strongly recommend updating the firmware to the latest by clicking the link on this page, if it shows new firmware is available


Changing the name of the device

You can change the name of the device as well as the labels of each port, if you prefer. To change the name of the device, click on 'Configure Device' under Device Admin on the left side bar menu. It will present a form similar to Fig 13. You can Change the name of the device to anything you like. But, the name must not contain the word Garage, gate or Parking (case insensitive) unless this is used for controlling garage door or gate or parking gates. Similarly, you should not include a word Door unless this is connected to an electric strike or magnetic lock or anything similar

There are several other configurable fields on this page that may be left as defaults now. Check the Timezone on this field. By default, it is set to the timezone of the owner of the device. If this is not correct, you may change it to the timezone where this device is installed. This helps in displaying all information in that timezone. Click here to know the format of different time zones. If this field is left empty, it will change it automatically either to the timezone of the owner of the device or UTC.

Fig 13: Configure Device.

Changing the name of the output port

The names of the ports are also changeable by clicking on 'Configure Ports' under 'Device Admin' in the Dashboard menu. Fig 14 is the page that will show up when clicking 'Configure Ports". What you see here are the default values. On this page, you will see several fields. The name of the dind7_label is D7. This is the label of the port to which the magnetic sensor is cabled to. You can change its name to anything that you prefer, or leave it as it is. The name of the output port relay1_label may be RELAY by default. This name has some significance. The words that you add here should depend on what is cabled to the output port. If you have connected an electric strike, or a magnetic lock or anything similar to actuate a door, then, either you can leave it as RELAY or change it to Door. The words that you add here are case insensitive. If you have cabled this to a garage door controller, or a gate, or a parking gate, or anything similar that gets actuated using a push button pulse, then, this relay1-label must have a word either Garage or Gate. That is how the controller identifies what is connected to the ouput port.

The other fields 'Allow in GoogleHome' and 'allow in Alexa' are by default 'Yes'. That makes this door or gate discoverable in GoogleHome and alexa. If you do not want this door or gate to be operated using voice command through Google Home or Alexa, you may set these to 'No'. The field 'Enable Two Factor Auth (2FA)' is a field for additional 2-factor authentication. If you set this to 'Yes', it will prompt for your personal pin whenever you try to open or close this garage. Your personal pin for this can be seen under My Profile. By default, your pin is 1234. You can change the pin to anything you like by clicking MyProfile under User Admin in the Admin Dashboard.
Fig 14: Device Labels.


Printing additional QRCode labels

Under device Information (Fig 12), you have noticed that each device has two QRCodes. One is called the Exit QRCode and the other is called the Entry QRCode. Exit QRCode is the one pasted on the controller. Entry QRCode is pasted on the scanner box. The scanner box is not normally used in Gate and Garage door installations. On all other installations, you can install this at a location outside the door. One can scan this QRCode to enter. In other words, Exit QRcode is to be scanned for exiting and Entry QRcode is to be scanned for entry. You can print as many additional QRCodes as you want and paste it any other locations if you find a need. To print any of these QRCodes, click on 'Show QRCode Label' under Device Admin in dashboard menu. Then select the name of the device. It may then prompt for Entry or Exit. Once selected, it will show that QRCode label. You can save this image on your computer and print it using a color printer. Then you can paste it anywhere you want.

Changing QRCode of a device

If any time you find a need to change the QRCode of a device due to any security reasons, you can do so in the Device Configuration page. Click on 'Configure Device' under Device admin under the Dashboard menu. At the bottom of the page that opens up, you will see the tabs 'CHANGE ENTRY QRCODE' as well as 'CHANGE EXIT QRCODE'. Click on the appropriate button depending on which QRCode that you want to change. It wil prompt for confirmation. Once conformed, it will create a new QRCode and will show you that code in the Configure device page. You can print this QRCode label as described earlier. Note: Once the QRCode is changed, the eralier QRCode is no more valid. You will have to replace the old QRCode with the new one whereever you had pasted the earlier one. If you do not want to use the QRCode any more, do not paste the label on the device or anywhere.

Changing NFC tag of a device

Each device comes with two NFC tags. The NFC tagIDs of a device can be seen in the 'Device Information' page (Fig 12). These tags are pasted under the top cover of the device as well as the scanner box. For any reason, if you find a need to change these NFC tags, you can do so in the Configuration page (Fig 13). click on 'Configure device' under Device Admin in the Dashboard meny to get to the Device Configuration page. At the bottom of this page, you will see a tab 'DELETE ENTRY NFC TAG' as well as 'DELETE EXIT NFC TAG'. These tabs will be seen only if these NFC Tags are already assigned to the device. If you want to replace any of them, click on these delete tabs. That will prompt you to confirm. Once confirmed, that NFC tagid will be deleted, and the device configuration page will be displayed with that NFC TagID as empty.

Next, if you want to use a new NFC tag, buy one NFC tag. We support only Mifare Ultralight 14443-3A type of tags which has 7 bytes of UID. These are very inexpensive tags that you can buy from anywhere. These tags come as stickers as well. Given below is an example link to buy from Amazon. This is just an example. If this link is not available, or if you would like to use a different type, search for a similar item in ebay or Amazon. These NFC tags are available in different type of shapes and packaging. You can use the type you like so long as it is Mifare Ultralite with 7 bytes of UID.

Buy Now

To associate an NFC Tag with your smart device, open the app and press 'Scan NFC Tag' and scan the tag that you purchased. If this is a new tag and if it is not associated with any other device within our system, you will be taken to a page prompting you to select one of your devices to associate this tag to. The pulldown list will contain all the devices you own (all those devices that are powered on). iIf you have only one device with garage door, you will see only that in the pulldown menu. Select the device that you want to associate this NFC tag to. Next, if this device is used in access control, and if this is used for entry as well as exit, yoiu will see another option 'Exit Tag'. Choose 'Yes' if you want associate this with Exit tag, or choose 'No' if you want to associate it with the main entry tag. Press Submit button after completing the selection. If entry is correct, this tag is now associated with this device. Now, if you scan it again, it will take you to the Device details page (Fig 10), if this device is in Automation mode; or will activate the port if the device is configured for Door, Garage Door and so on.

You can fix the NFC Tag and/or the QRCode label at any convenient place to access this device. These are normally pasted under the top lid of the controller as well as the scanner. The controller has the EXit Tad and the scanner has the Entry Tag.



Activating a device

Once the device is installed and the names of the device and ports are configured, you can open/close the door/gate in one of several ways: 1) From the dashboard (Using a browser on computer or smartphone), 2) by scanning the QRCode or NFC tag of the device, 3) Using Google Home assistant on your smart phone, 4) Using Amazon Alexa, or 5) Making an HTTPS POST call from any of your other applications or programs. In the following sections of this document, you will learn how to use all these different methods.

Note: The WiFiSecureAccess controller has a push button mounted on itself. By pressing this button, you can open the door/gate. This is to be used only for exiting the room. As this controller is inside the room, there is no security issue in pressing this button to exit. If, for any reason, you want to disable this push button, you can either remove it from the controller, or disconnect it internally by opening the box.

3.8  Opening/Closing the door/gate from the dashboard

You can activate a device from the dashboard either using a browser on a computer or smartphone or through the WiFisecureAccess App on the smartphone. If you want to use a browser, go to the url https://wifisecureaccess.com. Then click on the dashboard tab on the top navigation bar. That will take you to the main index page. On that page, you will see a menu 'Activate a Device'. Click on that. That will show all devices that you are allowed to activate (similar to Fig 9). Clock on the name of the device that you want to activate. That will open that door/gate and display a success message (or Failure message) on a popup window.

You can also get to the dashboard through the WiFiSecureaccess App. Open the app on your smartphone. Then click on the 'Admin Dashboard' on the main scanner page of the app (Fig 14_0). That will take you to the main index page. There, you will see a tab "Activate a Device'. You can also see this 'activate a Device' tab in the dashboard menu, if you click ob the three lines at the yop right. To activate a device, click on 'Activate a Device' menu. that will display all the devices that you are allowed to activate (similar to Fig 9). Click on the device that you want to activate. That will open or close that door/gate.

You can also do the same thing by clicking the 'Activate a Device' in the main scanning page (Fig 14_0) of the WifiSecureAccess app. If you press that button, it will display all the devices that you are allowed to activate (similar to Fig 9). Then press on the device that you want to open or close. That will open or close that device.

Note: if the device is a gate or garage, they are, by default, in NoAutoClose mode. So, whenever you activate using this method, you are toggling the state of the garage/gate. If it is currently Closed, clicking the name of the device will open it, and, if it is currently Open, clicking will close it.
Fig 14_0: Open/Close Garage door


Note: As mentioned earlier in this documentation, everything that can be done by the wifisecureaccess app on a smartphone can also be done using a browser on a computer, except scanning QRCodes and NFC tags.

3.9  Opening/Closing the door/gate by scanning either QRCode or NFC tag of the Device

As you know by now, by default, each device has been assigned two unique QRCodes. exit QRCode is pasted on the box of the controller and Entry QRCode is pasted on the Scanner box..

To open/close a door/gate using QRCode, you can scan this device using wifisecureaccess app. Open the app, go to the scanning page and press Scan QRCode. The camera will become active, and now scan this QRCode. That will toggle the state of that device. If it is currently Open, pressing the button will close it. And, if it is currently Closed, pressing the button will open it.

Instead of scanning QRCode, you can scan NFC tag to open/close the door/gate. Open the WiFiSecureAccess app on your smart phone. Then, in the Scanning page, click on 'Scan NFC Tag'. Then scan the top of the controller or scanner box. (Remember that the BFC tags are sitting under the top lid of these boxes). If successful, you will feel a vibration of the smartphone, and will open or close the door/gate. A message will also pop up on smartphone inf=dicating either Success or Fail.

3.10  Using Google Home assistant to open/close the door/gate

WiFisecureAccess devices are compatible with GoogleHome, and, therefore, you can use Google Home assistant to open or close the door/gate. By default, the device is enabled to be discovered by GoogleHome. To check or to change, click on 'Configure Ports' under Device Admin in the dashboard. You will see a page similar to Fig 14A.
Fig 14A: Enabling Google Home assistant

On this page, make sure that 'Allow RELAY in GoogleHome' is set to 'Yes', if you want the RELAY port to be activated using Google Home assistant. If you do not want to use Google Assistant to activate the door/gate, set them to 'No' and press Submit button.

If this is enabled to be discovered by Google Assistant, you can discover these ports in Google Assistant. Press + button in Google Home to add devices. Then press 'Set up device'. Then press 'Have Something already set up". On that page in Google Home, search for WiFiSecureAccess and select it. That will discover all the allowed ports of all your allowed devices.

Fig 14B: Google Home Page

You can now rename these whatever you would like to. Hereafter, you can say 'Hey Google, open *name of the device*'. That will open that door/gate. That will open that door or gate. Note that you can change the name of these ports in the "Device Configuration" menu (Fig 13) in WiFiSecureAccess dashboard, and/or within the Google Home. The name in Google Home need not necessarily be the same as that in the configuration within the dashboard of wifisecureaccess.com.


3.11  Using Amazon alexa to open/close the door/gate

Doors and gates associated with the smart device can also be activated using Amazon Alexa. You may download and install Amazon Alexa on your smart Phone. In Alexa, press 'more' and then click on 'skills and games'. Now search for wifisecureaccess, then enable that skill. When enabling the skill, it will take you to Wifisecureaccess.com and will prompt you to enter your email and password. This is your password for wifisecureaccess.com. If the entered credentials are correct, you may press Discover Devices. That will discover all the wifisecureaccess devices that you own.

As said earlier, door/gate is allowed to be discovered by Alexa by default. However, if you do not want this to be discovered by alexa, you may change the configuration. To check and change this configuration, click on Configure Ports under Device Admin the dashboard menu. You should now see a page similar to Fig 14C.
Fig 14C: Enabling Ports to be discovered by alexa

On this page, select 'Yes' for "Allow RELAY in Alexa" if you want garage to be discovered by Alexa. Press Submit after making the selection(s). Then, login to Alexa on your smartphone and discover ports as you did before. If all settings are correct, you should be seeing these devices discovered in your Alexa application on your smart phone. You can now open the door/gate by saying, for example, "Alexa, open XYZ", where XYZ is the name you have given to the device. Similarly, to close the garage door or gate, you can say "Alexa, close XYZ". All the features of Alexa are now available to you for managing the equipments connected to this smart devices.

3.12  Opening/Closing the door/gate with an HTTPS POST call

You can also open or close the door/gate from any of your other application programs using an HTTPS POST call. This helps integrate the WiFiSecureAccess system/devices with your other application programs. This feature also helps the developers to integrate this with their programs.

To open or close a door/gate, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/devicePortsJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "device_name": device_name, "action": action, }

Refer to section 8.1 of this documentation below to see more details about this and to see a sample python program.

3.13  Enabling Two Factor Authentication on opening Door/Gate

By default, the doors and gates are secure, meaning that nobody else other than those who are allowed will be able to open/close them. But, if you are interested in an additiional layer of security, you can enable 2FA (two fact authentication) on these controllers. If you enable it, the user will be prompted to enter thier personal pin when trying to open that gate or garage door. To enable 2FA on any device, click 'Configure Ports' under Devices admin in the dashboard, just like the way it was done when enabling GoogleHome. You will see a page as in Fig 14D.
Fig 14D: Enabling 2FA on Ports

On that page, you will see a field 'Enable Two Factor Auth (2FA)'. By default, it is disabled. If you want google home to ask you for your pin when trying to activate any of these doors/gates, set this to 'Yes' and press Submit. Once enabled, whenever you tell Google assistant to, activate that device (such as 'Hey google, Open Door'), Google Assistant will respond 'Can I have your pin?'. If you are activating this port by scanning QRCode or NFC tag or by pressing 'activate' button on your smartphone, the system will prompt for the pin before before activating that door/gate. You will have to enter your personal pin correctly to open the door. Your pin can be seen under your profile (click My Profile under User Admin in dashboard to see it). By default, the pin is 1234. You can change it to anything you like. This 2FA is an extra layer of security, and it is optional.
Fig 14D1: My Profile


Note: The above method of 2FA will not work with Alexa. For 2FA in Alexa, you need to set it in Alexa itself. Refer to documentation on Alexa for setting pin codes for Locks and Doors.

3.14  Enabling Sensor and Enabling Notifications

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. 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 idevice 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 14E: 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 14E), 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 repetaedly 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 14F: 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 14F). 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 14F), 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.

3.15  Configuring Auto Close for 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 adding 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 14G: 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 14H: 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 decvice* 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. Then, if you want to close the garage, you can say "Hey Google, Close *name of the device*". This is a special handy feature of our smart device that you can configure and use.

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

3.16  Disabling AutoClose on Doors and locks

When using to control Doors with electric strike and magnetic locks or anything similar, or parking gate, it is assumed that they are closed either manually or by any other external automatic mecahnism after opening it. So, the smart controller does not keep the actuator activated beyond the time specified in the Duration filed of the first portcontrol in Fig 14H. You can override this by adding "NoAutoClose" in the name of the port label (not in the device name). If you override, it will not assume that the door or parking gate is closed automatically. Instead, it will keep the actuator activated until you give another command to close it. In other words, if 'NoAutoClose' is present in the label of its port, and if you say, 'Hey Google, open ...', or press the button on your smartphone to open it, it will put the actuator ON and keep it ON until you give another command to close it. To add NoAutoClose in the name of the port, click 'Configure Ports' under device admin in the Dashboard menu. That will open a page similar to the following. here, you add the word NoAutoClose in the Relay1_label.
Fig 14I: Setting NoAutoClose for doors and locks



3.17  Device Use Records

The system keeps record of the use of this garage door for 30 days. At any time, you can see who used this garage door and at what time. To see the use records, click on 'Device Use records' under 'Device admin' in the dashboard menu. You will see a page similar to the one in Fig 38E with two columns (User and use_time).

You can download these use records to your computer, if you want to do so for keeping any records, or for analysing the data. To d ownload, click on 'Download Device Use records' under Device Admin in the dashboard menu. There you can provide the dates between which you want to download the data. Leaving any of these dates will take that date as open-ended. Leaving both dates as blank wi ll download all the available use records for the past 30 days.

You can also add a program in any of your applications to download these records, and do analyis. These use records can be read using a python program. Refer to section 9.1 of this documenation.

4  Allowing Multiple Users

This section explains how multiple users can be allowed to use a device. The owner is allowed to use all his devices all the time regardless of the settings described in this section. This section explains how the owner can allow others to use his devices and how to control and manage their authorization.

4.1  Allowing Others to Use Your Devices

You can allow or authorize the others to use your smart device. To allow someone else to use your device, they have to be registered with wifisecureaccess.com. So, request the other user to register with wifisucureaccess.com. To register, either download the app and open the app and press Admin Dashboard, or go to https://wifisecureaccess.com and click on dashboard in the top navigation bar. When it requests you to login, click on 'Create a New account'

Once they are registered, you add their email address to the Allowed Users group of your device as per the steps below:

First create a Device Group. This can be done by clicking 'Devices groups' under 'Device Groups' in the Dashboard menu.

Fig 36: Configure Device group

This page will display all the device groups that you have created so far. To add a new device group, just enter the name of the group in the bottom empty row and press submit. Make sure that the name that you entered is a new name. You can create as many groups as you need.

Next, click on 'Allowed Users' in the Dashboard menu. If you have created multiple groups, you may be prompted to select a group. You will then see a page similar to the one shown in Fig 37.

Fig 37: Configuring Allowed Users of a Group

In this form, enter the email address of the one whom you want to allow to use your device, and press Submit. If you have several users whom you want to allow, enter the email addresses of all of them, one at a time. You have now created a group of users.

Note: When you added the name of a user in a group, you could add a start date and an expiry date as well, if you want. Start date is the date and time this user will be allowed. He will not be allowed before that date and time. Once an expiry date is addedd, that user will not be allowed after that expiry date. The format of these dates is yyyy-mm-dd hh:mm. Leave these date blank if the user is allowed all the time with no start date and no expiry date. You can also remove any user from this group at any time by checking the delete box against that user's name and pressing Submit.

Next, you can configure your device such that all users in a group are allowed to use a device. To do that, click on 'Configure Device' under Device Admin in the Dashboard menu.

Fig 38: Configuring Devices with Device Group

In this page, select your device group, and press Submit. If all the above configurations are successful, all users in the selected device group are allowed to use this device.

When another customer is allowed to use to use your device, they will see this device in the list of devices they can use. Also, when they click on 'Show Device details', this allowed device will show up. If this device's port is enabled for GoogleHome or Alexa, the allowed users will show this device in GoogleHome or Alexa when they discover wifisecureaccess devices. But, keep in mind that the allowed users cannot change the configuration of a device.

So, if you install this device at an access door to open or close a door, all allowed users will be able to open and close that door. If you have set a start date, that user will not be able to open the door before that date. If you have set an expiry date, they will not be able to open or close this door after that expiry date. In later sections of this documentation, you will learn how to install this device as an access controller of a door.

4.2  Configuring Group Entry Controls

It is possible to create entry controls on the members of a device group. For example, if you want to allow the members of a group only between some specific time of a day, you can set the opening and closing times for a group. To do that, click on 'Group entry Control' under Device Groups. This tab will be available only if you have created a group. If you have created multiple groups, you will be prompted to select a group. Once selected, you will see a page similar to Fig 38A.

Fig 38A: Configuring Group Entry Control

On this page, set Opening time and closing time for this group. In the field 'Week' and 'Day', you have multiple options. If you set * for week, it applies this opening and closing times for all weeks of the year. Or, you can select a week that you want this applied to. Week is the Gregarian week number. If you do not know the week number corresponding to any date, just enter the date in the YYY-MM-DD format. It will find its corresponding week number. If you enter a week number, this rule applies to that week only. Similarly, if you select * for Day, it will apply this to all days of a week. If you want this to apply to a particular day only, then select that day. You can also select the email address of a user this control must apply to. Then press submit.

Note: The general rule is that a member of the group is always allowed unless there is an open/close time in this table showing that the group is closed for him/her at that time of the day, on that day of the week of that year. An entry with opening time the same as closing time will mean no entry on that day of that week.

If no rows of controls is present, all users of this group will be allowed all the time, meaning that it is open all day, every week of the year. You can create a special closing and opening hours for a particular user by adding his email address in the 'User Email' field. If no user email is given, that opening and closing hours are applicable to everyone in that group. If opening and closing hours are missing for a user for any day of the week, the rule applicable to all will be used for that user.

You can add as many rows for each user as you want so long as those controls are different from each other. In other words, you can create an opening and closing hours for a user on Monday, another one for Tuesday and another one for, say, Thursday. And, if you leave all other days without specifying any control for that user, the general opening and closing hours used for all members of the group will be applied to this user.

You can also create multiple opening and closing hours within a day

Shown in Fig 38A is an example. In that, the first row is the opening and closing times for everybody on Saturday. The second row is the opening and closing times for everybody on Sunday. And, as the opening and closing time are the same on Sunday, it is effectively closed on Sunday. The third row is the opening and closing time for everyone on all other days of the week. The fourth and fifth rows apply to the user whose email address is given in the 'User Email' field. As per the fourth row, this user will be allowed between 10:00 and 12:00 on Tuesday, even though, all the others are allowed between 8:00 and 17:00 on Tuesdays(as per the third row). And, again, the fifth row specifically says that this user will not be allowed on any other days of the week. So, as special opening and closing times are given for a particular user covering every day of every week of the year, that rule will be applied to that user, and not the general rule. However, if a rule is not specified for a user for any day, the general rule will be applied to him for those days.

If there are no rows present, or if there is only one row with * for week and * for day, with user email empty, that means that it is open all days of the week and all weeks of the year for all the users in that group. In addition to this, you can create special opening/closing hours for each and everyone in the group. They can be either the same or different for each user.

If you do not want to anyone to enter, create a control with opening and closing hours the same. If you want to allow anyone, say, between 10:00 and 12:00 on Wednesady and do not want to grant any access on any other day, create two rows of control. In the first row of control, set opening time as 10:00 and closing as 12:00, week as * and day as Wednesday. In the second row of control, enter any time (say, 10:00) for both opening and closing time and select * for week and * for day. And, if you leave the user_email blank, these two rules will be applied to all those in the group for whom no other special rules are created.

4.3  Creating a New Group by merging members of two other groups

If you have created two groups and you have added members in each group, and if you are interested in creating ai new group that should contain members of both the other groups, you can do so. First create a new empty group by clicking 'Devices Groups' under 'Device Groups' in the dashboard menu. Then click on 'Merge Device Groups' under 'Device groups' in Dashboard menu. You will see a page similar to Fig 38B.

Fig 38B: Merge Device Groups

On this page, select Destination group as the new empty group that you just created. Then, select the first group that you want to add to this in the 'Source Group' field. Then press Submit. Next, repeat the same to add the second group to the same new group by clicking 'Merge Device Groups' and selecting Destination Group as the new group and selecting the second group for the 'Source Group' field. Then, press submit. Now, you have a new group with members of two of the other groups that you selected.

4.4  Entering an allowed user in a group using an HTTPS POST call from any of your applications

You can populate the allowed users of any group from any of your applications such as a booking platform using an HTTPS call. This feature helps integrate the WiFiSecureaccess door controller with your applications such as a booking platform. If these devices are installed, for example, on the door of a hotel room or an AirBnB room, the application platform that makes the booking can enter the customer's email and their start date and expiry date directly into the allowed user's list of the group associated with the controller device. If done, the customer will be allowed to open the door during the period between start-date and expiry-date. The customers can open the door either by a voice prompt, or by scanning the QRCode or NFC tag fixed on the door. Thus, this is an ideal system for hotels and AirBnB users. This eliminates the need to pass on the keys or access cards to the customer.

To add the user to the evice's group, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/loadAllowedUsersJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "device_group_name": device_group_name, "customers": customers }

-where customers is a double list of customer details.
customers = [customer1, customer2, customer3, ....]
-where each customer is a list as below:
[email_address, start_date, expiry_date]

For example, if you want to add two customers to the allowed group of a device, the customers should be as follows:
customer1 = [customer1_email, customer1_start_date, customer1_expiry_date]
customer2 = [customer2_email, customer2_start_date, customer2_expiry_date]
customers = [customer1, customer2]

Note: Leave start date and expiry date as "", if there is no start date or end date for that customer. If there is no start date, that means that the customer can access immediately. If there is no expiry date, the customer is authorized forever.

You can also remove any customer from the device's group with another HTTPS call as follows:

POST HTTP/1.1
Host: wifisecureaccess.com/removellowedUsersJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "device_group_name": device_group_name, "customers": customers }

-where customers is a list of email address of the customers that you want to remove from the allowed list.
customers = [customer1_email, customer2_emal, ......].

Refer to section 8.2 of this documentation below to see more details about this and to see a sample python program.

4.5  Uploading allowed users from a file on your computer

If you have a file with email addresses of all the allowed users, you can upload that directly to any of the device groups, if you want. The file must be a txt file with multiple lines, with each line for each customer. The format of each line must be as follows:

    customer_email, start_date_time, expiry_date_time
Each line must have the first field as customer email address. The second and third fields are start date and time at which that customer will be allowed, and the expiry date and time when his access will be revoked. These two fields are optional. You can leave either or both. These three fields are to be separated by comma (,). Customer email must be provided and cannot be omited. The format of the start_date_time and expiry_date_time is yyyy-mm-dd hh:mm. Here is an example file with four customers.

    abcd@gmail.com, 2021-10-15 10:30, 2021-11-20 12:00
    xyz@gmail.com, , 2022-06-10 2:00
    john@gmail.com
    jason@gmail.com, 2021-06-12 5:30
The date is in 24 hr clock clock in the format YYYY-MM-DD hh:hr.
Add additional line for each customer.

If you have such a file, you can upload that to any of your device group. Click on 'Upload Allowed Users' under Device Group in the Dashboard menu. That will prompt you to select the device group. Then select the file (browse) by clicking on the File tab. That will help you select your file from your computer. Then presss Submit button. That will update the allowed users in that device group. This process will not delete any of the existing allowed users. Instead, this process add all the customers in this file to the existing allowed users of that group. If a customer is already in the allowed group, this will not overwrite it from the file. In that case, that line in the file will be ignored.

4.6  Displaying number of people within an Office/Building

If you have installed separate doors for entry and exit, and if nobody is allowed to open or close the door either manually or by any other means other than wifisecureaccess system, the system keeps a count of the number of people within the room or building. If any of the door is for entry as well as exit (ENTRY/EXIT), you can install a separate QRCodes or NFC tags for entry and exits, instead of using the same tag for both. You can print the QRcode labels for entry as well as exit in the 'Configure Device' menu. Click on 'Configure device' under Device Admin in the dashboard menu (Fig 38C).

Fig 38C: Configuring Exit Tags for an ENTRY/EXIT door/gate

If this device usage is ENTRY/EXIT (meaning, used for entry as well as exit), you will see two separate QRcodes and NFC tags on this page. At the bottom of this form, you will also see links to print these labels. You print the Entry QR label and place it at a location that the people can scan when entering. Place the Exit label at a location where the people can scan when exiting. in Configure Device page, set 'Allow Remote Control' to 'No' so that nobody (other than the owner) can operate this door from remote. Make sure that the 'Allow Remote Control' is disabled on all doors of this building/office which are used for entry as well as exit. By doing so, the only way the users (other than the owner) can open these doors is by scanning the code at the door and not from remote. With this configuration, the system will keep a count of the number of people within the room/building/office. Note: The device_group is the same as the room or building and you could set device_group_name as the same as the room or building name

To display the number of people currently in the office/building (Device Group), click on 'Devices Groups' under under 'Device groups' in the dashboard menu. You will see the occupancy in all the groups that you have created as shown in Fig 38D. Note: Ocuuupancy will be displayed only if you have at least one group configured with either separate doors for entry and exit or separate exit tags for exit on ENTRY/EXIT doors. Also, note that the accuracy of this depends on several factors such as 1) No one should be using any other means other than wifisecureaccess App to open/close the door/gate. 2) Remote access to open or close the door/gate must be disabled on ENTRY/EXIT type of doors/gates, and 3) Not more than one person enters or exits with one commad to open or close. You can re-correct this number any time manually by editing this field.
Fig 38D: Displaying Occupancy in an Office/Building

4.7  Group Use Records

The system keeps record of the use of all the doors/gates of this group. At any time, you can see who used this group at what time. To see the group use records, click on 'Group Use records' under "device groups' in the dashboard menu. If you have created multiple groups, you will be prompted to select the group. Once selected, you will see a page similar to Fig 38E.

You can download these use records to your computer, if you want to do so for keeping any records, or for analysing the data. To download, click on 'Download Group Use records' under Device Groups in the dashboard menu. There you can provide the dates between which you want to download the data. Leaving any of these dates will take that date as open-ended. Leaving both dates as blank will download all the available use records for the past 30 days.

You can also add a program in any of your applications to download these records, and do analyis. These use records can be read using a python program. Refer to section 9.2 of this documenation.

Fig 38E: Group Use records

5  Public Access Places and Public Parking Lots

WifiSecureAccess provides a smart and cost effective system to manage access to public places and parking lots. Access to public places such as public transport, cinema halls, hotels, public/community event centers, or any such places can be managed easily and convieniently using our systems. In addition to managing access to people for such public places, one can use WiFiSecureAccess system for managing public parking. With this platform, there is no further need to have any ticketing and ticketing machines. Customers can use their smart phones to access these. They can swipe the QRCode or NFC tags fixed at the entry gates/doors to get access. If there is an entry fee or parking fee, the customers will be charged either at the entry or exit automatically through their credit card.

With this system, customers can also book and hold a place from remote. All the registered public places as well as Parking lots will be shown on a google map. Public can also see on the map the current availablity of all these registered public places and parking lots. They can see how many spots or seats are currently available, the opening and closing hours, and the the entry fee or parking fee, if applicable.

The owner of these public places or parking lots can configure access fees or parking fees. They can configure opening and closing hours, In this section of the documentation, you will learn how to register such public access places with WifiSecureAccess system, how to install smart devices at the entry and exit and how to integrate that with the gate actuators and how to configure the access control.

In this document when we say 'parking', it is also applicable to 'people checkin' and vise versa.

5.1  Installing Smart Devices and Cabling them to door/gates/Boom Gates

Cabling the Device to actuators on the doors and gates, or to boom gate of the parking lot is described section 2.8 of this dfocument. Install smart devices at every entry gate and exit gate of the public place or parking lot. Either install the scanner or print additional QRCode label (or NFC Tag, if you are using NFC Tags) of the device and locate it at the convenient place at the gate so that the customers can scan them easily. Refer to section 3.7 of this documentation if you want to use additional QRCode or NFC tag other than the ones used with the scanner.

5.2  Enabling and using ultrasound sensors, if needed

If interested in detecting the vehicle in each and every bay of a parking lot, you need to install WiFiSecureAccess controller at every bay of the parking lot and cable ultrasound sensors to it. Then position the sensor to detect the vehicles when parked in that bay as explained in section 2.9 of this documentation.

If ultrasound sensors are installed and cabled to WiFiSecureAccess controller in that bay, that controller has to be configured to use the ultrasound sensor. To do so, click on 'Configure Device' in the left menu bar under Device Admin in Dasboard. Then select the controller to which the sensor is cabled. In the page that opens, you will see a field name 'USOUND'. By default, this is set to 'No'. Select USOUND to 'YES' as shown in Fig 24. Then press Submit.

Fig 24: Configuring Ultrasound Sensor

Now, you can see the distance read by the ultrasound sensor on the Device Details page. Click on 'Show Device details' in menu bar in the left under Device admin. Then select the device. In the device details page that opens up, click on sensor Values. You will see a page similar to Fig 26 with the current value read by the ultrasound sensor under U_SOUND.

Fig 25: Ultrasound Display

Refresh the page again to read again. Move the objects around ultrasound sensor and notice the actual distance measured. You need to refresh the page every time you move the sensor to display the new distance. Now, if this device is attached to a parking lot, the controller will detect automatically when a vehicle is parked in that bay.

5.3  How to register a Public Access Place or a Public Parking Lot with WiFiSecureAccess

You need to first register your public place or parking lot with WiFiSecureAccess providing a unique name and its address. Address must be identifiable by Google maps. To register, click 'Dashboard'. If you have not used WiFiSecureAccess yet, you will be asked to login or register yoursef and will be taken to a login page. Once loged in, you will be taken to the index page where you will see several options. If you have not purchased and registered any WifiSecureAccess controllers yet, you will see some tabs to 1) 'Take ownership of a device' and 2) Create a Virtual Device. If you have purchased a controller, click on 'Take ownership of a device' and follow the prompt. Or, if you want to work with a virtual devive, click on 'Create a virtual device'. A virtual device is just a label with a QRCode, or NFC tag. A virtual device is enough to manage access to public places and parking lots if you do not want it to control its gates or doors. Physical controller is required to control the doors and gates at the entry and exit. Once you have taken ownership of a controller, or created a virtual device, you will see a button named 'Register Public Place/Parking Lot' in the main dashboard page. If you already have another parking lot in the system, you will see a button name 'Public Place/Parking Lot Admin'. If so, click 'Public Place/Parking Lot Admin'. That will show the button 'Register Public Place/Parking Lot'. Then click on 'Register Public Place/Parking Lot'.

Fig 62: Initial home Page

Fig 62A: Initial home Page after owning a device

Fig 63: Register Parking Lot

When you click 'Register Public Place/Parking Lot, you will be presented with a page similar to Fig 63. This form is asking you to enter iits name and the address of the public place/parking lot. The name must be unque in the system. You cannot use a name that is already used by others. It will prompt you if it finds a conflict. Enter the address correctly. Also choose Access Type correctly. If this is a public place such as cinema hall or any public event hall for people access, then select Access Type as 'People Access'. If this is a parking lot, select Access Type as 'Vehicle Access'. Also select whether you want to allow booking or not. Then press submit. If you have entered a valid address, it will add this public place/parking lot into the system and will display a page similar to Fig 64 showing the details of all your parking lots. If the system is unable to find such an address, it will display some error messages. Correct the errors and re-submit.

Fig 64: My Parking Lots

On this page, you can make any additional changes. You will see several additional fields in this form. They are:

    1. Device Usage: This field is autoset and cannot be changed by users. This field is for information only. This field shows whether the public place/parking lot has devices installed at every seat/bay of the public place/parking lot. If you want to manage every seat/bay of the place, you can install devices at every seat/bay in addition to controllers (devices) at the entry and exit. If you ever install like that, this 'Device Usage' field will show it as DEVICE AT EVERY SEAT/BAY'.

    2. Hold Time: This is the time in minutes a seat/bay in a public place or parking lot can be held by a customer while driving to that location. The default is 0, indicating that holding a seat/bay is not allowed. If you set this field as 0, nobody can hold a a seat/bay. To allow this feature, set the Hold Time to the number of minutes that you woould like to allow holding.

    3. Category Option: There are two options here. 1) ALLOW CATEGORY DOWNGRADE and 2) DO NOT ALLOW CATEGORY DOWNGRADE. If you select the first option, customers can access a lower entry/parking category when the seats/bay in the category of the customer is full. For example, if the public place/parking lot has several categories of checkin, and if the customer's category is, say, 4 and, say, if all seats/bay in categoty 4 are currently full, the customer will be allowed to checkin to category 3 if seats/bay in category 3 are available, if this field is set to "ALLOW CATEGORY DOWNGRADE". These categories have to be configured for your public ploace/parking lot after registering the public place/parking lot. In the later sections of this document, you will find the steps for that.

    4. Allow Waiting: If you choose the option “Allow Waiting”, customers will be allowed to enter the public place/parking lot and wait within the public place/parking lot when the place is full. On the other hand. If “DO NOT ALLOW WAITING” option is chosen, no customer will be allowed in when it is full.

    5. Info Link: You can give a url of your website here (if you have one) describing more about your public place/parking lot. If a link is given, that link will be available for customers to click in the pop up window in the Google map. They can click on the name of your public place/parking lot and it will take them to your site.

When all fields are entered correctly, press Submit. Now that you have registered you public place/parking lot, you can see this in a Google Map. Click 'Public Pl/Parking Lot Map' under 'Public Place/Parking lot' in the Dashboard menu in the left sidebar menu.

Fig 65: show Parking Lot on a Google Map

On the google map, you will see a marker at your address, as shown in Fig 66. The colour of this marker will be red when there is no space available for parking. It will change to green when there are parking space available in this parking lot.

Fig 66: Parking Lot on a Google Map

Click on that marker. It will show a pop up window similar to Fig 67.

Fig 67: show Parking Lot on a Google Map Showing Availability

By default, number of seats/bays available is set to 1 in the default categoty 'General'. So, if you click on the marker against your place in the google map, it will show the availability as 1 in General category. The popup window that is displayed when you click on the marker will show links to directions to this location. If you have enabled booking and hold, you will see links to book a seat/bay as well as to hold a seat/bay in this public place/parking lot. If you had entered a url for your parking lot in the info link when you created the parking lot, motorists can get to your website by clicking the name of your parking lot in the poped up window.

The Google map shows all the registered public places as well as parking lots. The marker will be red, if no seat/bay is available in that place at this time.

Described above are the steps for registering your public place/parking lot with WiFiSecureAccess. In the following sub-sections of this documentation, we will describe how to configure further details of this public place/parking lot and make it available to public.

5.4  Configuring Devices at Entry and Exit Gates or Doors

It is now necessary to configure all the smart devices that are installed at the entry and exit gates of this public place/parking lot. Do the following steps on each and every one of those smart devices. As mentioned earlier, the devices can also be virtual device with just a QRCode or NFC tag.

Click on 'Configure Device' under Device Admin in Dashboard. You will see a page similar to Fig 68.

Fig 68: Configure devices in Parking Lot

Choose a device installed and cabled at the entry or exit doors/gates/seats/bay. To make this smart device a part of your public place/ parking lot, select and choose your public place/parking lot from the pulldown menu of the Public Pl/Parking Lot field of this form.. The system finds the timezone of the device from the address of the parking lot. So, try not to change it. Give a name of your choice to this device. And, select the 'Use type' as 'ENTRY TYPE', if this device is at the entry gate, or 'EXIT TYPE', if this device is at the exit gate of the parking lot. If the device is installed at a seat or bay, choose 'ENTRY AND EXIT'. Then press Submit. If this device is not a virual one, you will notice that the device gets restarted and the LED colour changes to Green.

You can set 'Allow Remote Control' to 'No', if you want to. If you set it to 'No', those who are allowed in the selected group will not be able to activate this device from remote. If selected 'No', the only way anyone (other than the owner of the device) can activate it is by scanning its QR Code or NFC tag. Note that this has nothing to do with the public. Public people can activate it only by scanning the QR code or NFC tag regardless of this setting.

Note: Depending on the type of door/gate, you may have to selectively add the word 'Parking', or 'Gate' in the device name or its port label, as explained in section 3.7 through 3.10 of this documentation. For operating the actuators on the door/gate/boom gate, this naming is required so that the controller knows what type of actuators it is controlling.

It is possible to install this device as a parking meter at every bay of roadside parking. If you want to do that, ultrasound sensor has to be installed on the device to sense the presence of a vehicle. Connecting ultrasound sensors to the smart device is explained in section 2.10 of this documentation. Position the ultrasound sensor to sense the presence of a vehicle in that bay. Then, in the 'Configure Device' page, select USOUND as YES. And, select Use Type as 'ENTRY AND EXIT'. You also have to assign a bay number. Try to give the bay number something meaningful. You could name the bay as, for example, A1 meaning this is in row A, position 1.

If smart devices are installed at every bay, try to give bay numbers similar to 8A4, meaning it is on 8th floor, row A, position 4. That kind of numbering of bays will not only help the customers to locate the bay easily, but also will help the system in helping motorists to suggest nearest available parking bay.

Installing ultrasound sensors are required only if you want to sense if anybody is illegally occupying a seat/bay without proper checkin. Installing sensor will also help send notifications to the administrator of this public place/parking lot when someone is occupying a seat/bay without checking in and when parking is expired.

You will also notice that the Use Type has another option called 'PRIORITY GATE'. This is a gate that can be used for special parking categories within a public place/parking lot. If a smart device is installed at these gates, 'PRIORITY GATE' option must be selected for that device when configuring it. In later sections of this document, you will learn how to create special categories of customers.

PS. Devices of use type as "PRIORITY GATE' must not be installed at any main entrance. It must only be installed within a public place or parking lot to move fom one category to another (or from one section to another). Devices of this type does not validate a checkin. It allows those who are checked in to move from one section to another based on their special categories.

5.5  Configure Entry/Parking Categories and maximum Spaces Available in Each Category

The next thing to do after registering a public place/parking lot is to configure entry/parking categories and number of spaces available in this public place/parking lot in each category. There are two types of access categories: 1) General and 2) special. General categories are for general public whereas the special categories are for restricted public. These categories will help setting different access fees and access times for different categories of checkin. Special categories are reserved for those whom you authorise. At the time of checkin, the customer selects which category he wants to checkin. If he has chosen a special category, the system will check if he is authorized to check into that category. You can create a maximum of 10 categories with different priorities in each. A category priority numiber greater than 9 is considered as special category. The higher the priority number, the higher is the priority.

To create an access category in the pblic place or parking lot that you own, click on 'Access Catogories' under 'Public Place/Parking' in the dashboard menu. That will open up a page as shown below.

Fig 70: Configure Checkin/Parking categories

If this is the first time you are opening this page, it is possible that you may find that GENERAL category is pre-configured by the system with a maximum lots as 1. You can delete, and/or add more categories. In each public place/parking lot, the Category name and category Priority must be unique, meaning that no two categories can have the same name and same priority. When you enter a priory number greater than 9, it is assumed that it is a special category and '(SP)' will be added automaticallt by the system to the name of the category. This is to distinguish it from the other categories. You may also enter how many maximum spaces are available in your public place/parking lot. If this is a public place or parking lot with devices in each seat/bay with ENTRY AND EXIT mode, the maximum Lots is auto-calculated, and whatever you enter will be over-written by the system.

The system gives an additional feature of 'Max Waiting'. This is a number of people/vehicles that can wait inside the Public Place/Parking Lot when the place is FULL. By default this is 0. You may enter any number in this field if you want to allow this in your public place/parking lot.

Once you entered all the fields, you may press the Submit button. When you press Submit, you may see a messages saying that a Tarrif Table has been created automatically with free checkin/parking. You can change ths by clicking appropriate links in the “Parking Lots Admin” page, as described in the following section of this document.

Now, if you click on “Public Pl/Parking Lots Map" under Public Place/Parking Lot Admin in Dashboard, you will see that the marker on your parking lot is Green and, if you click on that marker, the pop up window will show the number of spaces available in each category you configured. It also shows the tariff as 0.0, as the default tariff (check-in/parking fee) is free.

Special categories

As mentioned earlier, you can create special categories for special people. If you have created any special category with priority greater than 9, general public cannot check into these areas. Only those whom the owner of the public place/parking lot has approved can get access to there. To approve someone to check-in/park in any of these special categories, the owner has to add their email address against each of those category. It can be added by the owner of this public place/parking lot by clicking “Special Category Members” on the “Public Place/Parking Lots Admin” page. When you click that link, you will see a page similar to Fig 71. If you own more than one public place/parking lot, you will be prompted to choose one before getting to this page.

Fig 71: Adding Customers to Special category

On this page, select the category and add the email address of the customer whom you want to add to any special category. When you add an email address, choose which category you want to add that person to. You can choose any category that you have created including the general categories. Adding to general categories will not have any effect on their access. However, the discounts that you set will be used in computing fees and fined to those in the general categories. Add one customer at a time. Press Submit button when you add one entry. To add a customer's email, that customer must have registered with wifisecureaccess.com. in fact any customer who checks-in/parks in these seats/bay will have to install our mobile app to scan the QR code or NFC Tag at the entry and exit. So, they need to register with wifisecureaccess.com.

When adding a customer to a special category, the owner can also specify any discount in entryt/parking fees for those customersi on an individual basis. '%Parking Discount' and '%Fine Discount' are the percentage discount offered to tose customers added to any of these categories. So, by entering selected customers, the owner of the public place/parking lot can offer discounts for them. This discount can be offered to any selected customer in any category. You can also set Start Date and Expiry Date for each customer in Special categories. If set, this customer will be allowed only during the period between Start Date and Expiry Date. Customer will be removed from this special category automatically. These dates must be entered in the format yyyy-mm-dd hh:mm, where hour(hh) is in 24 hour format. Leave them blank if you want to allow this customer all the time during the period the place is open.

Note: There is an additional feature that may help some times: If you have added a customer in any of the special categories, and at the time of his checkin, if the place is full in that special category, what must be done ? This is decided by the "Category Option' setting in the Public Place/Parking lot as discussed earlier (Fig 65). If you set that as 'ALLOW CATEGORY DOWNGRADE', that customer will be allowed to check into the general categories if those categories are available. If you set that to 'DO NOT ALLOW CATEGORY DOWNGRADE', that customer will not be allowed to checkin when the special category to which he is authorized is FULL.

5.6  Updating members of Special category through an HTTPS POST call from any of your other applications

Similar to what we have explained in section 4.4 of this documentation, you can integrate wifisecureaccess with any of your applications (such as online booking) and update the special category through an HTTPS call from that application to wifisecureaccess.com. If WiFiSecureAccess controllers are installed at the gate of parking lots to control the boom gate (or whatever door they have), the application platform that makes the booking can enter the customer's email and their start date and expiry date directly into the allowed user's list of the group associated with the controller device. If done, the customer will be allowed to enter the parking lot or public place during the period between start-date and expiry-date. The customers can open the gate by scanning the QRCode or NFC tag fixed at the gate. Thus, this is an ideal system for public places (such as cinema halls and other public event places) and parking lots. This eliminates the need to carry tickets and other documents to enter the place..

To add customers to a special category of a public place or parking lot, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/addMembersSpCatJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "parking_lot_name": parking_lot_name, "customers": customers }

-where customers is a double list of customer details.
customers = [customer1, customer2, customer3, ....]
-where each customer is a list as below:
[email_address, start_date, expiry_date, fee_discount, fine_discount,]

Note: Whenever we use the word 'parking lot', it also means any public access place in addition to parking lot

For example, if you want to add two customers to the allowed group of a device (controller), the customers should be as follows:
customer1 = [customer1_email, customer1_start_date, customer1_expiry_date, customer1_fee_discount, customer1_fine_discount,]
customer2 = [customer2_email, customer2_start_date, customer2_expiry_date, customer2_fee_discount, customer2_fine_discount,]
customers = [customer1, customer2]

Note: Leave start date and expiry date as "", if there is no start date or end date for that customer. If there is no start date, that means that the customer can access immediately. If there is no expiry date, the customer is authorized forever.

As mentioned before, fee_dscount and fine_discount are in percentages (0.00 to 100.00)

You can also remove customers from a special category with another HTTPS call as follows:

POST HTTP/1.1
Host: wifisecureaccess.com/removeMembersSpCatJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "parking_lot_name": parking_lot_name, "customers": customers }

-where customers is a list of email address of the customers that you want to remove from the allowed list.
customers = [customer1_email, customer2_emal, ......].

Refer to section 8.3 of this documentation below to see more details about this and to see a sample python program.

5.7  Uploading members of Special Categories from a file

If you have a file with email addresses of all the members whom you want to add to the special categories, you can upload that directly to any of the special categories. The file must be a txt file with multiple lines, with each line for each customer. The format of each line must be as follows:

    customer_email, start_date_time, expiry_date_time, entry_fee_discount, fine_discount
Each line must have the first field as customer email address. The second and third, fourth and fifth fields are optional. All these field are to be separated by comma (,). The start date and time at which that customer will be allowed, and the expiry date and time when his access will be revoked. The fourth field is the percentage entry_fee discount. The fifth is the percentage fine discount. If you leave any of them, the default values will be assigned. Customer email must be provided and cannot be omited. The format of the start_date_time and expiry_date_time is yyyy-mm-dd hh:mm. Entry_fee discount and fine discount are perntages and so, they must be decimal number between 0.00 and 100.00. Here is an example file with four customers.

    abcd@gmail.com, 2021-10-15 10:30, 2021-11-20 12:00, 20.0, 10.0
    xyz@gmail.com, , 2022-06-10 2:00, 39.0
    john@gmail.com
    jason@gmail.com, 2021-06-12 5:30
The date is in 24 hr clock in the format YYYY-MM-DD hh:hr.
Add additional line for each customer.

If you have such a file, you can upload that to any of your special categories of any of your public place or parking lot. Click on 'Upload Spl Cat Members' under Public Place/Parking Lots Admin in the Dashboard menu. That will prompt you to select the public place/parking lot. In the opening page, select the access category. Then select the file (browse) by clicking on the File tab. That will help you select your file from your computer. Then presss Submit button. That will update the special category of that public place or parking lot. This process will not delete any of the existing members. Instead, this process add all the customers in this file to the existing members. If a customer is already in the special category, this will not overwrite it from the file. In that case, that line in the file will be ignored.

5.8  Configure Access Fees or Parking Fees

To configure entry/parking fees and fines, click on 'Fees and Fines' under 'Public Place/Parking Lots Admin' in the Dashboard menu. You will be presented with a page similar to Fig 72.

Fig 72: Configure Parking Fees and Fines

Check-in/Parking fee form presented in this page (Fig 72) has several fields. To see all the fields in this form, you may have to move the slider to the right. By default, you will see a separate row for each configured category. If not, you may have to add them. If no fee is configured for any category, it will be assumed that check-in/parking in that category is free and entry is allowed all the time of the day, every day of the year.

The following is the explaination of every field in this form. This will help configure fees and fines to meet your requirement.

    Category: This is the checkin/parking category for which this tarrif applies. select one from the pulldown menu

    Week and Day: 'Week' and 'Day' are the week number of the calendar year (Gregarian Week number) and day of the week respectively. By default these are set as *, indicating that the check-in/parking fee is the same any day of the week in every week of the year. However, if you want to set different fees for different days of the week, you can select the day for which this fee is applicable. Similarly, if you want to set different fee for different weeks in the year, you can enter the week number. If you do not know the week number corresponding to a dtae, just enter any date within that week. It will find its week number. Keep in mind that if you are setting a fee for, say, Monday of the week, and leave week as *, that fee is applicable for every Monday of every week. If so, you will have to set another fee for the other days of the week.

    Tariff Slab: This is the parking fee structure in slab format, with multiple sub-slabs separated by comma(,). This has a format as follows:

    <duration in minutes from the start of parking >:<tarrif>, <duration from the start>:<tarrif>, ...

    If the trrif_slab is left blank, it is assumed that the access is free.

    Each sub-slab is separated by a comma(,). Each sub-slab has a duration (in minutes) and a fee for that duration, separated by colon (:). The fee is in decimal format. The currency is what is set for each public place/parking lot.

      Examples:
      2:2.0, 3:3.0, 4:4.0, 1440:15.0
      This example has four slabs. The first one is 2:2.0. That means that the fee for the first 2 minuttes is 2.0. The second slab is 3:3.0. This means that if the total duration is 3 minutes or less, the fee is 3.0. The third slab is 4:4.0. This means that if the total duration of parking is 4 minutes or less, the fee is 4.0, and the final slab is 1440:15. This mean that if the duration is 1440 minutes or less, the fee is 15.0.
      Another example:
      180:0.0, 360:5.0, 600:7.0, 1440:10.0
      This means that $0 for the first 180 minutes, $5 if the duration is 360 or less, $7 for 600 minutes or less, $10 for 1440 minutes or less
      Note: if 1440 is not given, it is assumed that the charge of the previous slab will be carried forward fo the entire day
      Another example:
      1440:0.0
      This means that it is free for 24 hours.
      This can also be achieved by leaving the slab blank.
      Note: A slab such as 0:6 will be ignored. This is the same as 1440:0. So, if the slab is 0:6, it will be treated as free
      180:10, 0:15 . This means that parking fee is $10 for the first 10 minutes, even if duration is 1 minute, still it is $10. And if parked for more than 180 minutes, fee is $15.0
      The above slab is the same as 180:10, 1440:15
      180:6, 0:15, 300:20 This is the same as 180:6, 300:20, 1440:20
      180:6, 300:15, 200:20 This is the same as 180:6, 300:15, 1440:15
      1440:10.0 This means that fee is $10 if you checkin/park for any duration between 0 miniutes and 1440 minutes (one day)
      If you want to charge $6.00 per hour for the entire day, enter the slab as follows:
      60:6.0,120:12.0,180:18.0,240:24.0,300:30.0,360:36.0,420:42.0,480:48.0,540:54.0,600:60.0,660:66.0,720:72.0,780:78.0,840:84.0,900:90.0,960:96.0,1020:102.0,1080:108.0,1140:114.0

    Fine Slab: 'Fine Slab' is the fine charged, if one checks-in/parks more than the maximum check-in/park duration. This slab has the same format as 'Tariff Slab'

    Start Time and End Time: The 'Start Time' and 'End Time' are the start time and end time for the fee. These are in 24 hour clock in the format hh:mm. Outside this time, it is assumed that there is no fee. If you want to apply the fee for the entire 24 hours of the day, leave these two fields blank.

    Max Checkin/Park Duration: 'Max Checkin/Park Duration' is the maximum duration allowed to be checked-in/parked in minutes. By default, it is 24 hours (1440 minutes). If anyone is occupying beyond maximum duration, the check-in/parking has to be either extended (if allowed) or fine will be applied.

    Min Park/Book Duration: 'Min Park/Book duration' is the minimum time in minutes that one can park or book a seat/bay in this public place/parking lot. By default, it is 30 minutes. You can change it to anything.

    Open Time and Close Time: 'Open Time' and 'Close Time' are the opening and closing time of this public place/parking lot. They must be entered in 24 hour clock in a format hh:mm. Outside this time, the availability in this public place/parking lot will be advertised as 0 in the Google map. If you leave the 'Open Time' and 'Close Time' blank, it is assumed that this public place/parking lot never closes.

    Checkout Extendable: 'Checkout Extendable' can be either 'EXTENDABLE' or 'NOT EXTENDABLE'. If 'NOT EXTENDABLE' nobody will be allowed in when their check-in/parking expires. They will not be able to extend their check-in/parking. Fines will be applied if anybody occupies beyond maximum check-in/park duration.



You need to create separate tariff entry for each category.

If you have multiple opening and closing times within a day, enter separte row for each of those. For example, if this is used for entry control to cinema halls where there are multiple showing (multiple sessions) in a day. you enter each row of tarrif table for each session. Opening and closing times of one session cannot overlap with another.

Once you have created this tariff table, you can see in the google map this tariff shown against your public place/parking lot. So, the public customers can know the check-in/parking fee of your public place/parking lot before they arrive at the public place/parking lot.

5.9  Enable/Disable Booking/Check-in/Parking in a Public Place or Parking Lot

Booking is disabled by default when a public place/parking lot is registered. You can enable booking in any public place/parking lot by clicking 'My Public Places and Parking Lots' under Public Place/Parking Lot Admin in the dashboard menu and selecting 'Allow Booking' to 'Yes'. This selection allows bokking to all categories created within this public place/parking lot unless selectively disabled for each category.

However, you can selectively disable booking in any category during any specific period of the year. To do so, first click on 'My Bookings' under 'Public Place/Parking Lot Admin'. If you have registered more than one public place/parking lot, you will be prompted to select one. Once selected, you will be presented with a Table similar to Fig 73 showing all the current bookings in all categories in selected public places/parking lots.

Fig 73: Enable Booking

If the booking is currently disabled in any category, you will see an entry with Status as NOT_BOOKABLE and the customer is ADMIN@WIFISECUREACCESS.COM. This entry will be seen for each parking category for which booking is disabled. That entry also has a start date and end date. It is between those dates, the booking is disabled. If you want booking to be enabled throughout the year, delete this entry by checking the Delete box and pressing Submit button. Once you have deleted this entry, public customers will be able to book in that category in that public place/parking lot.

Once booking is enabled, public customers will see a link 'Make a Booking' in the pop up window against your public place/parking lot in the google map. You can check this by clicking 'Public Pl/Parking Lots Map' in the Public Place and Parking Lot Admin. Click on the marker on your public place/parking lot. In the pop up window, you will see a link to “Make a booking”.

When the customer arrives at the public place/parking lot within 15 minutes of his booking, and when he scans the QRCode or NFC tag, the system will check and verify his booking and allow him to check-in/park against this booking.

This page also helps disable booking in any category during any specific duration of the year. You can disable booking between any time of the year. To do so, click on 'Add Booking' in the 'Public Place/Parking Lot Admin'. If you own more than one public place/parking lot, system will prompt you to select a public place/parking lot. Then, you will be presented with a form similar to Fig 74.

Fig 74: Add an Enable/Disable 'No Parking' or 'Booking'

Select the category and enter the start date and end date between which you want to disable booking. These dates must be entered in a format 'yyyy-mm-dd hh:mm'. Then, in 'Booking Status', select 'NO_BOOKING' and press Submit. Note: You can also disable check-in/parking in any public place/parking lot between any dates, if you want, by selecting 'NO CHECK-IN/NO-PARKING' in this form.

5.10  Check Status and Use Records of Your Public Place or Parking Lots

You can check the current status of your public place/parking lots, as well as the previous check-in/parking records. On the “Public Place/Parking lots Admin” page, you will see the tabs: “Checkin/Parking Status”, “Single Bay Detail”, “Lot availability summary”, “Checkin/Parking records”. You can click on any of these to get the current status as well as previous records of your public place/parking lots. Note: “Single Bay Detail” is for those public places/parking lots where each seat/bay has a Smart device.

For administrative reasons, if the owner of the public place/parking lot finds it necessary, he can forcefully checkout a person or /unpark a vehicle that occupies in any of the public place/parking lot that he owns. To do that, click 'CheckOut/Unpark a Vehicle' in the 'Public Place/Parking Lot Admin'

The system keeps checkin/parking records only for 30 days. The owner of the Public place/parking lot can see these records by clicking 'Use/parking records' under 'Public Place/Parking Lot Admin' in the dashboard menu. These records can also be downloaded to a local computer for any future analysis. to download, click on 'Download Use/Parking records' under 'Public Place/Parking Lot Admin' in the dashboard menu. If the owner of the public place/parking lot wants to inegrate downloading within any of their application programs, they can do so by writing a small segment of a progra. This is explained in section 9.4 of this documentation.

5.11  How to create a Stripe account for Receiving Fees from customers

If you are charging fees, you have to create a an account with Stripe.com and connect that account with wifisecureaccess.com. First, login to Stripe.com and open an account. Once an account is opened, go to https://wifisecureaccess.com. Click “Public Place/Parking lots Admin” on the Dashboard. If you have registerd public places or parking lots with WiFiSecureAccess and if you have not yet connected your stripe account with wifisecureaccess.com, you will see a button “Create/Connect Stripe account” at the bottom of this page as shown in Fig 75.

Fig 75: Connect Stripe Account

Click on that link. That will take you to stripe.com. Follow the prompts. Once you have entered all the information on that page and submit, it will connect your steipe account with wifisecureaccess.com and take you back to “Public Place/Parking Lots Admin” page of wifisecureaccess.com. At this time, if your account has been successfully connected to wifisecureaccess.com, the link at the bottom will show “Disconnect Your Stripe Account”. You can disconnect your stripe account from wifisecureaccess.com by clicking this link. But, please keep in mind that if your account is not successfully connected, entry/parking fees will not be collected transferred to your stripe account.

5.12  Monitoring and Managing Check-in and Parking by public customers

When Public places or parking lots are in the system, everyone can see a button 'My Checkin/Parking Admin' in the Dashboard. This is a link to the public (customers and Motorists who want to use these places)) to manage their checkin or parking. They can also locate a public place or parking lot in a city and to see and manage their parking. If they click on that link, they will see a page similar to Fig 76, if they have not registered any vehicle yet with our system.

Fig 76: My Checkin/Parking Admin

Now, click on 'Add a Vehicle'. That will show a page similar to Fig 77.
Fig 77: Register a Vehicle with WiFiSecureAccess.com

In this form, State and Country are the state and country where this vehicle is registered with the Goverment Authority. For example, if the vehicle is registered in California in USA, enter CA for State and USA for Country. Press Submit after entering these information.

Once you press Submit, it will register your vehicle with WiFiSecureAccess against your account and display a page similar to Fig 78 showing all your registerd vehicles. In this page, you can add any additional vehicles or delete any registerd vehicle.
Fig 78: My Vehicles

Once you have registerd a vehicle with wifisecureaccess.com, you will see a page similar to Fig 79 when you click 'My Checkin/Parking' under Dashboard.
Fig 79: My Checkin/Parking Admin

There are several links on this page that will help the public to manage checkin and parking.
    1. 'Show All Public Pl/Parking Lots on Map' : Click this button to see all registered public places and parking lots in the system on a Google map. They will see either a green marker or a red marker at the public places and parking lots. The marker is green if there are spaces available in that public place or parking lot and it is red when the place is full at this time. Click on this marker to see futher details of this public place or parking lot. They will see a pop up window. They will see its name, available access/parking categories, available spaces in each category as well as access/parking fee in each category at this time. If the owner of the public place/parking lot has provided a link to the url of this place, they can go to their site by clicking the name of that public place or parking lot. Also, if the owner of this place has enabled booking, they will see a link to "Make a Booking'. And, if the owner has set a hold time, they will see a link to 'Hold a space'. If yes, they can click that link to hold it. Then follow the prompts. If successful, they can hold a space space in that public place or parking lot while driving to that place. Note: This feature of holding a spot is available only if the place has smart devices at every seat/bay.
    2. 'My Vehicles': Clicking this link will take them to a page showing all their registered vehicles. They can add more vehicles or delete any registered vehicles on this page.
    3. 'My Checkin/Parking Status': If they click this tab, it will display the checkin/parking status of their checkin status or parking status of their currently parked vehicles. If they have checked into a public place or parked a vehicle in any parking lot, this will display the duration of checkin/parking, time when it expires, access/parking charge accumulated so far, and a link to extending checkin/parking, if extension of parking is allowed by the owner of that place.
    4. 'My Bookings': Clicking this tab will take them to a page showing all their current bookings. They will be able to make any modification of their booking in this page, if allowed.
    5. 'Share My Vehicle': This tab helps you to share their vehicle with friends and family. If they share, those whom they share with can use this vehicle to park in any of the parking lot.
    6. 'Vehicles Sharing': Clicking this tab will display all the vehicles that are shared between them and others.
    7. 'My Checkin/Parking records': This tab helps them to see all their checkin/parking records in the last 30 days. The system keeps record of every public customer for 30 days, and and they can see where and when they checked in or parked, how long they parked and what access/parking fee and fine they paid in the past 30 days.

We recommend clicking these links and get a feel of what all public customers can do.

Checkin/Parking: In order to checkin or park, public customer needs to sacn the QRCode or NFC Tag at the entry of a public place or parking lot using the WifiSecureAccess App on their smart phone. Open the app in their smart phone, press 'Scan QRCode' and scan the QR Code placed at the entry or exit door/gate of the place. If they have used NFC Tags instead of QR Codes, press SCAN NFC TAG. If they have not yet regustererd with wifisecureaccess.com, they will be promted to register. If this is a public access place or parking lot with an access fee, they may be prompted to register their credit card. When scanning at the exit gate, access/parking fee will be computed and will be charged to their credit card. The system will automatically transfer the parking fee (minus Stripe fee) to the Stripe account of the owner of that public place or parking lot. If they have not used your credit card yet for checkin/parking with wifisecureaccess.com, the system will prompt them at the entry to register it and will charge $1 at the entry while registering. Once registered, stripe.com will remember their credit card details and, thereafter, the system may not request them to enter credit card details again for future checkin/parking in any public places or parking lots managed by WiFiSecureAccess.

6  Emergency Access when power or WiFi fails

WifiSecureAccess controller is a very safe and secure system. It has provisions to open the door when you are locked out either due to a power failure or WiFi failure. For this feature to be available, the scanner has to be installed and wired to the main controller as described in section 2.1 of this document. The scanner is installed on the outside of the door. When either power or WiFi fails, open the scanner box. If it is a power failure to the main controller, you can apply 12VDC power to either J1 or J2 connector on the PCB of the scanner. You can apply this using a battery. The battery must be able to provide at least 500mA current at 12VDC. Once you connect this power, you will see that the LED comes ON and tries to join the WiFi. If successful, the LED will turn to solid RED after initial flashing Blue. When it is in solid RED state, you can open the door/gate by any of the usual methods that you normally use. It could be either by scanning the QRCode or by pressing the 'Activate a Device' tab on the WiFiSecureAccess app on your smart phone, or by voice command through GoogleHome or alexa on your smart phone.

If the WiFi has failed, you will see that the LED blibks BLUE and will stay in that loop for ever. If so, you enable hotspot on your smart phone. set the ssid and password of your hotspot as MyPhone and 12345678 respectively as described in section 3.2 of this document. After enabling hotspot on your smartphone with this ssid and password, do a factory reset of the controller as per the steps given in section 3.5 of this documentation. You will see a wiFi Reset (or, factory rest) button and a RESET button on the PCB of the Scanner. Press and hold the WiFi reset button. While holding it down, press and release the RESET button. You will see that the LED blibks and then stays steady as BLUE. When it is staying BLUE, press and release RESET button once more. The hotspot on your smartphone must be ON at this time with ssid as MyPhone and password as 12345678. If so, you will see that the device connects to that WiFi and LED comes to a solid RED state. At this time, the controller is ready to be used. and, you can open the door by any of the methods that you have been using.

If LED does not come to a solid state, and if it continuously flashed BLUE, that means that either the factory reset is not done properly or the hotspot on your smart phone is either not set up correctly, or your smartphone's mobile data is not enabled for the controller to get internet connection after joining the WiFi. Fix this error and try again.

WiFi of the controller can be set to its original any time later by following the steps given in section 3.4 of this document. WifiSecureAccess system has the features to schedule actions either to execute once or to repeat daily or weekly. By configuring appropriately, you can schedule an action to open the garage door at a pre-set time of the day either once, or on a daily or weekly basis. This section explains how to do that.

7  Scheduling Timer Actions

WifiSecureAccess system has the features to schedule actions either to execute once or to repeat daily or weekly. By configuring appropriately, you can schedule an action to open the garage door at a pre-set time of the day either once, or on a daily or weekly basis. This section explains how to do that. To schedule actions, the device must be running firmware version 4.4 or above. Upgrade the firmware, if it is not running version 4.4 or above.

7.1  Schedling actions to execute on daily or weekly basis

You can configure scheduled actions either for one time or for repeated actions either on a daily baisis or a weekily basis. For example, say, you want the garage door open at 8:00 AM every day automatically. That is a scheduled action. Scheduled actions can be anything such a sending a notification email, or to open the garage or both. To schedule an action, first make sure that the device is running firmware version 4.4 or above. Then, click on 'Schedule an Action' under Dasboard menu. This tab is also available in the main index page of the dashboard. This menu will be available if you own a device. The device cannot be virtual and your virtual devices will not be shown in the piulldown selections. Once you click on that menu, it will prompt you to select one of your devices for scheduling an action for. If your action is only to send an email either regularly or just once, choose a virtual device. Once the device is selected, you will see a page similar to the following:

Fig 80: Schedule an Action

On this page, set the parameters for the scheduled aaction. Set the week and day of the year. The week is the Gregarian clendar week number of the year. If you do not know the week number, enter any date within that week in the format YYYY-MM-DD. It will find the week number. If you want the action to be repeated for every week of the year, leave this as * or blank. Similarly, select the day within that week. Choose it from the pull-down options. Leave it as * if you want this action to be repeated every day of that week. If you want this action to be done only on a specific day of the week, then select that day. And, if you want this action to be executed only during a specific week, enter that week number.

Note: If a week number is given, the scheduled action will be deleted at the end of that week, and will not repeat the same week next year.

Then, set the time of the day when this action to be executed. The time must be in 24Hr clock in the format hh:mm.
If you want a notification email to be sent at this time, select 'YES' for Send Email field.
Email Msg field is the message that will be sent in the email. This must be a short message not exceeding 256 characters

Next, select the Out Port. Out Port is the port to be activated at the scheduled time. You have only two options - either None or RELAY (or whatever you have renamed that RELAY pport to). If you want only an email to be sent without activating anything connected to the device, select Out Port as None. If you want the door/gate to be activated at the scheduled time, select the Out Port as RELAY (or whatever name that you have renamed this RELAY port to).

Then select the action to be executed at the scheduled time. select it from the pull-down meny (Open or Close).

If your scheduled action is only to send a notification email, you can select out port as None.

Note: If this is a garage door or gate, the garage door or gate will stay open uintil closed, uless AutoClose is configured. Refer to section 3.15 of this documentation for AutoClose mode of gates and garage doors. If this is a door to a house or building, by default, they are in auto close mode. The electric strike gets de-activated a few seconds after the door is open.

If the sensors are not installed, the current position is not accurately known. Therefore, it will toggle the current state at the time of executing the scheduled action. So, if the door/gate is currently closed, it will open it, and if it is currently open, it will close it.

You can create as many scheduled actions as you need. You can see all your scheduled actions if you click on 'My Scheduled actions' in the dashboard menu. There you can delete any scheduled action. But, you cannot modify any of the scheduled actions. To delete a scheduled action, check the Delete box against the Action at the right and click Submit button. You may have to scroll the page to the right to see this Delete check box. You can delete and create a new action, if you want.

Fig 81: Schedule an Action

8  Integration with your other Apps and programs

WiFiSecureAccess system has web interfaces that can be used by any of your applications programs or any other Apps to open or close the garage door. From your applications, you can make an HTTPS POST call to url https://wifisecureaccess.com/devicePortsJson/ giving your credentials and the name of your device and the action to be taken in a JSON format.

8.1  Opening/Closing a door/gate with an HTTPS POST call

To open or close a door/gate, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/devicePortsJson/
Content-Type: application/json

Provide the credentials and data in the following JSON format:
data = { "email": your_email, "password": your_password, "device_name": device_name, "action": action, }

--where your_email and your_password are the email address and password of the owner of the device connected to your door/gate. device_name is the name assigned to the device. action should be either "ON" or "OFF". If you want to open the door/gate, action must be "ON", and if you want to close it, action must be "OFF".

If a POST call is made as per that above format, the door/gate will be activated as per the action specified. Refer to the following sample python program. This sample call will open the door/gate.


#!/usr/bin/env python
import requests
import json

def main_loop():
   url = "https://wifisecureaccess.com/access/devicePortsJson/"
   #the following are just an example.  replace these with your's.
   device_name = "My Door"   # replace this with the name of your device
   email = "tester@gmail.com"
   password = "12345678"
   action = "ON"
   data = {'email': email, 'password': password, 'device_name': device_name, 'action': action,}
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   r = requests.post(url, data=json.dumps(data), headers=headers)

   if r.status_code == requests.codes['ok']:
      res = r.json()
      if res['result'] and res['result'] == 'SUCCESS':
         print("SUCCESS")
      elif res['msg']:
         print(res['msg'])
      else:
         print("FAIL")

   else:
      print(r)
      print("Server error or communication error")

if __name__ == '__main__':
  main_loop()

8.2  HTTPS call to add or remove allowed Users

Repeating what we said in section 4-4 above ...
You can populate the allowed users of any group from any of your applications such as a booking platform using an HTTPS call. This feature helps integrate the WiFiSecureaccess door controller with your applications such as a booking platform. If these devices are installed, for example, on the door of a hotel room or an AirBnB room, the application platform that makes the booking can enter the customer's email and their start date and expiry date directly into the allowed user's list of the group associated with the controller device. If done, the customer will be allowed to open the door during the period between start-date and expiry-date. The customers can open the door either by a voice prompt, or by scanning the QRCode or NFC tag fixed on the door. Thus, this is an ideal system for hotels and AirBnB users. This eliminates the need to pass on the keys or access cards to the customer.

To add the user to the evice's group, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/loadAllowedUsersJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "device_group_name": device_group_name, "customers": customers }

-where customers is a double list of customer details.
customers = [customer1, customer2, customer3, ....]
-where each customer is a list as below:
[email_address, start_date, expiry_date]

For example, if you want to add two customers to the allowed group of a device, the customers should be as follows:
customer1 = [customer1_email, customer1_start_date, customer1_expiry_date]
customer2 = [customer2_email, customer2_start_date, customer2_expiry_date]
customers = [customer1, customer2]

Note: Leave start date and expiry date as "", if there is no start date or end date for that customer. If there is no start date, that means that the customer can access immediately. If there is no expiry date, the customer is authorized forever.

Here is a sample program to add two customers as alloowed members in a device group named test_group:


#!/usr/bin/env python
import requests
import json

def main_loop():
   email = 'tester@gmail.com'  # Replace this with your email address
   password = 'password'   # Replace with your password of your account with wifisecureaccess.com
   url = "https://wifisecureaccess.com/access/loadAllowedUsersJson/"
   #customer = [[customer_email, dt_start_str, dt_exp_str[, [.....], [.....],]
   customers = [['customer1@gmail.com', '2021-09-24 10:30', '2021-09-25 10:30'], ['customer2@gmail.com', '', ''],]
   data = {'email': email, 'password': password, 'device_group_name': 'test_group', 'customers': customers,}
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   r = requests.post(url, data=json.dumps(data), headers=headers)
   if r.status_code == requests.codes['ok']:
      res = r.json()
      #print(res)
      if res['result'] and res['result'] == 'SUCCESS':
         print(res['msg'])
      else:
         print('Error_code = ', res['Error_code'], res['msg'])


if __name__ == '__main__':
    main_loop()


You can also remove any customer from the device's group with another HTTPS call as follows:

POST HTTP/1.1
Host: wifisecureaccess.com/removellowedUsersJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "device_group_name": device_group_name, "customers": customers }

-where customers is a list of email address of the customers that you want to remove from the allowed list.
customers = [customer1_email, customer2_emal, ......].

And, here is a sample program showing how to make an HHTPS call to remove a customer from the allowed list of a group.

#!/usr/bin/env python
import requests
import json

def main_loop():
   email = 'tester@gmail.com'  # replace with your email address
   password = 'password'  # Replace this with your password of your account with wifisecureaccess.com
   url = "https://wifisecureaccess.com/access/removeAllowedUsersJson/"
   customers = ['customer1@gmail.com', 'customer2@gmail.com',]
   data = {'email': email, 'password': password, 'device_group_name': 'test_group', 'customers': customers,}
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   r = requests.post(url, data=json.dumps(data), headers=headers)
   if r.status_code == requests.codes['ok']:
      res = r.json()
      #print(res)
      if res['result'] and res['result'] == 'SUCCESS':
         print(res['msg'])
      else:
         print('Error_code = ', res['Error_code'], res['msg'])


if __name__ == '__main__':
    main_loop()

8.3  HTTPS call to add or remove customers to Special category of a Public Place or Parking Lot

Repeating what we said in section 8-5 above ...
Similar to what we have explained in section 4.4 of this documentation, you can integrate wifisecureaccess with any of your applications (such as online booking) and update the special category through an HTTPS call from that application to wifisecureaccess.com. If WiFiSecureAccess controllers are installed at the gate of parking lots to control the boom gate (or whatever door they have), the application platform that makes the booking can enter the customer's email and their start date and expiry date directly into the allowed user's list of the group associated with the controller device. If done, the customer will be allowed to enter the parking lot or public place during the period between start-date and expiry-date. The customers can open the gate by scanning the QRCode or NFC tag fixed at the gate. Thus, this is an ideal system for public places (such as cinema halls and other public event places) and parking lots. This eliminates the need to carry tickets and other documents to enter the place..

To add a customer to a special category, of a public place/parking lot, make an HTTPS POST call with the following details:

POST HTTP/1.1
Host: wifisecureaccess.com/addMembersSpCatJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "parking_lot_name": parking_lot_name, "customers": customers }

-where customers is a double list of customer details.
customers = [customer1, customer2, customer3, ....]
-where each customer is a list as below:
[email_address, start_date, expiry_date, fee_discount, fine_discount,]

Note: Whenever we use the word 'parking lot', it also means any public access place in addition to parking lot

For example, if you want to add two customers to the allowed group of a device (controller), the customers should be as follows:
customer1 = [customer1_email, customer1_start_date, customer1_expiry_date, customer1_fee_discount, customer1_fine_discount,]
customer2 = [customer2_email, customer2_start_date, customer2_expiry_date, customer2_fee_discount, customer2_fine_discount,]
customers = [customer1, customer2]

Note: Leave start date and expiry date as "", if there is no start date or end date for that customer. If there is no start date, that means that the customer can access immediately. If there is no expiry date, the customer is authorized forever.

As mentioned before, fee_dscount and fine_discount are in percentages (0.00 to 100.00)

Here is a sample python program that will populate the allowed users in Special category of a public place or parking lot: This program adds two customers (customer1@gmail.com and customer2@gmail.com to the Special categiry 10 of the publicplace/parking lot named 'MY PUBLIC PLACE',


#!/usr/bin/env python
import requests
import json

#This inserts members to special parking category

def main_loop():
   email = 'tester@gmail.com'   # Replace this with your email
   password = 'password'   # Replace this with the password of your account with wifisecureacces.com
   url = "https://wifisecureaccess.com/access/addMembersSpCatJson/"
   #customers = [[customer_email, dt_start, dt_exp_str, %fee_discount, %fine_discount], [.....], [......],]
   customers = [['customer1@gmail.com', '2021-09-25 10:30', '2021-09-27 10:30', 70.0, 50.0,], ['customer2@gmail.com', '', '', 0.0, 0.0,],]
   data = {'email': email, 'password': password, 'parking_lot_name': 'MY PUBLIC PLACE', 'parking_category': 10, 'customers': customers,}
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   r = requests.post(url, data=json.dumps(data), headers=headers)
   if r.status_code == requests.codes['ok']:
      res = r.json()
      #print(res)
      if res['result'] and res['result'] == 'SUCCESS':
         print(res['msg'])
      else:
         print('Error_code = ', res['Error_code'], res['msg'])


if __name__ == '__main__':
    main_loop()


You can also remove any customer from the special category with another HTTPS call as follows:
POST HTTP/1.1
Host: wifisecureaccess.com/removeMembersSpCatJson/
Content-Type: application/json
data = { "email": your_email, "password": your_password, "parking_lot_name": parking_lot_name, "customers": customers }

-where customers is a list of email address of the customers that you want to remove from the allowed list.
customers = [customer1_email, customer2_emal, ......].

And, here is a sample program showing how to make an HHTPS call to remove two customers from the special category(id = 10) of the public place named "My PUBLIC PLSCE".


#!/usr/bin/env python
import requests
import json

#This removes members to special parking category

def main_loop():
   email = 'tester@gmail.com'  # Replace this with your email
   password = 'password'  # Replace this with the password of your account with wifisecureaccess.com
   url = "https://wifisecureaccess.com/access/removeMembersSpCatJson/"
   customers = ['customer1@gmail.com', 'customer2@gmail.com',]
   data = {'email': email, 'password': password, 'parking_lot_name': 'MY PUBLIC PLACE', 'parking_category': 10, 'customers': customers,}
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   r = requests.post(url, data=json.dumps(data), headers=headers)
   if r.status_code == requests.codes['ok']:
      res = r.json()
      #print(res)
      if res['result'] and res['result'] == 'SUCCESS':
         print(res['msg'])
      else:
         print('Error_code = ', res['Error_code'], res['msg'])


if __name__ == '__main__':
    main_loop()


9  Copying Use Records to Local Computer

Our system keeps all the use records and parking records for 30 days only. In the earlier sections, we have seen how to download the use records by clicking the button in the dashboard menu (Ref sections 3.17, 4.7, and 5.10). If you are interested in integrating this with any of your programs, you can write a program to read the use records yourself and add that into your any applications. This helps in keeping records for longer duration. They can also use their own dedicated data analysis tools to anlyze these data. A simple program making a json call to our url will provide you these use records in json format. Given in this section are some sample test program to copy these records.

9.1  Copying Device Use Records

'Device Use Records' have the information of anybody's using this device. The owner of a device can see the use records in Dashboard by clicking 'Device Use Records' under 'Device Admin'. These records can also be copied at frequest intervals to your local computer. Given below is an example of a program to copy these records.


#!/usr/bin/env python
import requests
import json
import getpass
import os

def main_loop():
   while True:
      email = input("Enter email : ")
      if email and email != "":
         break
   email = email.upper()
   while True:
      password = getpass.getpass()
      if password and password != "":
         break
   while True:
      device_name = input("Device Name: ")
      if device_name and device_name != '':
         break
   if device_name.isspace():
      print("device name cannot be empty spaces")
      exit(1)
   while True:
      start_date = input("Start Date (yyyy-mm-dd hh:mm): ")
      if start_date and start_date != '':
         break
   if start_date.isspace():
      print("start_date cannot be blank spaces")
      exit(1)
   while True:
      end_date = input("End Date (yyyy-mm-dd hh:mm): ")
      if end_date and end_date != '':
         break
   if end_date.isspace():
      print("End_date cannot be empty spaces")
      exit(1)
   while True:
      file_name = input("File Name: ")
      if file_name and file_name != '':
         break
   if file_name.isspace():
      print("Error.  File name cannot be blank spaces")
      exit(1)

   s = requests.session()
   n_next = 0
   url = "https://wifisecureaccess.com/access/get_useRecordsJson/"
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   try:
      f = open(file_name, "a+")
   except:
      print("Unable to open the file %s" % (file_name))
      exit(1)

   while True:
            data = {'email': email, 'password': password, 'records_type': 'device', 'device_name': device_name, 'start_date': start_date, 'end_date': end_date, 'n_next': n_next,}
            r = s.post(url, data=json.dumps(data), headers=headers)
            if r.status_code == requests.codes['ok']:
               res = r.json()
               if res['result'] and res['result'] == 'SUCCESS':
                  if n_next == 0:
                     print("Field Names: ", res['field_names'])
                     if os.stat(file_name).st_size == 0:
                        field_names = res['field_names']
                        for field_name in field_names:
                           f.write(field_name)
                           f.write(", ")
                        f.write("\r\n\r\n")
                  records = res['records']
                  for record in records:
                     for value in record:
                        if not value:
                           value = ''
                        print(value, end=", ")
                        f.write(value)
                        f.write(", ")
                     print()
                     f.write("\r\n")
                  n_next = res['n_next']
                  records_remaining = res['records_remaining']
                  if records_remaining == 0:
                     break
               else:
                  if 'msg' in res:
                     msg = res['msg']
                  else:
                     msg = ""
                  print("FAIL: ", msg)
                  break
            else:
               print(r)
               print("FAIL:  Communication error")
               break
   f.close()

if __name__ == '__main__':
  main_loop()
And, here is a screenshot of the terminal running this program:

$ python test_getDeviceUseRecords.py
Enter email : test53680@gmail.com
Password: 
Device Name: New_Device
Start Date (yyyy-mm-dd hh:mm): 2020-03-28 10:30
End Date (yyyy-mm-dd hh:mm): 2020-04-09 23:10
File Name: my_file.txt
{'result': 'SUCCESS', 'msg': 'Login Success'}
Field Names:  ['customer_email', 'use_time']
RAMAN.V.NATH@GMAIL.COM, 2020-04-08 00:41, 
RAMAN.V.NATH@GMAIL.COM, 2020-04-08 00:44, 
RAMAN.V.NATH@GMAIL.COM, 2020-04-08 00:45, 
TEST53680@GMAIL.COM, 2020-04-08 10:50, 
TEST53680@GMAIL.COM, 2020-04-08 10:52, 
TEST53680@GMAIL.COM, 2020-04-08 10:52, 
TEST53680@GMAIL.COM, 2020-04-08 10:52, 
TEST53680@GMAIL.COM, 2020-04-08 10:52, 
TEST53680@GMAIL.COM, 2020-04-08 10:52, 
The above program makes a call to the server. And, it prints out the records on the terminal window of the user's computer. It also appends the same data to the specified local file. Note that it appends the data to the file instead of creating a new file so that records read earlier will not be lost. You can use the data in the file for doing any analysis of the data. The System keeps the use records for 30 days only. So, the owner of the device may read this record, say, every 15 days giving the start data and end date appropriately so that you copy the data from the last end_date. As the program appends the new data to the file, all the previously read records are also in the same file. In doing so, you will have the complete record of as many days as you want. Note: the first line of the file will have the field names. Subsequent lines in the file are the records.

9.2  Copying Group Use Records

Group records is the use records of a group, showing who used the devices in this group and when. These records can be seen on the dashboard by clicking 'Group Records' under Device Groups in Dashbaord. To copy the same records into your computer, you need a program to make calls to the IOT server. Given below is a program to do that.


#!/usr/bin/env python
import requests
import json
import getpass
import os

def main_loop():
   while True:
      email = input("Enter email : ")
      if email and email != "":
         break
   email = email.upper()
   while True:
      password = getpass.getpass()
      if password and password != "":
         break
   while True:
      group_name = input("Group Name: ")
      if group_name and group_name != '':
         break
   if group_name.isspace():
      print("group name cannot be blank spaces")
      exit(1)
   while True:
      start_date = input("Start Date (yyyy-mm-dd hh:mm): ")
      if start_date and start_date != '':
         break
   if start_date.isspace():
      print("start_date cannot be blank spaces")
      exit(1)
   while True:
      end_date = input("End Date (yyyy-mm-dd hh:mm): ")
      if end_date and end_date != '':
         break
   if end_date.isspace():
      print("End_date cannot be empty spaces")
      exit(1)
   while True:
      file_name = input("File Name: ")
      if file_name and file_name != '':
         break
   if file_name.isspace():
      print("Error.  File name cannot be blank spaces")
      exit(1)

   s = requests.session()
   n_next = 0
   url = "https://wifisecureaccess.com/access/get_useRecordsJson/"
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   try:
      f = open(file_name, "a+")
   except:
      print("Unable to open the file %s" % (file_name))
      exit(1)

   while True:
            data = {'email': email, 'password': password, 'records_type': 'group', 'group_name': group_name, 'start_date': start_date, 'end_date': end_date, 'n_next': n_next,}
            r = s.post(url, data=json.dumps(data), headers=headers)
            if r.status_code == requests.codes['ok']:
               res = r.json()
               if res['result'] and res['result'] == 'SUCCESS':
                  if n_next == 0:
                     print("Field Names: ", res['field_names'])
                     if os.stat(file_name).st_size == 0:
                        field_names = res['field_names']
                        for field_name in field_names:
                           f.write(field_name)
                           f.write(", ")
                        f.write("\r\n\r\n")
                  records = res['records']
                  for record in records:
                     for value in record:
                        if not value:
                           value = ''
                        print(value, end=', ')
                        f.write(value)
                        f.write(", ")
                     print()
                     f.write("\r\n")
                  n_next = res['n_next']
                  records_remaining = res['records_remaining']
                  if records_remaining == 0:
                     break
               else:
                  if 'msg' in res:
                     msg = res['msg']
                  else:
                     msg = ""
                  print("FAIL: ", msg)
                  break
            else:
               print(r)
               print("FAIL:  Communication error")
               break
   f.close()

if __name__ == '__main__':
  main_loop()
And, here is a sample snapshot of a terminal running this program:

$ python test_get_groupUseRecords.py
Enter email : test53680@gmail.com
Password: 
Group Name: My House
Start Date (yyyy-mm-dd hh:mm): 2020-03-10 0:0
End Date (yyyy-mm-dd hh:mm): 2020-04-11 0:0
File Name: my_file.txt
{'result': 'SUCCESS', 'msg': 'Login Success'}
Field Names:  ['device_name', 'device_use_type', 'customer_email', 'use_time']
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-07 08:01, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-07 07:59, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-07 07:59, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:10, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:10, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:09, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:09, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:08, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:08, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:06, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:06, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:06, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:06, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:04, 
New_Device, CONTROL/SENSOR, TEST53680@GMAIL.COM, 2020-04-06 23:00, 
The above program makes a call to the server. And, it prints the records on the terminal of your computer. It also appends the same data to the specified file on your local computer. Note that it appends the data to the file instead of creating a new file so that all previously read data are retained in the file. This data in the file will help you analyse it using any of your sophisticated tools. Keep in mid that the system keeps records for 30 days only. So, you will have to copy the records, say, every 15 days or so giving the start date as the end date given when copying data last time. As the program appends the data to the same file, it will have all the previously read data as well. That way, your file will have all the records for a much longer time.

9.3  Copying Customer Use Records

Customer use records are the records of a customer's use of all the devices in the system. You can see your use records of any devices in the system in Dashboad by clicking 'My Use Records' under 'User Admin' in Dashboard. If you want the same records copied into your local computer to keep the data for longer time, or to do detailed data analysis for your special needs, you need a program to make calls to the server. Given below is a program in python to get these records from the server.


#!/usr/bin/env python
import requests
import json
import getpass
import os

def main_loop():
   while True:
      email = input("Enter email : ")
      if email and email != "":
         break
   email = email.upper()
   while True:
      password = getpass.getpass()
      if password and password != "":
         break
   while True:
      start_date = input("Start Date (yyyy-mm-dd hh:mm): ")
      if start_date and start_date != '':
         break
   if start_date.isspace():
      print("start_date cannot be blank spaces")
      exit(1)
   while True:
      end_date = input("End Date (yyyy-mm-dd hh:mm): ")
      if end_date and end_date != '':
         break
   if end_date.isspace():
      print("End_date cannot be empty spaces")
      exit(1)
   while True:
      file_name = input("File Name: ")
      if file_name and file_name != '':
         break
   if file_name.isspace():
      print("Error.  File name cannot be blank spaces")
      exit(1)

   s = requests.session()
   n_next = 0
   url = "https://wifisecureaccess.com/access/get_useRecordsJson/"
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   try:
      f = open(file_name, "a+")
   except:
      print("Unable to open the file %s" % (file_name))
      exit(1)

   while True:
            data = {'email': email, 'password': password, 'records_type': 'customer', 'start_date': start_date, 'end_date': end_date, 'n_next': n_next,}
            r = s.post(url, data=json.dumps(data), headers=headers)
            if r.status_code == requests.codes['ok']:
               res = r.json()
               if res['result'] and res['result'] == 'SUCCESS':
                  if n_next == 0:
                     print("Field Names: ", res['field_names'])
                     if os.stat(file_name).st_size == 0:
                        field_names = res['field_names']
                        for field_name in field_names:
                           f.write(field_name)
                           f.write(", ")
                        f.write("\r\n\r\n")
                  records = res['records']
                  for record in records:
                     for value in record:
                        if not value:
                           value = ''
                        print(value, end=", ")
                        f.write(value)
                        f.write(", ")
                     print()
                     f.write("\r\n")
                  n_next = res['n_next']
                  records_remaining = res['records_remaining']
                  if records_remaining == 0:
                     break
               else:
                  if 'msg' in res:
                     msg = res['msg']
                  else:
                     msg = ""
                  print("FAIL: ", msg)
                  break
            else:
               print(r)
               print("FAIL:  Communication error")
               break
   f.close()

if __name__ == '__main__':
  main_loop()
And, here is an example snapshot of a local terminal running this program.

$ python test_getCustomerUseRecords.py
Enter email : test53680@gmail.com
Password: 
User Timezone (example: Australia/Sydney) deault: UTC
(Refer https://en.wikipedia.org/wiki/List_of_tz_database_time_zones): US/Pacific
Start Date (yyyy-mm-dd hh:mm): 2020-04-08 08:21
End Date (yyyy-mm-dd hh:mm): 2020-04-08 10:53
File Name: my_file.txt
{'result': 'SUCCESS', 'msg': 'Login Success'}
Field Names:  ['device_name', 'device_use_type', 'group_name', 'use_time']
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device_H1.2, CONTROL/SENSOR, None, 2020-04-08 10:52, 
New_Device_H1.2, CONTROL/SENSOR, None, 2020-04-08 10:51, 
New_Device_H1.2, CONTROL/SENSOR, None, 2020-04-08 10:51, 
New_Device_H1.2, CONTROL/SENSOR, None, 2020-04-08 10:51, 
D8BFC0F2D182, CONTROL/SENSOR, None, 2020-04-08 10:50, 
A020A62FC8BD, CONTROL/SENSOR, None, 2020-04-08 08:21, 
The above program makes a call to the server. Refer to the suggestions given for reading group records in the previous section about copying records. Those comments apply here as well.

9.4  Copying Parking Records

If you own any parking lot, parking records of your parking lot can be copied to your local computer using a program. The following is a program in python to read parking records of any parking lot that you own.


#!/usr/bin/env python
import requests
import json
import getpass
import os

def main_loop():
   while True:
      email = input("Enter email : ")
      if email and email != "":
         break
   email = email.upper()
   while True:
      password = getpass.getpass()
      if password and password != "":
         break
   while True:
      parking_lot_name = input("Parking Lot Name: ")
      if parking_lot_name and parking_lot_name != '':
         break
   if parking_lot_name.isspace():
      print("parking lot name cannot be blank spaces")
      exit(1)
   while True:
      start_date = input("Start Date (yyyy-mm-dd hh:mm): ")
      if start_date and start_date != '':
         break
   if start_date.isspace():
      print("start_date cannot be blank spaces")
      exit(1)
   while True:
      end_date = input("End Date (yyyy-mm-dd hh:mm): ")
      if end_date and end_date != '':
         break
   if end_date.isspace():
      print("End_date cannot be empty spaces")
      exit(1)
   while True:
      file_name = input("File Name: ")
      if file_name and file_name != '':
         break
   if file_name.isspace():
      print("Error.  File name cannot be blank spaces")
      exit(1)

   s = requests.session()
   n_next = 0
   url = "https://wifisecureaccess.com/access/get_parkingRecordsJson/"
   headers = {'Content-Type': 'application/json', 'Accept': 'application/json',}
   try:
      f = open(file_name, "a+")
   except:
      print("Unable to open the file %s" % (file_name))
      exit(1)

   while True:
            data = {'email': email, 'password': password, 'records_type': 'parking_lot', 'parking_lot_name': parking_lot_name, 'start_date': start_date, 'end_date': end_date, 'n_next': n_next,}
            r = s.post(url, data=json.dumps(data), headers=headers)
            if r.status_code == requests.codes['ok']:
               res = r.json()
               if res['result'] and res['result'] == 'SUCCESS':
                  if n_next == 0:
                     print("Field Names: ", res['field_names'])
                     if os.stat(file_name).st_size == 0:
                        field_names = res['field_names']
                        for field_name in field_names:
                           f.write(field_name)
                           f.write(", ")
                        f.write("\r\n\r\n")
                  records = res['records']
                  for record in records:
                     for value in record:
                        if not value:
                           value = ''
                        print(value, end=", ")
                        f.write(value)
                        f.write(", ")
                     print()
                     f.write("\r\n")
                  n_next = res['n_next']
                  records_remaining = res['records_remaining']
                  if records_remaining == 0:
                     break
               else:
                  if 'msg' in res:
                     msg = res['msg']
                  else:
                     msg = ""
                  print("FAIL: ", msg)
                  break
            else:
               print(r)
               print("Fail")
               break

   f.close()

if __name__ == '__main__':
  main_loop()
And, here is an example screenshot of a terminal runnin this test program

$ python test_getLotParkingRecords.py
Enter email : test53680@gmail.com
Password:
Parking Lot Name: PARKING_LOT28265
Start Date (yyyy-mm-dd hh:mm): 2020-03-30 10:00
End Date (yyyy-mm-dd hh:mm): 2020-04-10 23:00
File Name: my_file.txt
{'result': 'SUCCESS', 'msg': 'Login Success'}
Field Names:  ['vehicle_reg_no', 'state', 'country', 'bay_no', 'customer_email', 'parking_category', 'parking_start', 'parking_end', 'amount_charged', 'currency']
WAU 971, NSW, AUSTRALIA, , TEST53680@GMAIL.COM, GENERAL, 2020-04-10 22:16, 2020-04-10 22:25, 0.00, AUD,
WAU 971, NSW, AUSTRALIA, , TEST53680@GMAIL.COM, GENERAL, 2020-04-10 21:51, 2020-04-10 21:54, 0.00, AUD,
WAU 971, NSW, AUSTRALIA, , TEST53680GMAIL.COM, GENERAL, 2020-04-10 21:43, 2020-04-10 21:46, 0.00, AUD,
The above program makes a call to the server to get parking records. The program displays data on your local terminal. It also appends the same data to the specified file on your local computer. We recommend reading them at least once in 15 days proving the start date as the end date given in the previus reading so that you will not have overlapped data or missing data. In doing so, ypur file will have the complete parking records that you can maintain for a much longer time. You can use any of your sophisticated tools to analyse this data.