d erequisites
- Foundry is installed. If you have not installed Foundry follow the guide here.
- An AWS IoT Button (Leave it in the box so barcode can be scanned)
Steps
- Log in your AWS account.
- Download the mobile app AWS IoT Button Dev which can be downloaded for both Android and iOS.
- Follow the app's instructions to set up your device. If your having trouble with the app you can also follow AWS's guide here.
- Once you have the device setup. Open AWS IoT in the Console (Which should look something like this) and confirm you are in the same region you specified in the app.
- Navigate to Manage > Things and confirm your device is showing up.
- Once you have confirmed that your device is showing up Navigate to the Test page in the IoT Console.
- In the MQTT Client subscribe to the topic '#'.
- Click the IoT button once and confirm you are seeing the MQTT Traffic appear in the console.
Once you have confirmed that the button is publishing data. Log in to your Foundry account and navigate to https://[env].thinglogix.com/#!/mqttClient where [env] is either dev, qa, or prod and connect to the client.
Click the IoT button again and confirm the payload is also reaching Foundry.
Next, create a device type named "IoT Button" (There's no need to add any attributes for now). If you'd like more information on how to create a device type follow the guide here.
From here you'll need to create an Auto Provisioning rule so a device is created when an MQTT topic that is not in the system sends a payload for the first time. For info on Auto Provisioning follow the guider here.
- Important Note: When creating the Auto Provisioning rule make sure you select the Device Type "IoT Button" and make sure the topic follows the format as your incoming messages (In this case I would use for the topic "iotButton/#").
- Once the rule is created click the button again. If now navigate to your Assets page (https://[ENV].thinglogix.com/#!/devices) your device will have been created with a name that's a 32 character UUID.
- Click on the device to bring up the Buttons information (Which should look something like this).
- To view the data that came in the payload click the Device Data tab (If the Device Data tab is not appearing add it in your page in https://[ENV].thinglogix.com/#!/preferences.)