All Projects → jamesjara → React Native Aws Iot Device Shadows

jamesjara / React Native Aws Iot Device Shadows

React Native Component for connecting to AWS IoT Shadows from a device using SDK JavaScript bundle

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Aws Iot Device Shadows

Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+2553.33%)
Mutual labels:  aws, aws-iot, mqtt, iot
Cloudiscovery
The tool to help you discover resources in the cloud environment
Stars: ✭ 298 (+893.33%)
Mutual labels:  aws, aws-iot, iot
Serverless Chat
A serverless web chat built using AWS Lambda, AWS IoT (for WebSockets) and Amazon DynamoDB
Stars: ✭ 99 (+230%)
Mutual labels:  aws, aws-iot, mqtt
Esp Mqtt
ESP32 mqtt component
Stars: ✭ 403 (+1243.33%)
Mutual labels:  mqtt, iot, component
Aws Mqtt Client
AWS Websocket Pub/Sub client
Stars: ✭ 147 (+390%)
Mutual labels:  aws, aws-iot, mqtt
Mongoose Os
Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
Stars: ✭ 2,234 (+7346.67%)
Mutual labels:  aws, aws-iot, iot
Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (+2526.67%)
Mutual labels:  aws, mqtt, iot
Dorita980
Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
Stars: ✭ 523 (+1643.33%)
Mutual labels:  mqtt, iot
Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+16823.33%)
Mutual labels:  mqtt, iot
Hivemq Community Edition
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Stars: ✭ 562 (+1773.33%)
Mutual labels:  mqtt, iot
Arduino Mqtt
MQTT library for Arduino
Stars: ✭ 685 (+2183.33%)
Mutual labels:  mqtt, iot
Aws Iot Chat Example
💬 Chat application using AWS IoT platform via MQTT over the WebSocket protocol
Stars: ✭ 474 (+1480%)
Mutual labels:  aws-iot, mqtt
Redmatic
Node-RED packaged as Addon for the Homematic CCU3 and RaspberryMatic 🤹‍♂️
Stars: ✭ 407 (+1256.67%)
Mutual labels:  mqtt, iot
Hassio Zigbee2mqtt
Hass.io add-on for zigbee2mqtt
Stars: ✭ 547 (+1723.33%)
Mutual labels:  mqtt, iot
Hivemq Mqtt Client
HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
Stars: ✭ 402 (+1240%)
Mutual labels:  mqtt, iot
Convention
🏡 The Homie Convention: a lightweight MQTT convention for the IoT
Stars: ✭ 582 (+1840%)
Mutual labels:  mqtt, iot
Volantmq
High-Performance MQTT Server
Stars: ✭ 785 (+2516.67%)
Mutual labels:  mqtt, iot
Inchat
一个轻量级、高效率的支持多端(应用与硬件Iot)的可分布式、异步网络应用通讯框架
Stars: ✭ 654 (+2080%)
Mutual labels:  mqtt, iot
Paho.mqtt.embedded C
Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
Stars: ✭ 887 (+2856.67%)
Mutual labels:  mqtt, iot
Mqttx
MQTT X - Elegant MQTT 5.0 Client Tool of Cross-platform
Stars: ✭ 892 (+2873.33%)
Mutual labels:  mqtt, iot

aws-iot-device-sdk-js-react-native

React Native Component wrapper for connecting to AWS IoT from a device using SDK JavaScript bundle

Allows developers to use the AWS IOT shadow support from a React Native component.

Overview

This document provides instructions on how to install and configure the AWS IoT device/Shadow in React Native.

AWS SDK Dependency

This package is built on top of the AWS SDK aws-sdk.js which provides two classes: 'device' and 'thingShadow'.

Thing Shadows

The 'thingShadow' class implements additional functionality for accessing Thing Shadows via the AWS IoT API; the thingShadow class allows devices to update, be notified of changes to, get the current state of, or delete Thing Shadows from AWS IoT. Thing Shadows allow applications and devices to synchronize their state on the AWS IoT platform.

Device

The 'device' class wraps mqtt.js to provide a secure connection to the AWS IoT platform and expose the mqtt.js interfaces upward. It provides features to simplify handling of intermittent connections, including progressive backoff retries, automatic re-subscription upon connection, and queued offline publishing with configurable drain rate.

Installation

Installing with npm:

npm install react-native-aws-iot-device-shadows

Examples

MQTT React Native IoT Shadow Class

<AWSIoTMQTT
    ref={(ref) => { this.AWSIoTMQTT = ref; }}
    type="shadow"
    region="us-west-2"
    host="asdasd.iot.aws.com"
    onReconnect={() => this.onConnect()}
    onConnect={() => this.onConnect()}
    onDelta={(thingId, stateObject) => this.onDelta(thingId, stateObject)}
    onStatus={(thingId, statusType, clientToken, stateObject) =>
        this.onStatus(thingId, statusType, clientToken, stateObject)}
    onThingConnected={(thingId) => { this.onThingConnected(thingId); }}
/>

MQTT React Native IoT device Class

<AWSIoTMQTT
    ref={(ref) => { this.AWSIoTMQTT = ref; }}
    type="device"
    region="us-west-2"
    host="asdasd.iot.aws.com"
    onReconnect={() => this.onConnect()}
    onConnect={() => this.onConnect()} 
/>

AWSIoTMQTT

Returns a React Native component whichs wraps xxxxxxxx

## API Documentation

  • type: use 'device' for device type and 'shadows' for ShadowThing
  • host: the AWS IoT endpoint you will use to connect
  • region: the AWS IoT region you will use to connect
  • config: extra configuration for the thingShadow
  • onConnect: callback for when the websockets connects
  • onReconnect: callback for when the websockets reconnects
  • onDelta: callback for delta msg
  • onStatus: callback for status msg
  • onThingConnected: callback for each registered thing

Connection Types

This react native component only supports one type of connections to the AWS IoT platform:

  • MQTT over WebSocket/TLS with SigV4 authentication using port 443

Debug

The enable debug mode for display logging information just pass a object with debug:true

<AWSIoTMQTT
    config={debug:true}
    ...
/>

Re-Creating the bundle with webpack

This IOT JS SDK is packaged withwebpack, because currently there is not official support for AWS IOT react native. This is already bundle it for you using the last version.

npm run build

Unit Tests

This package includes unit tests which can be run as follows:

npm test

Running the unit tests will also generate code coverage data in the 'reports' directory.

License

This react native component is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

Support

feel free to open any ticket in github issues

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].