Setting-up the Server

The server/middleware is a component of OpenDevice that allow management of many devices and provides APIs for integration, visualization and data storage.

It uses embedded servers, eliminating complex installations.

Be default it will provide: HTTP(port: 8181)Rest(8181)WebSocket(8181) and MQTT(1883) interfaces.

This guide will show you how to install OpenDevice on a PRIVATE CLOUD or raspberry 

You can also create an account and use http://cloud.opendevice.io (beta). If you have interest please contact us!

The server is an optional the component primarily used for managing and abstracting multiple devices. It is possible to develop projects using only the libraries and communicating directly with the devices (without using this server)


Installation Options

  1. Download and Installing
  2. Using Docker: click here
  3. Build from sources: See details

Opt 1. Download and Installing

Run this command to download and install:

curl -Ls https://goo.gl/mgQGNH | bash

For manual installation, you can also unpack the zip in folder of your choice, like:

Open: https://github.com/OpenDevice/OpenDevice/releases 

Download file: opendevice-middleware-distribuition.zip

unzip opendevice-middleware-distribuition.zip -d /opt/opendevice


Next, see Setting-up the Server#Running.

Opt 2. Using Docker

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

docker build https://goo.gl/K83bRY -t opendevice-server
docker run -d -p 8181:8181 -p 1883:1883 --name opendevice -t opendevice-server

Start / Stop using:

docker start opendevice

Opt 3. Building from sources

See details


Running

To start/stop the server, please run:

sudo ./bin/opendevice start
sudo ./bin/opendevice stop

Now, you can access web interface in: http://localhost:8181

Login: admin | Pass: admin

Next, you can connect devices to server

Configuration

Check configuration guide


Database Updates

java -cp "./lib/*" br.com.criativasoft.opendevice.middleware.tools.RunMigrations

NOTE: In the future this will be automated (10/2017)