A Review of the Telegea Smart Hub running openHAB

2018-03-24

There’s a big market of home automation gateways out there. You can choose between commercial products and rely on the closed ecosystem, but you can also choose a hardware that runs open source software and is driven by the community.
Even better if the hardware itself is a product based on open source solutions and is generally hackable SoM board.

A while ago I’ve discovered a thread titled “Developing an openHAB server hardware”. It got me interested - having a nice hardware designed to work with openHAB sounds great!

The aim for me was to move my whole production home automation system straight into the Smart Hub.
My personal setup became a guinea pig for an unnknown product to which I would literally move all my rules and other configuration files.

Shout out to DEK Italia for sending me a free Telegea Smart Hub to perform all my tests!

The Hardware

When I took a first look at the device, I thought I’m not the target user for it.
My setup is mostly based on Z-Wave, ZigBee, ESP8266 devices. I went wireless for the time being.
The Smart Hub, however, is a full blown home automation device with I2C, SPI.

Telegea Smart Hub seen on the front

The heart of Telegea Smart Hub is Raspberry PI Compute Module.
I already had experience with the RPi ecosystem (My current system is based on Raspberry PI 3B) but didn’t work with the computing module before.
Its tiny form factor, fitting into a standard DDR2 SODIMM connector, allows you to build highly customizable hardware around it.
And that was the case for the Telegea Smart Hub - they utilized existing and well known platform, and built a product that addresses the needs of home automation enthusiasts.

I was amazed how feature-rich this hardware is.
The Telegea Smart Hub combines Raspberry PI Compute Module with a set of useful I/O for any kind of home automation solution.

There are USB ports, where I’ve installed a Z-Wave dongle right away.
You’ll find some One-Wire bus, analog and digital inputs, RS485, I2C and SPI ports.
You can also utilize GPIO extension, mount a WiFi module or place a XBee module for more IoT devices.

Built inside a DIN module is a perfect fit for any electrical equipment rack.

More details on the hardware spec can be found here.

Telegea Smart Hub on the side

Telegea Smart Hub on the side

Setup

Setting up Telegea Smart Hub was as easy as:

  1. Plugging in the Ethernet cable
  2. Plugging a 5V charger to the USB port

After that I was able to manage pre-installed openHAB directly from my browser.
I wouldn’t be myself if I didn’t lurk on the ssh first!

Connecting to the system through SSH

The Smart Hub came to me with openHABian system already installed in the eMMC drive of Raspberry PI computing module.

1
ssh openhabian@openhabianpi.local

Default password: openhabian

After successful sign in, I’ve launched openhabian configuration tool in order to conveniently upgrade my system and install all components for my personal setup:

1
sudo openhabian-config
  1. Update your openHABian-config to the latest version
  2. Upgrade system
  3. Update openHAB to latest stable version

When you exit openHABian config, a warning will appear:

1
2
3
4
5
│ The default password was detected on your system! That's a serious │
│ security concern. Others or malicious programs in your subnet are │
│ able to gain root access! │
│ │
│ Please set a strong password by typing the command 'passwd'! │

This showed up because we left out the default password (openhabian).

openHABian configuration

As I already had one openHAB on Raspberry PI laying around, I changed the default hostname to telegea.
In order to do that:

  1. Launch openHABian configuration window (sudo openhabian-config)
  2. Go to System Settings
  3. Select Change Hostname
  4. Follow the wizard
  5. Reboot your machine (sudo reboot)

Installing additional components to the Smart Hub

