Raspberry pie 4B builds awtrix2 server

Raspberry pie 4B builds awtrix2 server

This tutorial can be used not only on raspberry pie 4B, but also on other types of devices (such as raspberry pie 3B, X86 Linux server, etc.). Bloggers consult the data and summarize two methods of building awtrix2 server, namely direct installation and docker installation.

1, Direct installation

Installation Preparation:

  • Raspberry PI OS system has been installed in raspberry pie;

Set the time zone of raspberry pie, and modify it according to your location. The time zone set here is Shanghai, including:

sudo timedatectl set-timezone 'Asia/Shanghai'

awtrix service needs jdk to run, so install jdk first:

sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre

Download the awtrix installation script and run:

wget -N https://blueforcer.de/awtrix/awtrix.sh
sudo sh awtrix.sh

The following indicates that the installation is successful. The script will download awtrix.jar package, which may be slow:

Installation script 0.3 for AWTRIX Host
by Blueforcer

Updating...
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.62) ...
Make Dirs


Download stable

--2021-10-07 12:47:55--  https://blueforcer.de/awtrix/stable/awtrix.jar
Resolving blueforcer.de (blueforcer.de)... 213.136.87.88
Connecting to blueforcer.de (blueforcer.de)|213.136.87.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19186585 (18M) [application/java-archive]
Saving to: 'awtrix.jar'

awtrix.jar                           100%[===================================================================>]  18.30M  27.3KB/s    in 14m 36s

2021-10-07 13:02:34 (21.4 KB/s) - 'awtrix.jar' saved [19186585/19186585]

create Service

Start AWTRIX HOST
Created symlink /etc/systemd/system/multi-user.target.wants/awtrix.service → /etc/systemd/system/awtrix.service.
Checking installation...

Installation successful.

Webinterface http://[Server-IP]:7000

2, docker installation

Installation Preparation:

  • Raspberry PI OS system has been installed in raspberry pie;
  • Docker has been installed for raspberry pie. Bloggers will not introduce the installation and specific use of docker.

The blogger found the image with the largest number of downloads and supported platforms on the dockerhub, supporting x86 and arm platforms:

First, you need to pull the image:

docker pull whyet/awtrix2

Then use the following command to start the container. Similarly, set the time zone to Shanghai, and the port mapping can be modified according to your needs:

docker run --name AwTriX2 -p 7000:7000 -p 7001:7001 -p 5568:5568/udp --restart always -e TZ=Asia/Shanghai  whyet/awtrix2:latest 

Other settings can be skipped without setting:

  • If you want to use the beta version, add:
-e AWTRIX_BETA=true -e AUTOUPDATE=true
  • Cancel automatic update and add:
-e AUTOUPDATE=false 
  • To store data in a local directory (persistent storage), add:
# < PWD > is the current storage path
-v <pwd>:/data
  • Language settings

If you want AWTRIX to automatically display some apps like DayOfTheWeek in your local language/format (e.g. "Sonntag" instead of "Sunday") you can specify this with an eviroment variable.

-e JAVA_TOOL_OPTIONS="-Duser.language=de -Duser.country=DE"

Where de is your two-letter language code. (see ISO 639-2) And DE is your two-letter country code. (see ISO 3166-1 alpha-2)

  • Awtrix Premium Users

If you want to use Premium please mount the host interface address to the container with: (works only with beta Version for Stable change to host mode like below)

-v /sys/class/net/<your interface>/address:/data/hostmac

or run the container in host mode:

--network host

3, Use service

After the server configuration is completed, you need to know the ip address of raspberry pie. The awtrix connection service needs the ip address. As can be seen above, two ports are used. Port 7000 is the Web management node of the service, and port 7001 is the open connection port of the awtrix server for the connection of awtrix devices.

Of course, the premise of building an awtrix server is to have an awtrix, which can be assembled by individuals or purchased on Taobao

If awtrix has been set, you can press and hold the top three keys and power on, so that awtrix will reset.

After awtrix is started, a hotspot named Awtrix Controller will be opened to connect the hotspot. Open the browser and enter 172.217.28.1 to access the setting page. After setting the wifi information and server ip, awtrix will automatically connect to the service.

Open the browser and visit < awtrix server IP >: 7000 to enter the service management interface, where you can set awtrix parameters and install required app s.

Reference link

AWTRIX 2.0 server building and problems - bacteria's Blog

Making AWTRIX clock with raspberry pie 3B (Part 1)

How to install Java on Raspberry Pi

Raspberry pie installation jdk 8

Tags: Docker

Posted on Thu, 07 Oct 2021 03:57:44 -0400 by Ryyo