Our default connection to AWS IoT assumes you are using the device shadow. Here's how to connect if you are not
Using the Device Shadow in AWS IoT means that the data from your devices is published in a standard, fixed way, which in turn allows DevicePilot to connect with almost no configuration.
If you are not using the shadow, we need a bit more information from you about your setup. In fact, we use our standard MQTT broker connection.
AWS IoT Connection
The process for connected starts with the regular AWS IoT connection. If you follow all the steps through, you will end with this screen, where we will wait for the data (that will never come).
The policy we helped you make only gives us access to the specific topics that the shadow uses. We will need to update this give us access to all your topics. You can read more about this here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html.
In your AWS IoT console, you need to open the policy we created (under Secure, Policies). You can then click "Edit policy document" to change it.
You'll see two "Resource" elements, both of which will have some string like
You need to replace both those arns with "*" which will give us Read and Subscribe (but not write access) to all topics. Alternatively, if you know your topics, then use a valid MQTT topic wildcard that provides access to the topics you want to use in DevicePilot.
Now we can create a new connection using our more generic MQTT connector.
On the first screen your broker address is the same as before (i.e. xxxxxyyyyyzzzzz-ats.iot.eu-west-1.amazonaws.com). Broker port is 8883.
The next page is access details. Under Broker security method, you choose Self-signed certificate, and the supply the same certificates as you did before.
From here, you should follow the steps for connecting in How do I connect to my MQTT broker: you''ll need to tell us:
- The topic wildcard pattern to subscribe to
- Where to find the unique id (either in the topic or in the payload)