• Non ci sono risultati.

Home Manager

N/A
N/A
Protected

Academic year: 2021

Condividi "Home Manager"

Copied!
14
0
0

Testo completo

(1)

Chapter 6

Home Manager

In order to provide home automation services, a hub-and-spoke structure can be used, with a centralized manager entity and the smart household appliances as the spokes. The network that includes the manager and the devices inside the house is called home network. In particular, the manager makes it possible to control the devices inside the home network. Control on devices is possible by means of operations, configurations or queries performed by the manager, either after a user’s order or automatically, according to a particular managing policy. The manager entity can be either a software application, installed on a computer, or a processing hardware. An example of such application, called Home Manager, has been developed.

The Home Manager and the smart devices communicate over a ZigBee net- work, allowing to address devices installation and mantenance in a more flexible and cost-effective way. The Home Manager refers to ZigBee Home Automation profile[13], which specifies the ZigBee clusters that are likely to be used in a do- motic application. Fig. 6.1 provides an overall view of the system architecture.

In particular, we suppose to have a special node named network coordinator, which is able to act as coordinator in a ZigBee network. Within the coordi- nator, both the Home Manager application and the gateway abstraction layer middleware (see chapter 4) have been installed. As depicted in the picture, users do not directly interact with the smart devices, but they are supposed to establish an application level session with the Home Manager application.

Moreover, the Home Manager provides the users with control and monitoring

27

(2)

6.1. Information’s persistance 28

Figure 6.1: General deployment diagram

functionalities as described in section 6.3, and makes use of the ZigBee stack by means of the GAL middleware discussed in chapter 4. Finally, communi- cations can be established between the network coordinator and the ZigBee smart appliances, thanks to the ZigBee protocol stack. Figure 6.1 shows the deployment diagram of the entire system.

6.1 Information’s persistance

The hardware where the Home Manager is executed can sometimes turn off.

This happens because:

• it is a personal computer, or a machine that is not supposed to be always on;

• it is a dedicated hardware that is supposed to be always on, but some- times can turn off, due to several reasons like failures or power supply interruptions.

Anyway, Home Manager needs a mechanism to make some information per- sistent, so that the user will not lose them between consecutive executions of

(3)

6.3. Program features 29

the program. An XML document, stored on a file, has been used. Among other information, the background image of the home map and the physical posi- tions of the devices are stored. This is why the file will be called “map file”.

However, other information not strictly related to the map, like device’s names or textual notes, is stored on the map file.

6.2 Graphical interface

Home Manager is likely to be used by home users, eventually unskilled. For this reason, the program must provide a simple and intuitive graphical interface, that permits even an inexperienced customer to use and configure the program features. Home Manager has a user-friendly graphical interface that provides some logically complex operations by means of simple clicks and drag-and-drop actions.

The graphical interface is splitted in two parts. In the upper part the user sees the information about the whole network, such as the map, the global power consumption indication and the list of detected devices. In the lower part there is a box containing the information about the specific selected device, called device control panel. Figure 6.2 shows a screenshot of Home Manager.

The screenshot in figure 6.3 shows a device control panel, which becomes visible whenever the user selects a device.

6.3 Program features

Home Manager is an application that permits a domestic user to manage a Zig- Bee network of smart household appliances. Its main objectives are centralized control, power saving and power overload protection. Home Manager offers the following features:

• Gateway connection and disconnection.

• New devices detection, both in automatic or manual mode, and their initialization.

• Devices first identification.

(4)

6.3. Program features 30

Figure 6.2: Home Manager screenshot

• Persistent name assignment to devices.

• Placing of devices on a bidimensional map (map placing).

• Association between a device and its relative supply smart plug (power binding), in order to display power consumption statistics and perform power-saving policies.

• Saving and loading from persistent memory of the map and some infor- mation.

• Attribute reports collecting and graph building of the trend over time of a certain quantity (temperature, power consumption, etc.).

