https://github.com/thesolarnomad/ttn-to-aws-iot
NodeRED flow to update Thing shadows in AWS iot from a TTN app
https://github.com/thesolarnomad/ttn-to-aws-iot
aws aws-iot broker lora lorawan node-red thethingsnetwork ttn
Last synced: 3 months ago
JSON representation
NodeRED flow to update Thing shadows in AWS iot from a TTN app
- Host: GitHub
- URL: https://github.com/thesolarnomad/ttn-to-aws-iot
- Owner: thesolarnomad
- License: mit
- Created: 2016-07-12T13:25:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-12T14:07:21.000Z (almost 9 years ago)
- Last Synced: 2025-01-10T12:17:15.704Z (4 months ago)
- Topics: aws, aws-iot, broker, lora, lorawan, node-red, thethingsnetwork, ttn
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeRED flow to update Thing shadows in AWS IoT from a TTN app.
It opens a connection to [a TTN app](https://staging.thethingsnetwork.org/) on the incoming side and a connection to the [AWS IoT](https://aws.amazon.com/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
This example flow for NodeRED needs a [contrib node for TTN](https://www.npmjs.com/package/node-red-contrib-ttn) which you must install.
Alternatively you can use my [resin.io](http://www.resin.io)-based [NodeRED for TTN image](https://github.com/thesolarnomad/resin-node-red-ttn) 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):
with a certificate (download them!) and a policy:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"iot:*"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
```Then update the flow (`flow.json`):
* replace `` and `` 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.