Important! Set up your Minew G1 BLE Gateway before attempting to set up the sensor(s).
Updating the Gateway Settings
Log onto your gateway:
Go to the service tab, scroll down and change the “Whether to Upload Unknown” choice to yes.
2. Click on Apply.
Determining the Payload Data for the Device
1. Download the Nordic nRF Connect App from Apple’s App Store or Google’s Playstore.
2. Find your MAC Address on the device(s).
3. Open the nRF Connect App and Press the Scan Button in the upper right hand corner.
4. Find your Device on the list and make a note of the Bluetooth Payload for the device.
Checking MQTT Publishing at AWS for the Payload
On the Service Tab of the Gateway Admin tool you will see the default topic the gateway is publishing to. Copy the topic.
2. Log back on to AWS, choose the IoT Service, choose Manage/Things and select the Gateway.
3. Choose Activity.
3. Click on MQTT Client, paste the default topic into first text box and press “Subscribe to Topic”.
4. You should see quite a few more JSON Messages popping up, especially if you have a variety of Bluetooth devices. Click on the export button to find your device and examine the data for it.
5. On the popup that appears, click Download.
6. On the next popup, choose, save file and then press OK. Press the Done button on the first popup.
7. Open the file in a text editor such as BBEdit and look for your device. You should now see the device in the payload being delivered to the gateway.
8. You use the first bit to determine if the sensor detects light or movement (1 or 0) for the E6 Sensor, and the payload for the S2 Sensor broadcasts lux levels and the x,y, and x axis.
Congratulations, you have successfully configured your Minew Ambient Light Sensor. You can use this sensor to control lighting, monitor lighting conditions over time, get alerts when the lights are turned on or off (or reach various thresholds), or get alerts when something attached to the sensor moves.
Contact Revolution11 to discuss how we can help your organization improve security or keep track of your business assets with these sensors.
1. Sign in by entering an AWS Root Access User Account Email and then press “Next”.
2. Enter the password for the Root Access User and press “Sign In”.
Set Up a Group
1. Log onto the AWS Console, locate the Security, Identify & Compliance Section and select IAM (Identity and Access Management). Or use the search bar and enter IAM.
2. Select “Groups” in the left side menu.
3. Click “Create New Group”.
4. Enter a name for the group and then press “Next Step”.
5. On the Attach Policy screen, select the policies for any buttons you have set up as a root access user and then press “Next Step” .
6. Review the policies and then press “Create Group” .
7. You are returned to the group home page once you create the group. To add additional policies so the developer can work with both the buttons and the serverless functions that power the buttons, click on the group you just created.
8. On the permissions screen, click “Attach Policy”.
9. In the policies screen, find and select the policies below.
10. After you have selected the policies you want to add to the developers group, click “Attach Policy”.
Adding the Developer’s User Account
1. After attaching the policies to the group, select “Users” from the left menu bar.
2. Click on “Add User”.
3. Add a username, then check the boxes “Programmatic Access” and “AWS Management Console Access.” Keep the defaults of “Autogenerated password” and “require password to be reset” when the developer logs in for the first time. Click on “Next Permissions” .
4. On the “Set Permissions” screen, click on the checkbox of the developers group you created earlier to add the developer to this group and press “Next Tags”.
5. You can add up to 50 key/value pairs to help you find and organize your users. We recommend using the key “Email” and provide the developer’s email address. Press “Next Review”.
6. Review all of the details for this user and then press “Create User”.
7. Congratulations, you have successfully set up a developer’s account! Download the credentials with the “Download CSV” button, or view the password by clicking on the “Show” link next to the password field. Important! Make sure you copy the password as it will be unavailable after you leave this screen. Click on the “Send Email” link on the right to send an email with a link for your developer to log into your AWS account.
The Amazon Web Service (AWS) IoT Button Wi-Fi App is an application published by Amazon that allows the end user to set the button’s Wi-Fi network. The application does not allow the end user to change the button’s functionality. An AWS account is NOT required to use this application.
Setting or Changing the Wi-Fi Network on the AWS IoT Button
Open the app on your phone or tablet and press “Setup AWS IoT Button Wi-Fi”
2. On the next screen press “Scan DSN Barcode” (Device Serial Number). This brings up the scanner in your camera app to scan the barcode on the box.
3. Give the app permission to use your camera on first use… Click “OK”
4. Position the scanner box in the camera app at the bottom barcode on the box flap. (See instructions below if you do not have the box with the sticker label).
5. Once the scanner captures the barcode, it will show the DSN in the next screen of the app. Press “Configure Button”
6. Press the physical button on the device for about 6 seconds until it flashes blue. Once it is flashing, press the button at the bottom of the screen that says “Copy Password And Go To Settings”.
7. On the Wi-Fi Settings Screen, under Choose a Network, select the Button Configuration from the Wi-Fi Networks.
8. When prompted for the network password, paste the password that is stored on the device’s clipboard.
9. Return to the app, choose the Wi-Fi network to attach the button to and enter the password for that network.
10. Press “Confirm Wi-Fi”
11. You will see this message while the button is connecting to the new network
12. Once the button has joined the new network you will get a confirmation screen. Press “Done”
Congratulations, you have set up your AWS IoT button on a new Wi-Fi network!
*Instructions For Lost Box Barcode
If you do not have the box with the barcode that the button came in, there is a QR Code on the back of the button itself that represents the Device Serial Number (DSN). The DSN is also printed on the back of the button. Download a QR Scanning App from Apple’s App Store or Google’s Play store if you don’t have a QR Scanning app on your device already.
1. Open your scanning app and scan the QR Code on the right hand side of the back of the button. Once the QR Code is Scanned, copy the DSN.
2. Open the AWS IoT Button Wi-Fi App and press the “Setup AWS IoT Button Wi-Fi” button at the bottom of the screen.
3. Click on “Manually Enter DSN”
4. On the next screen, click into the DSN field
5. Paste the DSN from the clipboard (type manually if you could not scan it).
6. Click on “Configure Button” and change the Wi-Fi Network by following the instructions above.
Once you receive your Gateway follow these steps to configure:
The Gateway comes with an antennae and a USB charging cable; you supply your own USB charging adapter. The instructions for adding this unit to your Wi-Fi Network are very straightforward and can be found here.
Ingics IGS01S Package Contents
Set Up the Gateway on the AWS IoT Core
1. Log onto the AWS Console and select IoT Core under the Internet of Things heading. Select Get Started the first time you access this screen.
Choose IoT Core
2. To create a Gateway policy, select Secure on the left hand menu, then select Policies on the sub-menu. Press the Create button in the upper right hand corner.
Create Policy
3. On the next screen, name the policy.
4. Under Add Statements, use the Action box to create a general IoT policy. Start typing I…o…t and then select the first statement:
5. “IoT:*” from picklist as the value in this field; this is a general policy for all IoT devices.
6. Clear out the string that auto-populates in the Amazon Resource Name (ARN) field and replace with a wildcard (*). The Resource ARN is the end point for this resource and acts as a general policy for any resource.
7. Under Effect, choose Allow.
8. Press Create in the lower right hand corner.
Name Policy
9. Next Choose Manage → Things on the left menu. Press Create.
Create
10. Choose Create a Single Thing.
Create Single Thing
11. Name the Gateway; add types and groups if you will have more than one Gateway and if you would like an attribute key and value. An example type is Wi-Fi Gateway. An example group is Gateways. *See note below on Naming Conventions 12. Click Create a Type and fill in the appropriate information. 13. Press Next.
Name Gateway Part IName Gateway Part II
14. Choose One-Click certificate creation and click Create Certificate
Create Certificate
15. This is where you need to pay attention! Download the certificates and place them in a folder. In the next step we will get the “root certificate.” For now, press Activate
17. Click on Amazon Root CA 1 under the Amazon Trust Service Endpoints heading. Save the text that comes up in your browser as a file named ca.crt Use bbedit (or another text editor) to save the file http://www.barebones.com/products/bbedit/index.html
Root Certificate
18. Return to the webpage where you activated the certificates and press Attach a Policy.
Attach Policy
19. Choose the policy you created earlier and press Attach.
Add A Policy For Your Thing
20. Choose Register Thing.
21. Go back to the main menu and select Manage → Things. Select your gateway and press Interact. This is where you will find the endpoint of your thing in the top field. Copy this value and save it.
22. Make Sure you are on the Gateways Wi Fi; log onto the admin console. Review instructions here. You can download the Android app Fing to help you determine the IP address of the device.
23. Click on the Applications tab and choose MQTT Client under Applications. Enter the endpoint you saved when you set up the gateway on AWS in the Host/IP field and press Save. This will reboot the gateway.
MQTT Setup
24. Press the advanced tab. Use Choose File to pick the certificate and private key files you saved (Step 8). Press Upload Certificate and Upload Key after choosing the files and then press Reboot.
Uploaded Certificate and Private Key
Checking MQTT Publishing at AWS
On the Applications Services Tab of the Gateway Admin tool you will see the default topic the gateway is publishing to. Change it to: /in/ac233fc01615/status so it is formatted correctly and press Save.
Topic Setting
2. Log back on to AWS, choose the IoT Core under Service, choose Manage/Things and select the Gateway
Select Gateway
3. Choose Activity on the left menu
Choose Activity
4. Click on MQTT Client, paste the default topic into first text box and press Subscribe to Topic.
Subscribe to Topic
5. This gateway does not send JSON so you will just see the strings for the beacons it is picking up.
Message Results
*NOTE
It is important to have a naming convention that allows our team to quickly identify the location, type, and manufacturer of the device when working with devices in the cloud. Revolution11 highly recommends the following naming convention, based on the useful information in this blog: https://www.netcraftsmen.com/device-naming-conventions/
The blog makes a great point in describing how your device names need to work easily in a Command Line Interface (CLI).
The only information that we have added to the standard in this blog is the addition of the manufacturer.
A Bluetooth Gateway is a device that scans for, and captures, Bluetooth radio signals. The Gateway is attached to a network either via ethernet or by joining a Wi-Fi Network. They can easily be configured to send the captured data to Cloud Services such as Amazon Web Services (AWS).
This manufacturer produces two versions of the Bluetooth Gateway. Both versions work with the many varieties of Ingics’ sensor beacons, including:
temperature and humidity
proximity
human detection
motion detection
sensors that work with magnets
Ingics Sensors do not use the Eddystone or iBeacon protocols. They send their own protocol, which means you will need to be comfortable parsing the custom strings the beacons produce to make use of them.
This is a great choice if you are going to leave your Gateway configured to a Wi-FI Network for long periods of time.
IGS02E Ethernet BLE Gateway
This is a great choice if you will be moving the gateway from place to place. You only need to configure and set it up with AWS once; then you have the ability to plug it into new networks via the ethernet cable.
Minew produces the G1 Wi-Fi BLE Gateway, which is a great system for beginners. It attaches to your Wi-Fi network and supports standard iBeacons. Minew sells a sensor beacon that collects temperature and humidity, and they have a great lineup of beacons in a variety of form factors that use multiple power sources. The JSON that comes out of the Gateway is human readable, and the ability to appropriately match power requirements with your use case in their beacon lineup is a huge plus. And it has fancy flashing disco lights!
With a FileMaker database, it is possible to capture the JSON data generated by an AT&T LTE-M or AWS Enterprise Button. DB Services already wrote a great blog about using a
custom Lambda to record the JSON into a FileMaker Database from the 1st generation of AWS Buttons here: https://dbservices.com/articles/iot-filemaker-and-you/. With the help of our friends at Tek-Connect, we decided to take it a step further and create a serverless app to make the process of capturing button clicks for these devices in FileMaker as easy as possible.
FileMaker’s ScriptMaker opens up a world of possibilities that customize what happens when pressing these buttons. In earlier blogs, we have demonstrated using Twilio for Text Messaging and Mandrill and MailChimp to send transactional email. You can build workflows using these tools with your FileMaker Solution. Perhaps a client wants their field reps to re-order products from the field using these buttons. With one click, a FileMaker solution can create an order record in a database, send a text to the rep and his customers letting them know the product(s) have been ordered, and send a notification to the warehouse to pick and ship the product. In future blogs, we will be exploring adding more functionality to these buttons.
How to Deploy and Use a Custom Serverless Application to Capture the JSON Button Output
Setting Up The Application
1. Log in to the AWS Console and choose the Lambda service. Once you are on the dashboard, press ‘Create Function’ in the upper right hand corner.
2. On the next screen, choose the AWS Serverless Repository (the last pane on the right).
3. In the search bar, type in “FileMaker” or “Revolution11” in the Public Applications area. Click on the rev11-attiotbutton-filemakerapi application.
4. A Read Me section is found in the middle of the page on the left-side; this provides the parameters necessary to use the application. (A sample FileMaker application can be downloaded with this blog post.) Fill out the parameters for your FileMaker Server, file, and other information on the right-hand side of the screen and press the ‘Deploy’ button.
5. A status screen will appear while the application is being deployed. Once the process finishes, press the Test App button in the upper right of the screen.
6. An overview screen for the app appears. Click on the hyper-linked name of the application (rev11atttiotbuttonfilemakerapi).
7. The next page sets up the function for the buttons. Add the AWS IoT trigger by clicking on it in the list of triggers to the right.
8. The AWS IoT Trigger appears in the workflow now. Scroll down to the configuration triggers area to set up the function to work with buttons.
9. It is possible to use one of the rules created for another button, but in case one has not been created, we will make a new one. Choose Custom IoT rule, give the rule a name and add a query statement as in the screenshot below. Press the save button in the upper right hand corner to save the changes.
10. Let’s test the function! On the top of the screen, find the dropdown to ‘Select a test event’. Since we haven’t created any tests to use, the only choice in the dropdown is to ‘Configure a test event’ — choose this option.
11. Go ahead and use the supplied Hello World template. Give the test event a name and press the Create button at the bottom right of the screen. This test will send the JSON in the body of the test with the function.
12. You will now see the name of the test you created in the dropdown. Press the Test button to the right of the dropdown to run the test.
13. When the test has finished running, you will see the results at the top of the page. In this case it was successful. Now, check your FileMaker Database, there should be a new record with the JSON from the test event.
14. In the event of an unsuccessful test, this same area will tell you what failed. For this screenshot, I have changed the name of the “field” environment variable to a field not in the database. You should see that error in the details.
Configuring the Button
1. Configuring the LTE-M or AWS to use this Lambda function is the same as in past blog posts. In the AWS Server Console, navigate to the one click service and click on ‘Create a project’.
2. Give the project a name and press next.
3. Press ‘Start’ to define a device template.
4. Press ‘All button types’ on the next screen.
5. Enter the Device template name; in the Action dropdown, choose ‘Select a Lambda’ function and choose the function that was just created when you created the application; press ‘Create project’.
6. On the next screen choose Create your first placement – click ‘Create placements’.
7. Give the placement a name and press the choose device button to choose a device to tie to the function.
8. On the next screen, select the device and press ‘Create placement’.
You can now test your button!
You can download a sample FileMaker File to host on your FileMaker Server here.
Next, download the AWS IoT 1-Click App from either the iOS App Store or Google’s Play Store Order an AWS Enterprise Button Here
Once you receive your AWS Button follow these steps to configure:
1. Open box by prying open the panel on the end that has the white sticker (Keep track of the box so you can scan the sticker with the app).
2. Log into the AWS IoT 1-ClickApplication
3. Configure the Button on your mobile device by opening the AWS IoT 1-Click and signing in with your AWS password. This opens the app for button configuration on the setup tab. Press the Claim with Device ID button
4. Press the scan button to scan the serial number on the box (You can enter the serial number manually if you have lost the box)
5. The app will display “1 Device Added” when it has identified the serial number. Press ‘Stop Scanning’.
6. The Device Added Confirmation Screen will appear. Press the ‘Claim’ button to claim the device.
7. A pop-up will appear asking to confirm that you would like to configure this device. Press ‘Yes’.
8. On the next screen you will be instructed to Press the Button on the AWS Enterprise Device.
9. Once the device is found, the next screen will prompt you to add your wi-fi credentials for the wi-fi network you would like to use with this button. Enter your settings and press ‘Confirm’.
10. The configuration screen will show the configuration status change from ‘in progress’ to ‘succeeded’. Once the configuration has succeeded (the light on the device will change from flashing blue to a solid green flash), press the ‘next’ button.
11. The next screen will prompt you to press the button on the device to finalize the claim. Once this has succeed, press the ‘finish’ button.
12. Press the devices tab at the bottom of the screen to view the device in the app. Click on the device in the list to enable it.
13. On the next screen, click on the ‘enable’ slider.
Configuring the Button Action
1. Log on to your AWS Console
2. Click ‘All Services’ and navigate to → Internet of Things → IoT 1-Click
3. Choose the 1-Click Service, this is what you will use to assign a Lambda Function to the device.
4. On the left hand side of the screen you will see the menu for managing 1-Click Devices
5. Click on the ‘Manage’ option in the 1-Click Menu
6. Create a test project to attach for the AWS Enterprise Button. Press the ‘Create a Project’ button.
7. Enter a Project name and Description and press the ‘Next’ button.
8. Press Start to Define a Device Template for the Lambda Function you want the device to use.
9. Name the template, and set an action (Lambda Function). In this case, choose ‘Send SMS’.
10. Scroll down to Create Placements and enter a device placement name and enter a phone number (+1xxxxxxxxxx) and write a message in the placement attributes. Press ‘Create Project’.
11. A confirmation screen will appear, press the ‘Create placements’ button.
12. On the next screen, give the placement a name and press the choose a device.
13. Click on ‘Choose’ next to the AWS Device
14. Press the ‘Create placement’ button at the bottom of the screen.
15. You will now see this device in the Placements for this Project.
16. Press the button once on the AWS Enterprise Device. When the light on the device turns solid green a text is sent to specified the number.
Once you have established your AWS account, you are ready for AWS Internet of Things (IoT) button configuration.
Order here (This is an affliate link full disclosure)
Open box by prying open the panel on the end that has the white sticker
2. Remove the documentation that is included in the box and then use your mobile phone’s camera to scan the QR code to open the “Getting Started” page on your phone.
3. Review ‘Cloud Programmable Dash Button’ — read the intro description on what the button is, and what it can do.
4. Review ‘Trigger AWS Lambda functions from simple devices’ and the description of the IoT Service.
5. Configure the Button on your mobile device. Open the app: AWSBTNDev – sign in with your AWS password. This opens the app for configuring your button.
6. Click the Plus Sign to configure the new button
7. Click “Agree and Get Started” on the Set up your Button screen.
8. Scan the DSN barcode on the box with your mobile device. The DSN and Name values will auto-populate on the screen.
9. Go to Settings on your mobile device and connect to the button’s wireless network using the password provided on the screen. Utilize the automatic copy/paste function to transfer the password.
10. Select the wi-fi network and enter the password copied from the previous action.
11. Once the certificate has downloaded, set the button action. Select the Lamda function that sends an email on click of the button, then select “Set Action.”
12.Send test email via button click.
13. On first button click, verify the email address through Amazon Web Services automated email.
14. Receive email via the AWS IoT button! Your first action is complete.
Important Note!
Amazon Web Services has identified a defect that may prevent some AWS IoT developer buttons from operating as expected. To determine if your AWS IoT developer button is impacted, check whether your button flashes a red LED in a long-short-short pattern after it is clicked.
If your button is impacted, here are the two options you can choose from:
Option 1: You can re-provision (see steps below) the impacted developer buttons using the AWS Developer button app. Re-provisioning will apply the correct firmware, and result in a series of white LED flashes for a few seconds, and then subsequent button clicks should become functional with a green LED confirmation. If impacted, you can let AWS know if this option will work for you. AWS has outlined the re-provisioning steps below for your reference.
Option 2: AWS can offer replacement for all your impacted developer buttons. Please note that 2nd Generation developer buttons are out-of-stock so currently they can offer you 1st Generation developer buttons as replacement. Please let them know if you prefer this option.
Re-provisioning steps:
Install and open the “AWS IoT Button Dev” application in the iOS or Android app stores, and log in to the app with your AWS account or IAM user.
If the button is already registered under your account, make a note of the Lambda function used by the button, and then choose the “delete” option for that.
Then choose “Set up AWS IoT Button”, scan the DSN barcode (or type it in manually from the back of the button), and click “Register Button”.
Once, the app automatically sets up your cloud resources, follow the instructions in the app to configure the button’s Wi-Fi.
When asked to associate a lambda function with the button, choose the original function to keep the same functionality. The button should then resume normal.
Create account by adding name, company name and contact details. Choose Professional or Personal Account and enter your phone number with no spaces.
2. Enter a credit card on the Payment Information screen – depending on the tier you choose (Personal or Professional) the card may or may not be activated.
3. Type in your phone number and enter the security check then hit the ‘Call Me Now’ button.
4. A four digit number appears on the computer screen.
5. Receive a phone call and enter the four digit code on your keypad.
6. You will then be verified after entering the code correctly.
7. Select a support plan – Basic (free), Developer ($29/month), Business ($100/month)
8. Confirm your email address at the custom link sent to your email address
You can now sign into the AWS console and personalize your experience based on your role, level of service and interests. Dig in, check out the tutorials and make your way around the AWS site!