title | weight |
---|---|
AWS IoT |
4605 |
This activity allows you to update a device shadow on AWS.
This activity comes out of the box with the Flogo Web UI
flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/awsiot
Inputs and Outputs:
{
"input":[
{
"name": "thingName",
"type": "string",
"required": true
},
{
"name": "awsEndpoint",
"type": "string",
"required": true
},
{
"name": "desired",
"type": "params"
},
{
"name": "reported",
"type": "params"
}
]
}
Setting | Required | Description |
---|---|---|
thingName | True | The name of the "thing" in Aws IoT |
awsEndpoint | True | The Aws Iot Endpoint for the account |
desired | False | The desired state to update |
reported | False | The reported state to update |
The activity looks for the AWS device certificates in a "things" directory relative to where the engine was started. Download the root CA certificate file and save it as "things/root-CA.pem.crt". Now place the cert and private key generated by Aws IoT for your thing under "things/[thingName]" as device.pem.crt and device.pem.key respectively.
Configure a task in flow to update the device shadow of 'raspberry-pi' with a reported temp of "50".
{
"id": "awsiot_1",
"name": "Update AWS Device Shadow",
"description": "Simple AWS IoT",
"activity": {
"ref": "github.com/TIBCOSoftware/flogo-contrib/activity/awsiot",
"input": {
"thingName": "raspberry-pi",
"awsEndpoint": "A3CWMRYOWXFD7I.iot.us-west-2.amazonaws.com",
"reported": { "temp":"50" }
}
}
}