In openHABian there’s Node.js already pre-installed. That means you can use some optional components already.

  1. Log Viewer - a nice UI with a tail command on a webpage. It shows you filterable logs of your openHAB system.
    You can access it from http://openhabianpi:9001/. It’s shipped with openHABian right away, so you don’t need to install it yourself.

  2. Node-RED - a visual tool for IoT. Its installation process is automated within openHABian as well. Learn more at https://nodered.org/

  3. Additional openHAB Add-Ons

    • Paper UI - a convenient dashboard to manage all your Things, Items, Bindings and so on. You can install it manuall by modifying /etc/openhab2/services/addons.cfg and adding paperui in the ui= section.
    • Home Builder - a boilerplate for your home automation system. Fill the form and the Items, Sitemap and HABPanel dashboard will be generated for you.
    • Bindings like 1wire, gpio1, exec
    • openhabcloud for remote access through www.myopenhab.org

Note: If you’re editing your openHAB configuration files from a PC (e.g. through a Samba share), I highly recommend you to install Visual Studio Code (a open source text editor) along with the openHAB Extension.

Integrated sensors and actuators

The board has integrated temperature and humidity sensor - SHT21. It’s a low power, fully calibrated sensor with digital output.
It’s available over GPIO44/GPIO45.

There’s also programmable push button integrated directly to the board. You can easily incorporate it within your openHAB set up using e.g. a GPIO binding. The button is accessible from GPIO36.

If you’d like to reflect some openHAB Item’s state directly on the Smart Hub, you can either use built-in yellow LED or attach a LED Display to the board, as there’s a connector compatible with Adafruit 2.8” PiTFT TFT.

Telegea Smart Hub - integrated circuit

Migrating existing setup

One awesome feature of openHAB is that you can manage your whole configuration through the text files.
I used sudo openhab-cli backup in my previous Raspberry PI 3B installation, which zipped nicely my openhab-conf and openhab-userdata folders. Then I simply moved the folders to my Telegea Smart Hub system.

At first I was worried that there’s just too much to handle at once.
But openHAB on the Smart Hub handled the migration just fine.
The only thing I needed to do manually was the Z-Wave things definition - these were added through the Paper UI Inbox.

The Smart Hub worked as expected for all my Z-Wave devices (I have about 30 sensors, power plugs and meters).
It communicated with Xiaomi Mi Home binding and a bunch of MQTT sensors based on ESP8266.

So far so good! Nothing broke, the internal sensors and I/O blended together nicely with the wireless setup.

Let’s see how the persistence service is handled.

Persistence

I’m using InfluxDB and Grafana combo for the reporting and graphing.
I think that Influx is the best type of database for IoT, as it has a lightweight structure (timestamp + value) and it integrates nicely with openHAB as well as Grafana.

Thanks to pre-installed openHABian in the Telegea Smart Hub, installing both InfluxDB and Grafana was as simple as:

  1. Logging into ssh
  2. sudo openhabian-config
  3. Choosing Optional Components option
  4. Selecting Influxdb+Grafana

And that’s it!

From now on I had a full persistence for my home automation.
If you’d like to know how to configure it, definitely check out this awesome tutorial by Thomas Dietrich.

Sadly, after a couple of days I’ve observed that my configuration was heavily utilizing the internal memory of Smart Hub’s compute module. As a result the performance dropped and I worried that the eMMC flash will wear sooner with my excessive read/write cycles.
Heavy database writes coming from around 600 items from my existing system and 4 GBs of memory that Raspberry offered was simply not sufficient for my scenario.

This was the point when I decided to get rid of internal InfluxDB instance, and moved it to another system.
It should still be fine if I left it on the Smart Hub, although I had no USB/SATA connector laying around, so I could test it with an external drive.

I’ve left Grafana UI on the Smart Hub anyway, as it doesn’t consume much of the memory.

Overall, given 4 GBs of internal storage, I think that Smart Hub should be good to work with a InfluxDB persistence to a point.
Just be careful with number of logged data points.

Performance

I’ve successfully migrated all my rules, items, sitemaps and HABPanel dashboards to the Smart Hub.
Next step was to check out the RPi performance with System Info binding.

In order to do that, I’ve set up the following configuration files:

