Giter VIP home page Giter VIP logo

aws-uart's Introduction

Mongoose OS & AWS IoT - UART and Thing Shadow example (Javascript)

Overview

This app does two things.

  • Reading UART 0 of ESP8266 and sending it to AWS IoT
  • Sending device metadata and two pins state to AWS IoT

How to install this app

Step 1: Import

Via MOS UI tool
  • Install and start mos tool
  • Switch to the Project page, find and import this app(if available otherwise follow the steps below), build and flash it:

Flash the app through command line
  • Clone this repo git clone https://github.com/mongoose-os-apps/aws-uart
  • Go into the directory aws-uart and run mos build --arch esp8266 ( Change the arch respectively )
  • After that, you should see a build directory in the current directory which will have the fw.zip binary
  • Run mos flash which flashes the current build
  • Run mos console and check

Step 2: Set up Wi-Fi

  • You can do this via mos tool UI or use command mos wifi WIFI_NAME WIFI_PASSWORD

Note that mos talks to the device using RPC mechanism. RPC can talk over serial (uart), http, mqtt. By default, mos talks via uart. but aws-uart example takes over uart, therefore mos RPC does not work. You need to use another RPC channel - for example websocket. Therefore, update mos.yml, put your wifi credentials there, then build/flash, see what IP address is assigned to your board, and start mos as mos --port ws://IP_ADDRESS/rpc.

Step 3: Set up and Provision AWS IoT thing, Policy

  • You can do this via mos tool UI or use command mos aws-iot-setup --aws-iot-policy mos-default
  • Create a thing in AWS IoT and you are done
  • Test this by going into AWS IoT MQTT test Console by subscribing to mos/# with QoS 1

Video

Mongoose OS + AWS IoT

aws-uart's People

Contributors

bravokeyl avatar cpq avatar dimonomid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.