• Centralized control for monitoring devices’ information and executing some operations. For example, changing the thermostat setpoint level of a heating device.

• Automatic execution of some procedures oriented to power-saving and power overload protection.

(5)

6.4. Power bindings 31

Figure 6.3: Device control panel

Home Manager can manage the following devices:

• Telecom Italia smart plugs,

• refrigerators,

• heating-capable devices,

• lighting devices.

6.4 Power bindings

The user can notify the Home Manager about the association between a device and the relative supply smart plug. Such associations are stored on the map file, so they are persistent from an execution to the next of the program. A device can receive power supply by no more than one smart plug; on the the contrary, a smart plug can give power supply to several devices. In order to avoid very complex configurations (trees of bindings, cycles, etc.) Home Manager does not

(6)

6.6. Device initialization 32

permit a smart plug to receive power supply by another smart plug. However, smart plugs are supposed to be installed behind wall sockets, in a way that the previous scenario can never happen. Power bindings setting is essential for the Home Manager to perform automatic power saving and power overload protection policies. See sections 6.13 and 6.14 for further details.

6.5 Gateway connection and disconnection

As its execution starts, the Home Manager enters initialization phase, in which it estabilishes the communication session with the gateway and automatically detects and initializes the reachable smart devices. If one of these devices, for some reason, enters the network after the initialization phase has been com- pleted, Home Manager offers two procedures to detect its presence: automatic or manual detection. Automatic detection is performed without user’s parti- cipation; the new device announces itself to the coordinator and the device initialization procedure is automatically started. Alternatively, the user can orders Home Manager to perform a manual detection, clicking on Actions Detect new devices.

Manual detection is mandatory for virtual devices. This happens because, when the device GAL announces itself to the coordinator, the virtual device application is likely to be off or not connected to it. Thus, Home Manager cannot retrieve the value of Model Identifier attribute (see section 9.2) and the automatic detection fails. Once the virtual device application is running and connected to its device GAL, a manual detection can be successfully performed.

Disconnection from the gateway is automatically performed when the Home Manager execution terminates.

6.6 Device initialization

Every time a new device is detected, Home Manager initializes it. The device initialization procedure consists of two operations:

• Attributes retrieval: the values of all the relevant attributes for the Home Manager working are retrieved. For example the internal temperature of

(7)

6.8. Naming 33

thermostat owner devices, or power consumption information of smart plugs.

• Reports configuration: the initial options for attribute reports are set. For example the reports’ frequency.

If, following a manual detection or in the program initialization procedure, more than one device is detected, their initialization is performed in parallel.

As a matter of fact, Home Manager takes advantage of the multi-threading properties of application abstraction middleware (see sections:synchronization) to reduce the time complexity of devices initialization from O(N) to O(1), where N is the number of new detected devices.

6.7 First identification

Once a new device in the network has been detected and correctly initialized, its symbol appears on the detected devices list. Although it is possible for the Home Manager to detect new devices and their type, their physical position cannot be determined. The Home Manager is able to show only a list of detected devices specifying their type, with no information about their placement. However, the user can identify a single device among different detected devices of the same type, by means of an out-of-band identification procedure, such as a physical signal perceptible by humans, like a sound or a blinking light, produced by the device. By interacting with the Home Manager, ther user can manually ask a single device to reveal its identity, and then associate a unique information, such as a name or a label. In order to perform identification, Home Manager tells the device to reveal itself by means of a command included in the standard ZigBee Identify cluster.

6.8 Naming

After having correctly identified a device, the user can give a name to it, pos- sibly an unique and easily-recognizable name, so that no further identification operations must be performed. This name is saved in the map file, so it’s per- sistent between subsequent executions of Home Manager.

(8)

6.11. Attribute reports gathering and graph building 34

6.9 Devices map placing