system.items

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Group gSystem
Number Systeminfo_MemoryTotal "Memory total" (gSystem) {channel="systeminfo:computer:telegea:memory#total"}
Number Systeminfo_MemoryAvailable "Memory available" (gSystem) {channel="systeminfo:computer:telegea:memory#available"}
Number Systeminfo_MemoryUsed "Memory used" (gSystem) {channel="systeminfo:computer:telegea:memory#used"}
Number Systeminfo_MemoryAvailablePercent "Memory available percent" (gSystem) {channel="systeminfo:computer:telegea:memory#availablePercent"}
Number Systeminfo_MemoryUsedPercent "Memory used percent" (gSystem) {channel="systeminfo:computer:telegea:memory#usedPercent"}
Number Systeminfo_StorageTotal "Storage total" (gSystem) {channel="systeminfo:computer:telegea:storage#total"}
Number Systeminfo_StorageAvailable "Storage available" (gSystem) {channel="systeminfo:computer:telegea:storage#available"}
Number Systeminfo_StorageUsed "Storage used" (gSystem) {channel="systeminfo:computer:telegea:storage#used"}
Number Systeminfo_StorageAvailablePercent "Storage available percent" (gSystem) {channel="systeminfo:computer:telegea:storage#availablePercent"}
Number Systeminfo_StorageUsedPercent "Storage used percent" (gSystem) {channel="systeminfo:computer:telegea:storage#usedPercent"}
String Systeminfo_StorageName "Storage name" (gSystem) {channel="systeminfo:computer:telegea:storage#name"}
String Systeminfo_StorageDescription "Storage description" (gSystem) {channel="systeminfo:computer:telegea:storage#description"}
String Systeminfo_StorageType "Storage type" (gSystem) {channel="systeminfo:computer:telegea:storage#type"}
Number Systeminfo_SensorsCpuTemp "Sensors cpu temp" (gSystem) {channel="systeminfo:computer:telegea:sensors#cpuTemp"}
Number Systeminfo_SensorsCpuVoltage "Sensors cpu voltage" (gSystem) {channel="systeminfo:computer:telegea:sensors#cpuVoltage"}
Number Systeminfo_SensorsFanSpeed "Sensors fan speed" (gSystem) {channel="systeminfo:computer:telegea:sensors#fanSpeed"}
String Systeminfo_CpuName "Cpu name" (gSystem) {channel="systeminfo:computer:telegea:cpu#name"}
String Systeminfo_CpuDescription "Cpu description" (gSystem) {channel="systeminfo:computer:telegea:cpu#description"}
Number Systeminfo_CpuLoad "Cpu load" (gSystem) {channel="systeminfo:computer:telegea:cpu#load"}
Number Systeminfo_CpuLoad1 "Cpu load1" (gSystem) {channel="systeminfo:computer:telegea:cpu#load1"}
Number Systeminfo_CpuLoad5 "Cpu load5" (gSystem) {channel="systeminfo:computer:telegea:cpu#load5"}
Number Systeminfo_CpuLoad15 "Cpu load15" (gSystem) {channel="systeminfo:computer:telegea:cpu#load15"}
Number Systeminfo_CpuUptime "Cpu uptime" (gSystem) {channel="systeminfo:computer:telegea:cpu#uptime"}
Number Systeminfo_CpuThreads "Cpu threads" (gSystem) {channel="systeminfo:computer:telegea:cpu#threads"}
Number Systeminfo_ProcessLoad "Process load" (gSystem) {channel="systeminfo:computer:telegea:process#load"}
Number Systeminfo_ProcessUsed "Process used" (gSystem) {channel="systeminfo:computer:telegea:process#used"}
String Systeminfo_ProcessName "Process name" (gSystem) {channel="systeminfo:computer:telegea:process#name"}
Number Systeminfo_ProcessThreads "Process threads" (gSystem) {channel="systeminfo:computer:telegea:process#threads"}
String Systeminfo_ProcessPath "Process path" (gSystem) {channel="systeminfo:computer:telegea:process#path"}
String Systeminfo_DriveName "Drive name" (gSystem) {channel="systeminfo:computer:telegea:drive#name"}
String Systeminfo_DriveModel "Drive model" (gSystem) {channel="systeminfo:computer:telegea:drive#model"}
String Systeminfo_DriveSerial "Drive serial" (gSystem) {channel="systeminfo:computer:telegea:drive#serial"}
Number Systeminfo_SwapTotal "Swap total" (gSystem) {channel="systeminfo:computer:telegea:swap#total"}
Number Systeminfo_SwapAvailable "Swap available" (gSystem) {channel="systeminfo:computer:telegea:swap#available"}
Number Systeminfo_SwapUsed "Swap used" (gSystem) {channel="systeminfo:computer:telegea:swap#used"}
Number Systeminfo_SwapAvailablePercent "Swap available percent" (gSystem) {channel="systeminfo:computer:telegea:swap#availablePercent"}
Number Systeminfo_SwapUsedPercent "Swap used percent" (gSystem) {channel="systeminfo:computer:telegea:swap#usedPercent"}
String Systeminfo_DisplayInformation "Display information" (gSystem) {channel="systeminfo:computer:telegea:display#information"}
String Systeminfo_BatteryName "Battery name" (gSystem) {channel="systeminfo:computer:telegea:battery#name"}
Number Systeminfo_BatteryRemainingCapacity "Battery remaining capacity" (gSystem) {channel="systeminfo:computer:telegea:battery#remainingCapacity"}
Number Systeminfo_BatteryRemainingTime "Battery remaining time" (gSystem) {channel="systeminfo:computer:telegea:battery#remainingTime"}
String Systeminfo_NetworkIp "Network ip" (gSystem) {channel="systeminfo:computer:telegea:network#ip"}
String Systeminfo_NetworkNetworkName "Network network name" (gSystem) {channel="systeminfo:computer:telegea:network#networkName"}
String Systeminfo_NetworkNetworkDisplayName "Network network display name" (gSystem) {channel="systeminfo:computer:telegea:network#networkDisplayName"}
Number Systeminfo_NetworkDataSent "Network data sent" (gSystem) {channel="systeminfo:computer:telegea:network#dataSent"}
Number Systeminfo_NetworkDataReceived "Network data received" (gSystem) {channel="systeminfo:computer:telegea:network#dataReceived"}
Number Systeminfo_NetworkPacketsSent "Network packets sent" (gSystem) {channel="systeminfo:computer:telegea:network#packetsSent"}
Number Systeminfo_NetworkPacketsReceived "Network packets received" (gSystem) {channel="systeminfo:computer:telegea:network#packetsReceived"}
String Systeminfo_NetworkMac "Network mac" (gSystem) {channel="systeminfo:computer:telegea:network#mac"}

system.things

1
systeminfo:computer:telegea [interval_high=3, interval_medium=60]

And added the following into the sitemap:

1
2
3
4
5
sitemap demo label="My OpenHAB on Telegea Smart Hub" {
...
Default item=gSystem
...
}

Then I started observing all the metrics that these items provided over 30 days.

  • Temperature was oscillating around 55°C - 60°C.
  • CPU Name ARMv7 Processor rev 4 (v7l)
  • CPU Load was 50.7%
  • Memory available 35.3%
  • Storage available 1271 MB

The board run stable with over 80 days of uptime straight.
It restarted only once, when I had a power outage :-)

Useful resources

I found that the software that manages the whole Telegea Smart Hub is completely open source. Well done!

Conclusion

Telegea Smart Hub is definitely a great choice for a home automation hardware.
Its essential feature is that it has a Raspberry PI inside, so there’s a huge community support around the system already.

I’d definitely buy a product like this if I designed my system around wired technologies.
Given the reliability of such, I would consider the Smart Hub as a central device of my home automation setup.


Comments: