Page 45 - ITU Journal Future and evolving technologies Volume 2 (2021), Issue 5 – Internet of Everything
P. 45
ITU Journal on Future and Evolving Technologies, Volume 2 (2021), Issue 5
Fig. 3 – Domotics ‑ OpenHAB Xiaomi binding con iguration
towards the historical database, which is hosted on an ex‑ topic rpi/fan/speed. To automatically manage the fan, two
ternal VPS server. The database structure is very simple, support memory tags are needed: (i) a boolean, to toggle
since it includes the two tables shown in Fig. 4. Instead, on or off the automatic fan pro ile; and (ii) a loat, to set
the topics’ structure is the following: the desired target CPU temperature. Also, a script is ap‑
plied to the CPU temperature tag, which triggers on each
• RaspberryPi CPU temperature rpi/cpu/temperature new read value, comparing it to the desired temperature
and deciding if its necessary to turn the fan on or off. To
• Current fan speed rpi/fan/rpm
avoid continuously switching the fan state, due to the tem‑
• Room’s temperature and humidity sensors: perature’s luctuations around the threshold value, the
∘
fan is turned off once a temperature, which is 2 C lower
– home/room_1/temperature & than the target one, is reached. A scheme of the just de‑
home/room_1/humidity scribed behaviour is sketched in Fig. 5.
– home/room_2/temperature &
home/room_2/humidity
– home/kitchen/temperature &
home/kitchen/humidity
• Current light state:
– home/light_1/state
– home/light_2/state
Fig. 5 – Domotics ‑ fan’s pro ile lowchart
Furthermore, a web GUI is needed to visualize and control
the connected devices; it is realized by means of Vision,
which is an UI building tool, provided by Ignition, and it
is able to build a local HMI, as shown in Fig. 6. Vision is
Fig. 4 – Domotics ‑ table structure
composed of four parts:
A memory tag is added to hold the current desired fan
• MQTT broker status, where the right LED indicates if
speed, ranging from 0‑100. Such a tag implements a
the broker is currently available (green) or not (red)
Python script, which triggers on a value update, checks
if the new value is valid and publishes it to the dedicated
© International Telecommunication Union, 2021 33