LoRa to ThingSpeak Forwarder

Runs on AppCloud, forwards LoRa packets from ThingPark to ThingSpeak

ThingPark ThingSpeak Forwarder

Prepare the JS code

$ cd ./AppCloud

$ nano thingpark-thingspeak-forwarder.js

Set up a channel and get your WRITE_API_KEY at https://thingspeak.com/

$ nano package.json

Set your APP_NAME as name.

Use AppCloud CLI to login and switch space

(Get CloudFoundry CLI from https://github.com/cloudfoundry/cli/releases/)

Your APPCLOUD_USER is probably your email address.

Get your APP_ENDPOINT from https://console.developer.swisscom.com/ > Settings

$ cf login -a https://api.APP_ENDPOINT.appcloud.swisscom.com -u APPCLOUD_USER

$ cf target -o APPCLOUD_USER -s DEV

Deploy the JS code to AppCloud

$ cf push APP_NAME -c "node thingpark-thingspeak-forwarder.js"

Test the JS code with Curl

(Get Curl from http://curl.haxx.se/)

$ curl -vX POST https://APP_NAME.scapp.io/ -d "<payload_hex>23.00</payload_hex>"

< HTTP/1.1 200 OK

Set up a Webhook on ThingPark

Add a Webhook entry at https://swisscom.thingpark.com/deviceManager

The Webhook URL is https://APP_NAME.scapp.io/

Import code to Mbed

https://developer.mbed.org/users/tamberg/code/LoRaWAN_send_text/ > Import this program

https://developer.mbed.org/teams/Semtech/code/SX1276Lib/ > Import this library

https://developer.mbed.org/teams/Semtech/code/LMiC/ > Import this library

Prepare and deploy your Mbed Nucleo code

Set LORAWAN_DEV_ADDR, NwkSKey and ArtSKey.

(Replace message with your payload.)

Deploy to Mbed Nucleo.

Check the ThingPark Logger


Check the ThingSpeak Channel


Project homepage » Source code

Last update: 2015-11-07
Maintained by: tamberg

Launched at IoT Hackathon « all projects