In order to make easier the devices identification, besides names, the user can place the devices’ symbols on a bidimensional map, depicting the house plant, previously loaded from a bitmap file. The map and the placed symbols are shown in the graphical interface. The map placing of a device is performed by means of a simple drag-and-drop operation from the detected devices list to a point on the map. The symbol of the device will now appear at the specified position. The placing point can be moved by a further drag-and-drop from a point to another of the map. The symbol of a smart plug is simplified by a green empty circle, while the symbol of a lamp is simplified with a dot, light yellow if turned on, grey if off.

6.10 Power bindings set up

In order to create a power binding, the user can click on (Menu device) Powered by. . .→ (Name of the supply smart plug). Once a power binding is set up, it is shown on the map as a green line that joins the device to the smart plug.

6.11 Attribute reports gathering and graph building

The attribute reports coming from devices are stored as couples (value, know- time) called samples. The know-time is the temporal indication of the report’s arrival instant (see subsection 8.3.5). These couples are collected in a log. A log is used to build a graph of a physical quantity’s temporal trend. These graphs are shown on the graphical interface, on the device’s control panel.

Home Manager shows the graph of the internal temperature measured by the thermostat of refrigerators and heating devices. For smart plugs, two graphs show the electric power and energy consumption. If a power binding is set for a particular device, its control panel shows the electric power consumption too, obtained from the associated smart plug.

The scale of the graphs’ time axis can be changed from program options, accessible through Tools → Options. The scale of the measures axis is automa-

(9)

6.12. Centralized control 35

Figure 6.4: Power consumption graph

tically set basing on the biggest shown sample. Besides, the freshest sample’s value in digits, with the measurement unit indication, is shown on the graphs.

Figure 6.4 shows a graph of a smart plug’s power consumption.

6.12 Centralized control

In addition to graphs, on the device control panel the user can view some real-time information and perform some operations on the device itself.

For heating devices it is possible to view thermostat setpoint level and change it, as well as for refrigerators. For refrigerators it is possible to view the door state (open/closed) and the content with the relative expiration dates.

The content items that turn out to go off are shown in red.

A smart refrigerator is supposed to know its content by means of RFID labels attached to the products. Since the retrieval of the content informa- tion is generally a high-bandwidth-consuming operation, it is not performed periodically, but only when Home Manager detects the closing of the refrige- rator’s door. At this moment, the domestic user has surely finished changing the content. In this way, the traffic quantity on the ZigBee network can be drastically reduced.

Finally, for the lamps and smart plugs it is possible to view and change their on/off state. For the smart plugs it is possible to set the automatic turn off functionality (see chapter 6.13).

(10)

6.14. Power overload protection 36

6.13 Smart plug’s automatic turn off

Some devices consume electric power even when off, due to, for instance, leds or always-working microprocessors. If the user thinks this consumption being useless, he/she can set the automatic turn off feature on the supplying smart plug.

If this functionality is enabled, Home Manager detects the beginning and ending instants of the device’s work, by comparing the power consumption with specific thresholds. Whenever Home Manager detects that a device has stopped working, it automatically turns off the associated smart plug. The user must perform manually the successive turn on order, either through a smart plug control (if such control is provided) or through the smart plug’s control panel on the Home Manager’s interface. Figure 6.5 shows the state diagram realizing this functionality. Both the working and the end-working power thresholds are configurable from program options. The distance between them can be made larger, in such a way to ignore eventual spurious power consumption fluctuations. In figure 6.6, a possible power graph of a device controlled by automatic turn off algorithm is shown.

6.14 Power overload protection

The traditional power overload protection is performed by domestic electri- city meter. Whenever it detects a global power consumption that exceedes a safety threshold (determinated often by the contract’s type), it turns off the electric power of the entire house. These behaviour can be annoying for the user, especially if the house contains devices for which a sudden black-out can cause drawbacks. These devices are called non-interruptible devices. Examples of these devices are personal computer or some medical equipment. Besides, non-interruptible devices are rarely responsible for overloads, thus their power off is still more undesirable. There are other types of devices for which sudden supply interruptions do not cause immediate damages, but can be likewise an- noying to the user. For instance, lighting devices are almost never responsible for overloads, but can cause inconveniences if suddenly turned off at night. In Home Manager environment, they are considered non-interruptible too.

