Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.46 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.46 KB

NodeRED flow to update Thing shadows in AWS IoT from a TTN app.

It opens a connection to a TTN app on the incoming side and a connection to the AWS IoT MQTT broker on the outgoing side. Anything posted to the TTN app will be relayed to the according Thing shadow (based on the devEUI) on the AWS side.

Flow

NodeRED flow

This example flow for NodeRED needs a contrib node for TTN which you must install.

Alternatively you can use my resin.io-based NodeRED for TTN image to make it work out of the box on a RaspberryPi.

Getting started

Create a new Thing (the name must be a valid devEUI with leading zeros):

AWS ioT

with a certificate (download them!) and a policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "iot:*"
      ],
      "Resource": [
        "*"
      ],
      "Effect": "Allow"
    }
  ]
}

Then update the flow (flow.json):

  • replace <APPEUI> and <ACCESSKEY> of the TTN node.
  • update the broker host: XXX.iot.XXX.amazonaws.com to match what is shown as REST API endpoint when you look into the details of your created Thing in AWS IoT.
  • put the certificates into the right spot and/or update the paths.

and finally import your adapted flow into NodeRED.