Home Dashboard on the Seeed Studio reTerminal

A flexible Raspberry Pi based monitoring/dashboard system

For years, I have been using various self-hosted services on my home network. Most of these services are small programs/tools that run on cheap single-board computers like a Raspberry Pi. Examples are e.g.:

  • a fine dust sensor based on an ESP8266 (see)
  • an ADS-B receiver that provides flight data to ADS-B-Exchange
  • a Pi that monitors my Internet using Prometeus and Grafana (source)
  • a Grafana dashboard for my Synology NAS (Dashboard source)
  • many other things (Roon endpoints, humidity sensors, etc.)

Recently, Youtubes algorithm flushed an interesting video into my timeline: Grafana Weather Dashboard on the reTerminal by Seeed Studio. Up until now I have never heard about the company Seeed. But their products look awesome - especially the reTerminal.

Essentially the reTerminal is a compact device powered by Raspberry Pi 4 that comes with an integrated 5" display that is also touch sensitive. It comes with a set of programmable buttons and some IO options. It costs 199 USD.

The reTerminal

The reTerminal is a quite heavy (much heavier than I expected) device that comes fully assembled. It has a certain industrial charm and feels like a solid embedded device. Compared to typical cases you can buy for any kind of Pi, this piece of hardware feels much more valuable.

What I like most is the rich options of I/O interfaces. The reTerminal has:

  • five buttons (four in the bottom right corner and one at the top)
  • 4 status LEDs
  • USB-C port (sadly only for power and for flashing the OS)
  • 2 USB ports (only USB-2.0)
  • a micro HDMI port for external displays
  • Ethernet jack (1G)
  • 40 pin GPIO header
  • PCIE Gen 2 interface (up to 5gbit/s)

With such a range of interface options, the device is actually too good to be just a display. So I will certainly tackle more projects with the device when time allows.

What I built

As mentioned earlier, I have quite a few services that display their stats as dashboards on individual pages. So it made sense that I would display some of these dashboards on the reTerminal. Since I wanted to display at least three different dashboards from different domains, I also directly had a suitable use-case for the physical hardware buttons of the device.

This is what I came up with:

example picture 1 example picture 2

The implementation is essentially based on Chromium, which runs in kiosk mode. Each page is loaded as a single tab after booting and is updated regularly. Grafana is especially suitable for such a project, as the dashboard updates itself without the need for a manual reload of the entire page.

I wanted to be as flexible as possible in the configuration of the pages. Therefore, I decided to assign a function only to the green button (green circle, right most button). Clicking on the button then switches between the tabs (effectively pressing CTRL + TAB).

This allows me to switch between tabs in one direction only. However, I am completely free in the order and can display many pages in different order. I could have also mapped the three buttons F1, F2 and F3 to specific tabs, if I wanted to.

How I built it

The following is a general guide to displaying any content on the reTerminal.I will explain how I configured my device to run Chromium in Kiosk mode and use the button to switch tabs.

Installing the OS

The reTerminal comes with Raspbian pre-installed. According to the official documentation, you should be able to flash any general purpose OS. In my experience, this did not work very well. I had trouble to install both Raspberry Pi OS and Ubuntu. I followed the instructions step by step, but did not manage to get the display or hardware buttons to work. Most of the time, the terminal did not even boot. After some digging on Google, I found out that I was not alone. Many users report of issues with various flavors of Ubuntu and Raspbian. Thus, you can save a lot of time by directly using one of Seeeds provided images. These work out of the box and do not cause any problems. Or you just use the pre-installed Raspbian OS.

Tipp: If you are using Raspbian OS, I recommend you to connect a Ethernet cable into the device. You can then log into the reTerminal using SSH. The default credentials are pi:raspberry.

Install required drivers

The reTerminal comes with the necessary drivers pre-installed out-of-the-box, so you don’t need to install any additional drivers. However, if you flash the OS by yourself, you need to install the necessary drivers separately. Otherwise, the LCD, sensors, I/O and buttons won’t work. Luckily, this is relatively straight forward:

git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays
sudo ./scripts/reTerminal.sh
sudo reboot

After rebooting you should be able to use the buttons (which are mapped to A,S,D,F by default) and the LCD.

Prepare the Chromium

We are going to use Chromium to display arbitrary websites in Kiosk-mode. There is a lot of information out there on how to set this up. So you should be able to resolve any issues by simply googling your problems.

We are going to install Chromium and unclutter. The latter is used to hide your mouse-pointer:

sudo apt install -y chromium-browser unclutter

We now open the autostart file to tell it that we want to open Chromium and, if desired, a browser window without a “mouse pointer”. For this to work, we open the following configuration file:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

and add the following lines:

# hide the mouse pointer
@unclutter

# Disbale the screen saver
@xset s off
@xset -dpms
@xset s noblank

# start Chromium in Kiosk mode
@chromium-browser --incognito --kiosk URL_1 URL_2 URL_3

You may replace URL_1 URL_2 URL_3 with any number of urls that you want to display on your device. Personally, I am currently displaying four dashboards.

Reboot your device, and you should see Chromium launched in full screen.

Cycle through tabs using the hardware buttons

There are 4 user programmable buttons at the front of the reTerminal. These buttons are configured as a s d f from left to right by default.

A useful tool for testing key codes is evtest. It is not part of the default distribution of Raspbian and needs to be installed manually. Thankfully, it is as easy as running sudo apt install evtest

Then run evtest and you should see something like this:

pi@raspberrypi:~ $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	seeed-tp
/dev/input/event1:	gpio_keys
/dev/input/event2:	vc4
/dev/input/event3:	ST LIS3LV02DL Accelerometer
/dev/input/event4:	vc4
Select the device event number [0-4]:

Select the number that corresponds to the device gpio_keys (1 int the sample output above).

I assigned the right most button the key code 0xAA by adding the following line to the end of /boot/config.txt:

dtoverlay=reTerminal,key3=0xaa

You can cycle through tabs in Chromium using CTRL + TAB. Xbindkeys is a very versatile program that lets you remap keys very easily. It uses a config file to change key bindings into certain commands. In this case I mapped 0xAA to CTRL + TAB.

Install xbindkeys and xautomation:

sudo apt install xbindkeys xautomation

Create a default configuration for xbindkeys:

xbindkeys --defaults > /home/pi/.xbindkeysrc

In order to find the name of the key run:

xbindkeys --key

and press the button. The output will look like this:

"(NoCommand"
  m:0x0 + c:178

which tells us that pressing the right green buttons is bind to m:0x0 + c:178. So let’s bind this key to the desired key combination:

cd ~
nano .xbindkeysrc  

and append the following:

"xte 'keydown Control_L' 'key Tab' 'keyup Control_L'"
  m:0x0 + c:178 + release

You might have some trouble getting the keys to work properly. If you are connecting to your reTerminal trough SSH, you can set DISPLAY env var to use xbindkeys on the integrated 5" display:

export DISPLAY=:0

Because I am only going to use the integrated display, I even added this variable to my /etc/environment.

After rebooting, everything should be set.

Resources: