Skip to content

Core concepts

Henrik Östman edited this page Aug 3, 2014 · 3 revisions

Bear with me and I'll try to explain the various parts of a basic JEL setup, it's not that hard once you have read through the following sections.

JEL Concept drawing The JEL core parts.

Dictionary - Common words and terms

Server - The software that does the actual logging/controlling, retrieving and storing of information, and serving the clients. The Master and Satellites are two types of server softwares.

Client - Any software that connect to the Master-server through any of its Service endpoints. A standard installation of JEL contains a web based client used to administrate and visualize the installation, but third-party softwares could also act as clients, and you could with ease build your own client. Usually a client has some kind of User Interface (UI), but it could also be an other backend/server software integrating with JEL.

Service endpoint - An Application Program Interface (API) that the Server exposes to the client and that allows the Client to talk with the Server and sometimes even the other way. REST and WebSockets are two kinds of Service endpoints, Raw TCP sockets, or communication over Thrift, Avro, are other possible transportation protocols that could be used in the future. Several endpoints can co-exist at the same time giving maximum flexibility for various clients.

Master - Main Server software responsible for providing Service endpoints for the Clients, store and retrieve information, but also communicate with Adapters and Devices.

Adapter - Software responsible for actually communicating with the hardware and Devices.

Device - Software representing a single piece of hardware, a temperature sensor, a button, a humidity-sensor, a relay, a webcamera, a network switch, and more... A device could be a Sensor, a Actuator, or even both.

Satellite - A Server installation that extends your normal installation to cover other buildings or geographic places, relay commands from the Master.

Master

Every JEL installation has ONE single Master that is responsible for collecting sensor readings, controlling actuators, scheduling events, storing and retrieving information from storage (database), and presenting the client (UI) with an easy to use Service endpoint (REST-interface).

The Master is usually run on a computer with a decent amount of memory (128 MiB - 1 GiB), a powerful CPU (>700 MHz) and lots of storage space (1 GiB). The exact numbers depends on how big your installation is going to be and how many active client you want to support. For personal usage in your home with a handful of devices collecting sensor readings every 5 minutes and a couple of clients (smartphone, tables, desktop computers) for presenting the User Interface you could probably get by using a simple Raspberry PI Model B with an 8 GB SD-card. For larger installations with several hundred devices logging readings every second and with many active clients you should use a dedicated powerful PC with 1-2 GiB memory, 2 GHz CPU, and 100 GiB Hard Drive.

Plugin

By default the core JEL-server software provides a common platform, some basic support for Adapters, providing Service endpoints for the clients and so forth. Extending these capabilities are done by means of plugins, plugins could for example add support for additional types of Adapters, Devices, Service endpoints and more. Some plugins are provided by the JEL-core team others by the Open Source community.

Adapter

Adapters are the pieces of software that does the actual communication with the hardware, they also implement a common API allowing the core-software to talk with them and their devices without knowing the adapters inner workings. A server usually has several adapters set up at once allowing the software to talk to different types of units (devices) of hardware at the same time. Depending on the adapters it's quite common to bind to a hardware port (USB, Serial RS-232, Parallellport) or a network socket. There could be several adapters of the same type setup at the same server, but then they are usually bound to different hardware ports. An illustration might help to clarify this:

Adapter-Device relationship drawing

The top big box represent the JEL Server, it could be a Master or one of many Satellites. Below the Server we have the various adapters (mint green) that are installed, these could come included in the standard installation or as separate plugins. They are illustrated above with their name and what hardware port they are connected to (by Linux namestandard in this case).

First to the left of the adapters is an adapter for the One Wire FileSystem making it possible to talk to Dallas/Maxim 1-Wire devices, it's connected to ttyS0 which is the first serial port on the computer. Five devices (light blue boxes) are connected to the adapter, three DS18S20 temperature sensors, one DS2405 addressable switch, and one DS2408 8-channel addressable switch.

The next adapter is of the same type as the first one, supporting us with access to 1-Wire devices on the ttyS1 (second serial port). Two DS18S20, one DS2405, and one DS2406 addressable switch with memory, are bound to that adapter.

The third adapter provide us access to Z-Wave devices, only one device is currently connected, a SE812 Siren. The adapter is connected to the second USB-port.

The fourth adapter gives us support for TellStick-dongles and all kinds of wireless devices it supports, in this setup we have three Nexa CMR-100 dimmers and the TellStick adapter is connected our third USB-port.

The last adapter installed is one that allows us to connect to D-link webcameras over a network connection, two DCS-930L devices is connected.

Device

Actuator

Sensor

Satellite