Platform demonstrates a Nordic Thingy:52 and AWS integration use case. The back-end and front-end are entirely powered by Amazon Web Services. The device sends metrics to AWS IoT via BLE connector (PC).
You can see the live demo here.
Nordic Thingy:52 is used as a demo device. It is a "thing" for the AWS IoT service. Listener (PC) connects to the device over Bluetooth via middleware. Middleware subscribes to sensors updates and resends data to AWS IoT. It updates its shadow with sensors data every second. Following environmental sensors are supported: Temperature, Humidity, Air pressure, Air quality (CO2 and TVOC), Color and light intensity. Following motion sensors are supported: Tap detection, Orientation, Step counter, Quaternions, Euler angles, Rotation matrix, Gravity vector, Compass heading. Time series data is stored in the cloud. And you can observe actual data and history on a dashboard. Also after clicking on the button a marker is being sot on charts.
Back-end is entirely powered by Amazon Web Services. See platform schema. If you don't have an AWS account, create one. Amazon provides AWS Free Tier for new accounts. Demo platform is lightweight and should fit into the free tier limits.
It is a React and Redux application which renders the board sensors data as D3.js charts. On the application start, initial data set is fetched from a public API endpoint. By default data for the last 4 hours is rendered. Charts are updated in a real time with the data coming from the Cloud via MQTT over WebSocket protocol. They have two visualization modes: line and area. Here are links to dashboard source code and live demo.
config.dev.ymland set your own settings. Note: Replace OWN_API_KEY in
config.dev.ymlfor a valid Open Weather Map API Key.
npm run setup.
For deployment to your AWS account perform the following:
npm run deploy:sls.
npm run deploy:spa.
For local development serverless-offline plugin is used. To launch app in offline mode perform the following:
npm run offline.
Note: For local AWS IoT we use Mosquitto Broker, setup on local machine with enabled WebSocket protocol (127.0.0.1:1883), without auth
To setup connection to your Nordic Thingy:52 perform the following:
npm run thingy52:device:connect.
If you don't have a Nordic Thingy:52 you can use program simulation of the device. For launch simulation do following:
npm run thingy52:simulator:aws
Note: Current version of device simulator is AWS-based, you should deploy serverless stack before launch it.