(11)

6.14. Power overload protection 37

Figure 6.5: Automatic turn off algorithm’s state diagram

Figure 6.6: Automatic turn off power graph example

(12)

6.14. Power overload protection 38

Home Manager offers a smarter mechanism of overload protection. Since it knows the individual power consumption of each device and the kind (interrup- tible/ non-interruptible) of such devices, it can turn off only those interruptible devices that are responsible for the overload. In paricular, devices are divided in three categories.

1. Non-interruptible devices, for example lighting devices.

2. Intensity-lowerable devices, for example refrigerators, whose cooling level can be lowered in order to reduce power consumption, but never turned off.

3. Interruptible devices, for example heating devices.

An overload protection power threshold, preferibly lower than the one pro- vided by the home meter, is configured in the Home Manager. The overload protection mechanism takes place every time the global power consumption exceedes the threshold. In such a case, Home Manager takes the following countermeasures (in the following order).

1. Intervention on interruptible devices. It searches for the most consuming smart plug among those which:

• power at least one device; and

• power interruptible devices only.

If such smart plug is found, it is automatically turned off and an alert message is displayed.

2. Intervention on lowerable devices. Otherwise, Home Manager searches for the most consuming intensity-lowerable device. If such device exists, it is automatically lowered in intensity. For example, the thermostat tem- perature of a refrigerator is raised to the minimum level. Then, an alert message for the user is displayed.

In order to apply this algorithm, the individual power consumption of each lowerable device needs to be known. If a single smart plug powers more than one device, this is not possible. In such a case, all the lowe- rable devices powered by the smart plug are considered a single lowerable

(13)

6.14. Power overload protection 39

device (cumulative lowerable device), and its power consumption is the cumulative power consumption measured by the smart plug. Lowering a cumulative device means lowering each lowerable device it includes.

3. User alert. Otherwise, if Home Manager can’t make interventions on in- terruptible or lowerable devices, an alert for the user is displayed. The user will take the necessary countermeasures.

In figure 6.7, two different examples of overload protection are shown. On the left of each smart plug, a vertical red bar is shown, representing its current power consumption. The taken countermeasures are shown in red. The red ×s represent the turning off of a smart plug. The red ↓s represent the lowering of a lowerable device. In the first scenario, the upper smart plug is powering two interruptible devices. The intervention on interruptible devices can be perfor- med and the smart plug is turned off. On the contrary, in the second scenario the upper smart plug powers an interruptible device and a refrigerator, that is not interruptible. Since Home Manager can’t act on interruptible devices, an intervention on lowerable devices is performed on the lower refrigerator, which is the more consuming one. In each cases, an user alert is displayed after the automatic countermeasure.

(14)

6.14. Power overload protection 40

Figure 6.7: Automatic overload protection examples

Riferimenti

Documenti correlati

supplies due to high power consumption by individual elements and devices, which are located at a considerable distance from the control panel – voltage drops in the

With a known coal production plan for the next period and factors characterizing the mining, geological, and technological conditions of coal mining, a multifactor model based on

This fact determines a special role of hydropower engineering in development of interstate electric ties (ISETs) and formation of interstate power pools (ISPPs) in many regions of the

In order to carry out analysis of the impact of charging several groups of electric vehicles and the potential options for the control of electricity parameters in power grids,

Lepini Mountain +300 mt Via Appia +5 mt Sisto River Old coastal dune. +6 mt

For people who know about style and beauty, perfume is not just a perfume, it’s the start of something beautiful, and good beauticians know it.. Your smell says a lot about the

The new book of the Catalan sociologist Manuel Castells takes up again, after several years, some of the issues he tackled in some of his most famous works: the internet,

• Complex physical systems can always be decomposed in basic physical elements which interact with each other by means of “energetic ports”, and “power flows”.. • Examples