1. Open the aliyun IoT website
2. Create a product if you don't have any products
3. Add devices under the product
important
data which we will use them later
4. Now you have following - ProductKey
- DeviceName
- DeviceSecret
they need to be fill in the PM4 mqtt settings as
5. input any client id you want
for example "12345" in our case.
Auto
for full client id,
6. please choose the client id 12345 inputed is not the actual client id we send to Ali IoT Cloud. As per Ali policy, the client id need to complete with connection method and sign method.
But don't worry, if you choose auto, PM4 will complete the actual client id automatically.
Auto
for the username as well, PM4 will setup the required username required by Ali policy
7. please choose
hmacsha1
required by Ali policy
8. the password will be genreated automacally by using OK. now you can be connected. Next topic we will focus on the Pub/Sub
How to use Pub/Sub topics
1. edit the product details in Ali Iot Website
2. you can add customized topic by the naming rules of Ali
3. now you can see the topics are in the device's topic details
4. in the pm4, add those topics need to sub/pub
5. users can write those listening and sending macros to pub and sub the topics.
That's all. Thank you for reading it.
Author: Tom CHEN