Keywords

1 Introduction

The RoboPhery project makes it possible to utilize inexpensive Linux and MicroPython compatible micro-controllers, hardware actuators and sensors to create fully autonomous Ambient Intelligence platform. This platform can perform wide range automation use cases. These range from simple environmental automations, surveillance, to complete ambient intelligence environments.

First chapter introduces global architecture of autonomous agents with communication protocols for messages to the overlaying event driven controllers, dashboards or any other services. These systems use scalable and modular architecture to minimalize the computational overhead which allows efficient use of available hardware resources.

The next part covers the autonomous agents in more details. Models of hardware interfaces and corresponding modules. It also covers description of the virtual modules that provide the simple thresholds or fuzzy logic reasoning for autonomous control.

The final chapter shows simple interaction with overlay control system that can communicate with multiple autonomous systems, gather vital information and even publish arbitrary actions on demand.

The control system contains time-series database, dashboard and reasoning platform which can detect hardware malfunctions of autonomous agent systems and perform necessary steps to repair it. With the usage of virtual models that provide high-level access to individual physical modules of individual agents.

1.1 Ambient Intelligence Environments

The main and basic ideas of Ambient Intelligence is an interconnecting an environment and technologies (mainly interconnected sensors and devices). This whole system can be designed to take care of this environment based on real-time and historical information (data). Ambient Intelligence inherits aspects of many areas of Computer Science, see Fig. 1, but should not be confused with any of those technologies [1, 14, 15].

An example of ambient intelligence is a Home environment, where is possible to solve some a lot of challenges using ambient intelligence [9]. Ambient intelligence was originally pointed by Eli Zelkha at Palo Alto Ventures in the late 1990s. This was a future vision of consumer electronics and computing and time frame for this was 2010–2020 [1, 20].

In an ambient intelligence, devices are interconnected to people support in life activities everyday, tasks and rituals in a natural way that uses information from physical environment collected by network connected devices and uses cloud power to drive the intelligence that can react and learn to the information coming from the environment [1, 5, 19].

The physical devices are constantly smaller and integrated into environment and the technology is mainly visible for end users just only via user interfaces (dashboards) [10].

Fig. 1.
figure 1

Ambient Intelligence relationship to other computing science areas

The ambient intelligence is built on a pervasive and ubiquitous computing, profiling, context awareness, and design on human-centric computing. Also it is characterized by interconnected systems and technologies [1, 5, 15, 20] (Table 1).

Table 1. Main Ambient Intelligence environment properties

1.2 Information Flows

There is a lost of was for building an Ambient Intelligence systems or environments, but the most often there are needed sensors and devices to surround users of an environment (interactors) with technology [5].

The technology collects and provides accurate data to the system. The collected data are transferred over the network and processed by middleware, which can collect data from multiple devices [4, 18] (Fig. 2).

Fig. 2.
figure 2

Flow of information in Ambient Intelligence system

An decision-making can be more beneficial to the people in the environment, when the system will provides higher level of reasoning and will accomplish diagnosis and advise, or system will assist humans with responsibility for intervention [4, 16].

High level Decision Making service are composed of a Knowledge Repository, where the events from environment are collected and stored. Thanks of this, AI Reasoner applies for example spatio-temporal reasoning to make decisions based on collected data.

Decision trigger actions to be performed in the environment and this is enabled via Actuators. The Knowledge discovery uses machine learning techniques to learn from the acquired data and information in order to update the AI Reasoner with the gained experience of the system. A typical information flow of Ambient Intelligence system is depicted in Fig. 3.

2 Ambient Intelligence Environment System

RoboPhery project provides software drivers for a wide variety of commonly used sensors and actuators through both wired and wireless interfaces. Platform is designed for multiple interfaces to be stacked (GPIO, IC or SPI over IQRF or Bluetooth) to provide seamless integration with large variety of hardware platforms. The software drivers interact with the underlying hardware platform (or micro-controller), as well as with the attached sensors, through API calls to the interfaces [1, 3, 8, 17].

The actuators are controlled and the data is collected on RoboPhery Managers and this functionality forms a hardware foundation for ambient intelligence environment. The event-driven control system, data storage and data processing systems are provided in form of external cloud services or handled by computer with more processing power [7].

On the Fig. 3, you can see components of our proposed ambient intelligence system and their relationships. The central component is the message bus, in our case provided by MQTT broker [7, 11].

The basic architecture consists of time-series database, user dashboard and event-driven control engine, machine learning services and the on premise RoboPhery Manager. The actual RoboPhery service is written in Python in way compatible with MicroPython used on micro-controllers.

Fig. 3.
figure 3

Ambient Intelligence environment system

2.1 Global Message Bus

MQTT is a machine-to-machine connectivity protocol in area of “Internet of Things” [12]. MQTT was designed as an extremely simply publish/subscribe messaging transport protocol and thanks of this, it can be used for connections with remote locations where a small code footprint. This is reason, why requirements and/or network bandwidth are low. The MQTT broker can handle thousands of messages per second, supports high-availability setups for both high performance and stability. Individual autonomous agents and cloud-based Control system along with time-series databases are connected to this common message bus [11].

2.2 Cloud-Based Controller

As a architecture can be used an Event-driven architecture (EDA), which is message-driven architecture, where all components are reacting to events [13].

