Use the Gateway to utilize the OPT-01 and OPT-04 option boards to control real world items using General-Purpose input/output (GPIO).
Also utilizes a radio’s GPS, triggering outputs based on distance and whether the user is allowed into certain restricted areas.
With this flow you can control real world applications by setting the Gateway’s option board output pins to either a high or low voltage.
Allowing you to control if something is on or off, active or in-active or up and down.
Coupled with GPS you can detect if a radio user is, for example, near an automated gate, and if they have clearance to proceed into a restricted area.
Using this flow
One radio is set as the supervisor radio. The supervisor radio can control access to the gate.
A radio can request access by texting the Gateway “access”, the Gateway will relay this message to the supervisor for a decision.
The supervisor then sends a text to the Gateway, this text should contain the requesting radio’s ID and a yes or no to grant or remove access. For example “102 yes” will grant ID 102 access, “104 no” will remove access from ID 104.
As long as the users radio is within 10 metres of the access point, and they have their access granted by the supervisor, the gate will open. If they are not within range, nothing will happen. If they are within range, but do not have access, the gate will remain closed, and they will receive a text stating “*** you are not authorized.”, where *** is their radios ID.
Step 1 - Create the access list
- Login to your gateway, and click on the “Lists” sidebar option.
- Click the “Add new list” button.
- Enter “Access” as the list name.
- Enter “ident” as the key field.
- Click “Save”, and you will be returned to the lists page, showing the newly added “Access” list. We now need to add the extra required fields.
- Click on the “Access” list to open the edit page again.
- In the “Additional Fields”, enter “access” as the name, and select the type as “String/Text” and click “Add”
- Now in the “Additional Fields” add the following fields, “lat” and “lng” and set them to type “Number”.
- Now click “Save” to complete the creation of the list. It should look like the image below.
Step 2 - Load the flow
- Download and open the access_control.txt file from below.
- Import the flow into the workflow editor using these instructions.
Step 3 - Configure the flow (required)
Check the image below for each point.
- For each node named “update list”, “remove from list” & “find in list”, double click the node and make sure the list is correctly selected as your “Access” list. There are 6 of these in total.
- In the distance node you will need to set the Latitude and Longitude for the location of the automated gate. In the switch node next to it, set how far in metres you will need to be to trigger the gate. For this example you must be under 10m.
- The trigger node, will keep the gate open for 30 seconds. If no other radio is wihin 10m of the location the barrier will lower after 30 seconds. If a radio is still there and a new gps signal comes in, the timer on the trigger will reset. If your radios send in their GPS locations slower than 30 seconds, please adjust this timer accordingly.
- Set which of the two GPIO outputs you wish to use, and whether they are high or low. This will depend on how and what you are attaching the Gateway’s outputs to.
- In the two function nodes, the top line will look like this, “var lengthOfIdent = 3;” change the number to how many numbers there are in your radios ID. for example if your radio ID’s are 1000 – 1100, please set this number to 4.
- In the switch node, set the number 101 to your supervisors ID number, and the text-out node at the bottom right will also need to point to this same radio ID.
To download any files, please log on or register
All Flows, sample applications and the like are provided only for your convenience and may be superseded by updates. You are responsible for ensuring the safety and fitness for purpose of any solution for a given, implied or expressed. SMC LTD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESSED OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. SMC Ltd disclaims all liability arising from this information and its use.