Git Product home page Git Product logo

asynctcp's Introduction

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

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

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

asynctcp's People

Contributors

andig avatar atanisoft avatar bmooij avatar copercini avatar ivankravets avatar matt123p avatar me-no-dev avatar obrain17 avatar robert-alfaro avatar tantive avatar tve 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.