Connect a TI Simplelink SensorTag via the IBM Watson IoT platform to Bluemix

Overview

This is a demo showing how to connect a Texas Instrument SimpleLink SensorTag via the IBM Watson IoT Platform to a Node-RED flow running on IBM Bluemix.

Architecture

The TI SensorTag connects via Bluetooth to an app on your smartphone. Your phone, in turn, is connected via Wifi or cellular data to the internet and transmits the SensorTag data into an application running on IBM Bluemix.

For more information and a step-by-step guide, see this github repo here: https://github.com/uwefassnacht/ti-sensor-tag-demo

[{"id":"ef0bf7ab.10f408","type":"ibmiot in","z":"5986b1eb.a6795","authentication":"quickstart","apiKey":"","inputType":"evt","deviceId":"yourDeviceIDgoesHere","applicationId":"","deviceType":"+","eventType":"+","commandType":"","format":"json","name":"TI Sensortag","service":"quickstart","allDevices":false,"allApplications":false,"allDeviceTypes":true,"allEvents":true,"allCommands":false,"allFormats":false,"x":106,"y":293.9999966621399,"wires":[["bd60020b.42a","50fd7462.af028c","5a8ef142.a5711"]]},{"id":"bd60020b.42a","type":"function","z":"5986b1eb.a6795","name":"Extract G-Force","func":"return {payload:msg.payload.d.gyroY};","outputs":1,"noerr":0,"x":324.5000286102295,"y":151,"wires":[["363b40a.fc9c4c","79384208.86c7bc"]]},{"id":"363b40a.fc9c4c","type":"switch","z":"5986b1eb.a6795","name":"G-Force Threshold","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"-30","vt":"num","v2":"30","v2t":"num"},{"t":"else"}],"checkall":"true","outputs":2,"x":577.5000286102295,"y":151,"wires":[["bc737021.438c9"],["ea7fd4c8.158028"]]},{"id":"baa3a839.455c58","type":"debug","z":"5986b1eb.a6795","name":"Status","active":true,"complete":"payload","x":992.5000286102295,"y":140,"wires":[]},{"id":"50fd7462.af028c","type":"debug","z":"5986b1eb.a6795","name":"Raw Device Data","active":false,"console":"false","complete":"true","x":311.5,"y":293.9999966621399,"wires":[]},{"id":"bc737021.438c9","type":"template","z":"5986b1eb.a6795","name":"No fall detected","field":"","template":"G-Force ({{payload}}) within safe limits","x":804.5000286102295,"y":89,"wires":[["baa3a839.455c58"]]},{"id":"ea7fd4c8.158028","type":"template","z":"5986b1eb.a6795","name":"Fall detected","field":"","template":"G-Force ({{payload}}) critical","x":808.5000286102295,"y":196,"wires":[["baa3a839.455c58"]]},{"id":"79384208.86c7bc","type":"debug","z":"5986b1eb.a6795","name":"G-Force","active":false,"console":"false","complete":"payload","x":548.9999980926514,"y":75,"wires":[]},{"id":"5a8ef142.a5711","type":"function","z":"5986b1eb.a6795","name":"Extract Temperature","func":"return {payload:msg.payload.d.objectTemp};","outputs":1,"noerr":0,"x":323.0952434539795,"y":437.337890625,"wires":[["474fc269.b8b03c","1bc3a62d.e43c5a"]]},{"id":"a19475be.5e6b88","type":"debug","z":"5986b1eb.a6795","name":"Status","active":true,"console":"false","complete":"payload","x":1016.3809623718262,"y":408.33790922164917,"wires":[]},{"id":"474fc269.b8b03c","type":"switch","z":"5986b1eb.a6795","name":"Temperature Threshold","property":"payload","rules":[{"t":"lt","v":"27"},{"t":"else"}],"checkall":"true","outputs":2,"x":558.3809623718262,"y":407.33790922164917,"wires":[["88bf71de.77409"],["f333c757.0ccc38"]]},{"id":"f333c757.0ccc38","type":"template","z":"5986b1eb.a6795","name":"Temperature too high","field":"","template":"Temperature ({{payload}}) is too high!","x":839.3809623718262,"y":455.33790922164917,"wires":[["a19475be.5e6b88"]]},{"id":"88bf71de.77409","type":"template","z":"5986b1eb.a6795","name":"Temperature safe","field":"","template":"Temperature ({{payload}}) within safe limits","x":834.3809623718262,"y":351.33790922164917,"wires":[["a19475be.5e6b88"]]},{"id":"1bc3a62d.e43c5a","type":"debug","z":"5986b1eb.a6795","name":"Temperature","active":false,"console":"false","complete":"payload","x":536.3809623718262,"y":496.33790159225464,"wires":[]}]
uwefassnacht

Flow Info

created 1 year, 8 months ago

Node Types

Core
  • debug (x5)
  • function (x2)
  • switch (x2)
  • template (x4)
Other
  • ibmiot in (x1)

Tags

  • SensorTag
  • TI
  • Bluemix
  • IoT
  • IBM
  • Simplelink
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option