/OpenDevice

Open IoT (Internet Of Things) Platform and Framework

Primary LanguageJavaScript

Build Status

Overview

OpenDevice is a set of tools and APIs to build solutions for the "Internet of Things" like home automations systems, robotics, smart city, energy monitoring, security, sensor monitoring.
Provide an open and unified framework to interconnect IoT devices, data, and applications over the Web, if you need communication between software and hardware, probably your place is here.

The main objective is monitor and control inexpensive hardwares like Arduino, ESP8266, RaspberryPI and similar platforms, local(offline) or over the cloud using high-level programing languages and with abstraction of protocols and low-level details.

This allows you to focus on your project and innovation, leave obscure details of communication protocols and specifications with OpenDevice, you will make a major step towards the success of your project.

Tip
Plug your device (Arduino/Raspberypi/Other) to the Cloud and sync in real-time

See overview

Code Sample

Arduino Side:
#include <OpenDevice.h>

void setup(){
    ODev.name("ODevSerial");
    ODev.addDevice("LED1", 13, Device::DIGITAL);
    ODev.begin(); // by default call Serial.begin() and while(!Serial) on Leonardo
}

void loop(){
	ODev.loop();
}
ESP8266 connected to OpenDevice MQTT Server:
#include <ESP8266WiFi.h>  // Enable ESP8266 Wifi
#include <PubSubClient.h> // MQTT
#include <ArduinoOTA.h>   // Enable Remote Updates

#include <OpenDevice.h>

const char* ssid = "ap-name";
const char* password = "1";

void setup() {
  ODev.enableDebug();
  ODev.name("ODev-Thing1");
  ODev.apiKey("6bde80c3");
  ODev.server("192.168.3.106"); // MQTT Remote server

  ODev.addDevice("Thing1:LED", 2, Device::DIGITAL);

  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password);
  ODev.begin(WiFi);
}

void loop() {
  ODev.loop();
}

Dashboards

The configured devices will be automatically synchronized with the Server using any available connection (usb, bluetooth, wifi, mqtt)

180988184 85cfc500 e0ee 4753 a3e5 f4a3b48047f8

Running the Server

The server run as standalone application, and you can also run using docker

APIs

You can use client libraries to controle devices directly (usb, bluetooth) or via server (MQTT) using Java/Android/Javascript or Rest

Simple like this (Java/Android):
    public class BlinkDeviceDemo extends LocalDeviceManager {

        public static void main(String[] args) { launch(args); }

        public void start() throws IOException {

            Device led = new Device(1, Device.DIGITAL);

            connect(out.usb()); // Connect to first USB port available

            while(true){
                led.on();
                delay(500);
                led.off();
                delay(500);
            }
        }
    }

But not only that…​ (You can also do in javascript and other languages.)

Technology

opendevice technology

Communications & Protocols

You can communicate with OpenDevice (Cloud and Local Services) using a variety of protocols
  • HTTP (REST)

  • Sockets/Websocket

  • MQTT (In progress)

You can communicate with devices using a variety of protocols
  • USB

  • Ethernet

  • WiFi

  • Bluetooth

Documentation

See documentation and examples at:

Getting Started

Contributing

Contributions are 10,000% welcome. If you discover a bug or would like to propose a new feature, please open a new issue.

To contribute, fork this repository and create a new topic branch for the bug, feature or other existing issue you are addressing. Submit the pull request against the master branch.

Are you using the library? Let us know and add your project to List:Projects-Using-OpenDevice