Events are significant changes in a state of components in the environment. For example, when a user turns on a computer, the state of computer changes from “off” to “on” and this change is captured as an event [7]. After this system architecture will treat this state change as an event which can affect other components in the environment. Also based on this change can be created message called the event notification. Events just occur, notification can be provide to the environment.

Time-Series Database. A time series databases are optimized for time series data handling and storage, where numbers are indexed by time (a date time or a date time range) [6, 8]. A time series of storage prices is called a price curve and energy consumption is called a load profile.

Database queries and transactions are used and useful for analyzing, but these operations should be specialized for time-series data for correct, reliable and effective implementation of an time-series database. Time-series Databases are optimized for time series data.

Complex softwares for time series data may not be practical with regular relational database systems. Traditional flat file databases are not appropriate, whe the data and a count of transactions reaches a maximum threshold determined by the capacity of individual servers. Queries for historical data, with time ranges and time zone conversion are difficult in a traditional relational database.

The problem for traditional relational databases is that they are often not modeled correctly to respect time series data and time-series databases impose a model and this allows them to provide more features for time series data.

Machine Learning Engine. Machine learning is science discipline, which deals with algorithms for learning from data and making predictions. These algorithms make data-driven predictions or decisions through a model, which is built based on sample inputs.

Machine learning is used in case, when is not possible to program explicit algorithm with a solid performance.

As a science discipline, machine learning is close connected to computational statistics, which is focused on prediction-making on computers or computational systems.

Machine learning is used in data analytic for making a design for complex model and algorithm, which help with prediction. Also it is called as predictive analytics.

This analytical model helps researchers, data scientist, engineers and analysts with research of real condition of environment. This model should also produce reliable and repeatable decisions, which should be consistent.

The one of most important activities is uncovering of hidden insights through learning from historical relationships and trends in data.

2.3 Ambient Intelligence Environment Middleware

Autonomous unit is Python service, which communicates with hardware peripherals and sending and receiving data from external communication sources. RoboPhery unit consists of several objects. Communication objects handle sending and receiving messages from the upper layer services or other autonomous units. Interface objects handle abstraction to hardware communication at device level. Modules encapsulate individual hardware sensors and actuators. Finally the RoboPhery manager serves as central service that connects all other models within the autonomous unit.

When data are collected from sensors, it is important to data will be transfered and stored in correct state to the highest part of system, e.g. to time-series database.

Message Bus mainly take care about communication between agent in Autonomous Agent System, because data can’t be easily transfered from sensor (agent) to database directly. Message Bus also can aggregate data to bigger units or make some basic transformations.

Fig. 4.
figure 4

Ambient Intelligence environment interactor

Autonomous services take care about conditions from sensors and values, which are captured. There are predefined conditions and when captured values are identical with same condition, monitoring agent send a message via message bus to reacting agent, which will performs predefined action (Fig. 4).

3 Sample RoboPhery Deployments

This chapter shows several use-cases of the usage of RoboPhery as hardware interfacing layer. Following Figures shows simple device configuration setups for various wired and wireless interfaces.

3.1 ESP2688 ModeMCU Micro-controller

Figure 5 shows the RoboPhery manager service running on the ESP2688 ModeMCU micro-controller with multiple sensors connected to interfaces present directly on the target device. The device has low computational power and low power consumption making it suitable for remote wireless probes with several attached sensors.

Fig. 5.
figure 5

ESP2688 micro-controller direct interfaces

3.2 Raspberry Pi 2 Device

Following figure shows RoboPhery service running on the Raspberry Pi device with MCP23008 I2C to GPIO expander boards and multiple sensors connected to individual interfaces. You can generally use multiple expander boards to support great numbers of sensor modules connected at a time (Fig. 6).

Fig. 6.
figure 6

Raspberry Pi computer extended interfaces

Fig. 7.
figure 7

x86 Computer IQRF Mesh interfaces

3.3 x86 Computer with IQRF Mesh Network

Following figure shows RoboPhery Manager service running on the x86 single board computer with USB connected to the IQRF coordinator with multiple sensor interfaces connected through a common mesh network. Individual mesh member implements an interface and can support multiple sensor modules (Fig. 7).

4 Conclusion

This article has shown the growing phenomena of Ambient Intelligence environment and what role it can play in daily life. We have introduced RoboPhery project for simple interaction layer for a wide variety of commonly used sensors and actuators. This layer is an integral part of any Ambient Intelligence Environment.

The main utility of the service list rests in the fact, that after little code-base changes can be operated on both computers and micro-controllers. It can reuse the sensor and actuator drivers on all platforms, thus greatly reducing the costs of migrations and reduces the vendor lock-in as you are free to use a lot of different devices available on the market. At the end the whole system is designed to be extremely modular a provides wide range of hardware interfaces and modules in the default setup and easy way to introduce any new interface or module.

The micro-controllers provide only a very limited computational power, operating memory, but it is enough to run the communication and sensoric operations. Modern single-board computers on the other hand can provide much more. They can communicate with external services, a provide enough power for other services in Ambient Intelligence stack as machine learning, time-series databases and event-driven automation. The further research is needed to explore possibilities of integrating the RoboPhery project with external services and expand the list of supported micro-controllers and devices.