feat: use mdBook for documentation (#10)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
book
|
||||
+35
-20
@@ -1,37 +1,52 @@
|
||||
# AOOSTAR WTR MAX Screen Control
|
||||
# Introduction
|
||||
|
||||
- [asterctl usage](asterctl.md)
|
||||
- [Linux shell control commands](shell_commands.md) without using asterctl
|
||||
|
||||
## Sensor Panels
|
||||
## Motivation
|
||||
|
||||
- [Sensor panels](sensor_panels.md)
|
||||
- [Custom sensor panels](sensor_custom_panel.md)
|
||||
Developing open client software to use the embedded second screen on various Linux distributions.
|
||||
It *might* also work on Windows, but I neither have that OS, nor plan to install it.
|
||||
|
||||
### Sensor Modes
|
||||
The official proprietary AOOSTAR-X display software is not suitable for NAS and security-minded users:
|
||||
|
||||
Different sensor modes are supported:
|
||||
- All-in-one solution that attempts to do everything, from sensor reading to running a web server for control and configuration (*exposed on all interfaces!*).
|
||||
I prefer using existing monitoring tools and combining them to my liking.
|
||||
- Resource hungry, written in Python. Archive of v1.3.4 is 178 MB.
|
||||
- Closed source, requires root access, distributed over filesharing sites, some without HTTPS.
|
||||
- Built-in expiration date. One must regularly update the software without being able to verify the source.
|
||||
- Many untranslated messages in Chinese and missing instructions for included features.
|
||||
|
||||
- [Sensor mode 1: Text](sensor_mode1_text.md)
|
||||
- [Sensor mode 2: Circular Progress](sensor_mode2_fan.md)
|
||||
- [Sensor mode 3: Progress](sensor_mode3_progress.md)
|
||||
- [Sensor mode 4: Pointer](sensor_mode4_pointer.md)
|
||||
The display remains on continuously (24×7) if the official software is not running.
|
||||
|
||||
### Sensor Data Sources
|
||||
## Goals
|
||||
|
||||
The sensor value reading is separated from the `asterctl` tool.
|
||||
- [x] Reverse engineer the LCD serial protocol to provide open screen software.
|
||||
- Utilize the official AOOSTAR-X display software by sniffing USB communication, using `strace`, and decompiling the Python app.
|
||||
- [x] Document known commands so clients in other programming languages can be written.
|
||||
- [ ] Eventually, publish a Rust crate for easy integration into other Rust applications.
|
||||
|
||||
Sensor values are provided in separate text files and are automatically read when the file changes.
|
||||
Only the file data source is supported at the moment, other sources like pipes, sockets etc. might be supported later.
|
||||
**Out of scope:**
|
||||
|
||||
- [Text file data source](sensor_data_txt_file.md)
|
||||
- Reverse engineering the microcontroller firmware on the display board.
|
||||
That would be an interesting task — potentially uncovering additional display commands — but is outside the project's current scope.
|
||||
- Reimplementing the full AOOSTAR-X display software, which is overly complex for most use cases.
|
||||
|
||||
### Sensor Data Providers
|
||||
|
||||
- Proof of concept [Linux shell scripts](sensor_data_shell.md)
|
||||
- [sysinfo tool](sensor_data_sysinfo.md)
|
||||
|
||||
## Development
|
||||
|
||||
- [LCD Protocol](lcd_protocol.md)
|
||||
- [Reverse engineered LCD protocol](lcd_protocol.md)
|
||||
- [GitHub project](https://github.com/zehnm/aoostar-rs)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
- [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
- [MIT License](http://opensource.org/licenses/MIT)
|
||||
|
||||
at your option.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](README.md)
|
||||
|
||||
# User guide
|
||||
|
||||
- [Installation](installation.md)
|
||||
- [Linux systemd Service](linux/README.md)
|
||||
- [asterctl Tool](asterctl.md)
|
||||
- [Shell Commands](shell_commands.md)
|
||||
|
||||
# Reference guide
|
||||
|
||||
- [Sensor Panels](sensor/panel.md)
|
||||
- [Custom Panel](sensor/custom_panel.md)
|
||||
- [Configuration](sensor/cfg/README.md)
|
||||
- [Text Sensor](sensor/cfg/mode1_text.md)
|
||||
- [Circular Sensor](sensor/cfg/mode2_circular.md)
|
||||
- [Progress Sensor](sensor/cfg/mode3_progress.md)
|
||||
- [Pointer Sensor](sensor/cfg/mode4_pointer.md)
|
||||
- [Sensor Value Provider](sensor/provider/README.md)
|
||||
- [Text File Data Source](sensor/provider/text_file.md)
|
||||
- [Shell Scripts](sensor/provider/shell_scripts.md)
|
||||
- [Sysinfo Tool](sensor/provider/sysinfo.md)
|
||||
<!--
|
||||
- [For developers](for_developers/panel.md)
|
||||
-->
|
||||
|
||||
# Development
|
||||
|
||||
- [LCD Protocol](lcd_protocol.md)
|
||||
+12
-6
@@ -15,7 +15,8 @@ Usage: asterctl [OPTIONS]
|
||||
|
||||
Options:
|
||||
-d, --device <DEVICE>
|
||||
Serial device, for example "/dev/cu.usbserial-AB0KOHLS". Takes priority over --usb option
|
||||
Serial device, for example "/dev/cu.usbserial-AB0KOHLS".
|
||||
Takes priority over --usb option
|
||||
|
||||
-u, --usb <USB>
|
||||
USB serial UART "vid:pid" in hex notation (lsusb output). Default: 416:90A1
|
||||
@@ -32,21 +33,25 @@ Options:
|
||||
-c, --config <CONFIG>
|
||||
AOOSTAR-X json configuration file to parse.
|
||||
|
||||
The configuration file will be loaded from the `config_dir` directory if no full path is specified.
|
||||
The configuration file will be loaded from the `config_dir` directory
|
||||
if no full path is specified.
|
||||
|
||||
-p, --panels <PANELS>
|
||||
Include one or more additional custom panels into the base configuration.
|
||||
|
||||
Specify the path to the panel directory containing panel.json and fonts / img subdirectories.
|
||||
Specify the path to the panel directory containing panel.json and fonts /
|
||||
img subdirectories.
|
||||
|
||||
--config-dir <CONFIG_DIR>
|
||||
Configuration directory containing configuration files and background images specified in the `config` file. Default: `./cfg`
|
||||
Configuration directory containing configuration files and background
|
||||
images specified in the `config` file. Default: `./cfg`
|
||||
|
||||
--font-dir <FONT_DIR>
|
||||
Font directory for fonts specified in the `config` file. Default: `./fonts`
|
||||
|
||||
--sensor-path <SENSOR_PATH>
|
||||
Single sensor value input file or directory for multiple sensor input files. Default: `./cfg/sensors`
|
||||
Single sensor value input file or directory for multiple sensor input files.
|
||||
Default: `./cfg/sensors`
|
||||
|
||||
-o, --off-after <OFF_AFTER>
|
||||
Switch off display n seconds after loading image or running demo
|
||||
@@ -58,7 +63,8 @@ Options:
|
||||
Test mode: save changed images in ./out folder
|
||||
|
||||
--simulate
|
||||
Simulate serial port for testing and development, `--device` and `--usb` options are ignored
|
||||
Simulate serial port for testing and development,
|
||||
`--device` and `--usb` options are ignored
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# Installation
|
||||
|
||||
There are multiple ways to install the `asterctl` CLI tool. Choose any one of the methods below that best suit your needs.
|
||||
|
||||
Please note that only Linux has been tested so far.
|
||||
|
||||
## Pre-compiled binaries
|
||||
|
||||
Executable binaries are available for download on the [GitHub Releases page](https://github.com/zehnm/aoostar-rs/releases).
|
||||
Download the binary for your platform (only Linux available at the moment) and extract the archive.
|
||||
The archive contains the `asterctl` and `sysinfo` executables which you can run.
|
||||
|
||||
## Build from source using Rust
|
||||
|
||||
To build the `asterctl` and `sysinfo` executables from source, you will first need to install Rust and Cargo.
|
||||
Follow the instructions on the [Rust installation page](https://www.rust-lang.org/tools/install).
|
||||
At least Rust version 1.88 is required.
|
||||
|
||||
The project contains IDE settings for [RustRover](https://www.jetbrains.com/rust/) (or other JetBrain IDEs with the Rust
|
||||
plugin) to get you up and running in no time. This is not a requirement, everything can be easily built on the command line.
|
||||
|
||||
Once you have installed Rust, the following commands can be used to build `asterclt` and all other binaries:
|
||||
|
||||
1. On Linux, install required build dependencies (shown for Ubuntu 25.04):
|
||||
|
||||
```shell
|
||||
sudo apt install build-essential git pkg-config libudev-dev
|
||||
```
|
||||
|
||||
2. Checkout project:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/zehnm/aoostar-rs.git
|
||||
cd aoostar-rs
|
||||
```
|
||||
|
||||
3. Build
|
||||
|
||||
A release build is highly recommended, as it significantly improves graphic rendering performance:
|
||||
|
||||
```shell
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The binaries will be located in the `./target/release` folder.
|
||||
|
||||
> A Debian package for easy installation is planned for the future!
|
||||
|
||||
See [Linux systemd Service](linux/) on how to automatically switch off the LCD at boot up.
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||
@@ -0,0 +1,122 @@
|
||||
# Linux systemd Service
|
||||
|
||||
The systemd unit [lcd-off.service](https://github.com/zehnm/aoostar-rs/blob/main/linux/lcd-off.service)
|
||||
can be installed to automatically switch off the embedded LCD on boot.
|
||||
|
||||
The unit file has been tailored to Debian based Linux distros and has been tested on Proxmox 8.4 and Ubuntu 25.04.
|
||||
|
||||
Requirements:
|
||||
- `/dev/ttyACM0`: `dialout` group with rw permissions.
|
||||
- To run as root: remove `DynamicUser` and `Group` settings.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
As root user, otherwise `sudo` is required:
|
||||
```shell
|
||||
cp asterctl /usr/bin/
|
||||
cp lcd-off.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl enable lcd-off
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
The systemd unit file uses strong security settings to only allow operations required for `asterctl`:
|
||||
|
||||
```shell
|
||||
systemd-analyze security lcd-off.service
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
```
|
||||
NAME DESCRIPTION EXPOSURE
|
||||
✓ SystemCallFilter=~@swap System call allow list defined for service, and @swap is not included
|
||||
✓ SystemCallFilter=~@resources System call allow list defined for service, and @resources is not included
|
||||
✓ SystemCallFilter=~@reboot System call allow list defined for service, and @reboot is not included
|
||||
✓ SystemCallFilter=~@raw-io System call allow list defined for service, and @raw-io is not included
|
||||
✓ SystemCallFilter=~@privileged System call allow list defined for service, and @privileged is not included
|
||||
✓ SystemCallFilter=~@obsolete System call allow list defined for service, and @obsolete is not included
|
||||
✓ SystemCallFilter=~@mount System call allow list defined for service, and @mount is not included
|
||||
✓ SystemCallFilter=~@module System call allow list defined for service, and @module is not included
|
||||
✓ SystemCallFilter=~@debug System call allow list defined for service, and @debug is not included
|
||||
✓ SystemCallFilter=~@cpu-emulation System call allow list defined for service, and @cpu-emulation is not included
|
||||
✓ SystemCallFilter=~@clock System call allow list defined for service, and @clock is not included
|
||||
✓ RemoveIPC= Service user cannot leave SysV IPC objects around
|
||||
✗ RootDirectory=/RootImage= Service runs within the host's root directory 0.1
|
||||
✓ User=/DynamicUser= Service runs under a transient non-root user identity
|
||||
✓ RestrictRealtime= Service realtime scheduling access is restricted
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_TIME Service processes cannot change the system clock
|
||||
✓ NoNewPrivileges= Service processes cannot acquire new privileges
|
||||
✓ AmbientCapabilities= Service process does not receive ambient capabilities
|
||||
✗ PrivateDevices= Service potentially has access to hardware devices 0.2
|
||||
✓ CapabilityBoundingSet=~CAP_BPF Service may not load BPF programs
|
||||
✗ SystemCallArchitectures= Service may execute system calls with all ABIs 0.2
|
||||
✓ ProtectSystem= Service has strict read-only access to the OS file hierarchy
|
||||
✓ ProtectProc= Service has restricted access to process tree (/proc hidepid=)
|
||||
✓ SupplementaryGroups= Service has no supplementary groups
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_RAWIO Service has no raw I/O access
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_PTRACE Service has no ptrace() debugging abilities
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_(NICE|RESOURCE) Service has no privileges to change resource use parameters
|
||||
✓ CapabilityBoundingSet=~CAP_NET_ADMIN Service has no network configuration privileges
|
||||
✓ CapabilityBoundingSet=~CAP_NET_(BIND_SERVICE|BROADCAST|RAW) Service has no elevated networking privileges
|
||||
✗ DeviceAllow= Service has no device ACL 0.2
|
||||
✓ CapabilityBoundingSet=~CAP_AUDIT_* Service has no audit subsystem access
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_ADMIN Service has no administrator privileges
|
||||
✓ PrivateNetwork= Service has no access to the host's network
|
||||
✓ PrivateTmp= Service has no access to other software's temporary files
|
||||
✓ ProcSubset= Service has no access to non-process /proc files (/proc subset=)
|
||||
✓ CapabilityBoundingSet=~CAP_SYSLOG Service has no access to kernel logging
|
||||
✓ ProtectHome= Service has no access to home directories
|
||||
✓ KeyringMode= Service doesn't share key material with other services
|
||||
✓ Delegate= Service does not maintain its own delegated control group subtree
|
||||
✓ PrivateUsers= Service does not have access to other users
|
||||
✗ IPAddressDeny= Service does not define an IP address allow list 0.2
|
||||
✓ NotifyAccess= Service child processes cannot alter service state
|
||||
✓ ProtectClock= Service cannot write to the hardware clock or system clock
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_PACCT Service cannot use acct()
|
||||
✓ CapabilityBoundingSet=~CAP_KILL Service cannot send UNIX signals to arbitrary processes
|
||||
✓ ProtectKernelLogs= Service cannot read from or write to the kernel log ring buffer
|
||||
✓ CapabilityBoundingSet=~CAP_WAKE_ALARM Service cannot program timers that wake up the system
|
||||
✓ CapabilityBoundingSet=~CAP_(DAC_*|FOWNER|IPC_OWNER) Service cannot override UNIX file/IPC permission checks
|
||||
✓ ProtectControlGroups= Service cannot modify the control group file system
|
||||
✓ CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE Service cannot mark files immutable
|
||||
✓ CapabilityBoundingSet=~CAP_IPC_LOCK Service cannot lock memory into RAM
|
||||
✓ ProtectKernelModules= Service cannot load or read kernel modules
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_MODULE Service cannot load kernel modules
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG Service cannot issue vhangup()
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_BOOT Service cannot issue reboot()
|
||||
✓ CapabilityBoundingSet=~CAP_SYS_CHROOT Service cannot issue chroot()
|
||||
✓ PrivateMounts= Service cannot install system mounts
|
||||
✓ CapabilityBoundingSet=~CAP_BLOCK_SUSPEND Service cannot establish wake locks
|
||||
✓ MemoryDenyWriteExecute= Service cannot create writable executable memory mappings
|
||||
✓ RestrictNamespaces=~user Service cannot create user namespaces
|
||||
✓ RestrictNamespaces=~pid Service cannot create process namespaces
|
||||
✓ RestrictNamespaces=~net Service cannot create network namespaces
|
||||
✓ RestrictNamespaces=~uts Service cannot create hostname namespaces
|
||||
✓ RestrictNamespaces=~mnt Service cannot create file system namespaces
|
||||
✓ CapabilityBoundingSet=~CAP_LEASE Service cannot create file leases
|
||||
✓ CapabilityBoundingSet=~CAP_MKNOD Service cannot create device nodes
|
||||
✓ RestrictNamespaces=~cgroup Service cannot create cgroup namespaces
|
||||
✓ RestrictNamespaces=~ipc Service cannot create IPC namespaces
|
||||
✓ ProtectHostname= Service cannot change system host/domainname
|
||||
✓ CapabilityBoundingSet=~CAP_(CHOWN|FSETID|SETFCAP) Service cannot change file ownership/access mode/capabilities
|
||||
✓ CapabilityBoundingSet=~CAP_SET(UID|GID|PCAP) Service cannot change UID/GID identities/capabilities
|
||||
✓ LockPersonality= Service cannot change ABI personality
|
||||
✓ ProtectKernelTunables= Service cannot alter kernel tunables (/proc/sys, …)
|
||||
✓ RestrictAddressFamilies=~AF_PACKET Service cannot allocate packet sockets
|
||||
✓ RestrictAddressFamilies=~AF_NETLINK Service cannot allocate netlink sockets
|
||||
✓ RestrictAddressFamilies=~AF_UNIX Service cannot allocate local sockets
|
||||
✓ RestrictAddressFamilies=~… Service cannot allocate exotic sockets
|
||||
✓ RestrictAddressFamilies=~AF_(INET|INET6) Service cannot allocate Internet sockets
|
||||
✓ CapabilityBoundingSet=~CAP_MAC_* Service cannot adjust SMACK MAC
|
||||
✓ RestrictSUIDSGID= SUID/SGID file creation by service is restricted
|
||||
✓ UMask= Files created by service are accessible only by service's own user by default
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
```
|
||||
→ Overall exposure level for lcd-off.service: 0.8 SAFE 😀
|
||||
```
|
||||
@@ -0,0 +1,28 @@
|
||||
# Sensor Panels
|
||||
|
||||
- [Sensor panels](panel.md)
|
||||
- [Custom sensor panels](custom_panel.md)
|
||||
- [Configuration](cfg/)
|
||||
|
||||
## Sensor Modes
|
||||
|
||||
Different sensor modes are supported:
|
||||
|
||||
- [Sensor mode 1: Text](cfg/mode1_text.md)
|
||||
- [Sensor mode 2: Circular Progress](cfg/mode2_circular.md)
|
||||
- [Sensor mode 3: Progress](cfg/mode3_progress.md)
|
||||
- [Sensor mode 4: Pointer](cfg/mode4_pointer.md)
|
||||
|
||||
## Sensor Data Sources
|
||||
|
||||
The sensor value reading is separated from the `asterctl` tool.
|
||||
|
||||
Sensor values are provided in separate text files and are automatically read when the file changes.
|
||||
Only the file data source is supported at the moment, other sources like pipes, sockets etc. might be supported later.
|
||||
|
||||
- [Text file data source](provider/text_file.md)
|
||||
|
||||
### Sensor Data Providers
|
||||
|
||||
- Proof of concept [Linux shell scripts](provider/shell_scripts.md)
|
||||
- [sysinfo tool](provider/sysinfo.md)
|
||||
@@ -0,0 +1,43 @@
|
||||
# Sensor Configuration
|
||||
|
||||
Specify configuration file to use:
|
||||
```shell
|
||||
asterctl --config monitor.json
|
||||
```
|
||||
|
||||
- The configuration file is loaded from the configuration directory if not an absolute path is specified.
|
||||
- The default configuration directory is `./cfg` and can be changed with the `--config-dir` command line option.
|
||||
|
||||
The original AOOSTAR-X json configuration file format is used, but only a subset of the configuration is supported:
|
||||
|
||||
- Setup object fields:
|
||||
- `switchTime`: Optional switch time between panels in seconds, string value interpreted as float and converted to milliseconds. Default: 5
|
||||
- `refresh`: Panel redraw interval in seconds specified as a float number. Default: 1
|
||||
- Panel object fields in `diy[]`:
|
||||
- `img`: Background image filename. Loaded from the specified configuration directory if not an absolute path is specified.
|
||||
- `sensor`: Array of sensor objects.
|
||||
- Sensor object fields:
|
||||
- `label`: label identifier, also used as sensor value data source identifier
|
||||
- `integerDigits`: sensor value format option: number of integer places. Value is 0-prefixed to number of places and set to `99` if overflown.
|
||||
- `decimalDigits`: sensor value format option: number of decimal places.
|
||||
- `unit`: optional unit label, appended after the sensor value
|
||||
- `x`: x-position
|
||||
- `y`: y-position
|
||||
- `fontFamily`: Font name matching font filename without file extension. Fonts are loaded from the configured font directory.
|
||||
- `fontSize`: Font size
|
||||
- `fontColor`: Font color in `#RRGGBB` notation, or `-1` if not set. Examples: `#ffffff` = white, `#ff0000` = red. Default: `#ffffff`
|
||||
- `textAlign`: Text alignment: `left`, `right`, `center`
|
||||
- Fields used for the fan (2), progress (3) and pointer (4) sensor modes:
|
||||
- `min_value` and `max_value`
|
||||
- `width` and `height`
|
||||
- `direction`
|
||||
- `pic`: progress image, loaded from the specified configuration directory if not an absolute path is specified.
|
||||
- `min_angle` and `max_angle`
|
||||
- `xz_x` and `xz_y`
|
||||
|
||||
Example configuration file: [cfg/monitor.json](https://github.com/zehnm/aoostar-rs/blob/main/cfg/monitor.json).
|
||||
|
||||
Sensor values are not read from the configuration file (the `sensor.value` field is ignored).
|
||||
See [Sensor Value Provider](../provider).
|
||||
|
||||
More options might be supported later.
|
||||
@@ -42,7 +42,7 @@ The sensor value can be formatted with the `unit` and `integerDigits` & `decimal
|
||||
|
||||
Example `panel.json` with two "text" indicator sensors and the following (partial) background image in `img`:
|
||||
|
||||
<img src="img/sensor_mode1_background.png" alt="sensor mode 1 background image example">
|
||||
<img src="../../img/sensor_mode1_background.png" alt="sensor mode 1 background image example">
|
||||
|
||||
The background image and sensor definitions are taken from the default system panel configuration in the AOOSTAR-X app.
|
||||
|
||||
@@ -84,7 +84,7 @@ The background image and sensor definitions are taken from the default system pa
|
||||
|
||||
The following graphic is rendered for the two text fields defined above:
|
||||
|
||||
<img src="img/sensor_mode1.png" alt="sensor mode 1 example">
|
||||
<img src="../../img/sensor_mode1.png" alt="sensor mode 1 example">
|
||||
|
||||
## Known Issues
|
||||
|
||||
@@ -20,7 +20,7 @@ The following configuration and graphics are taken from the `仪表盘_windows`
|
||||
|
||||
Example `panel.json` with a single "fan" indicator sensor and the following (partial) background image in `img`:
|
||||
|
||||
<img src="img/sensor_mode2_background.jpg" alt="sensor mode 2 background image example">
|
||||
<img src="../../img/sensor_mode2_background.jpg" alt="sensor mode 2 background image example">
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -52,11 +52,11 @@ Example `panel.json` with a single "fan" indicator sensor and the following (par
|
||||
|
||||
Progress image `"pic": "progress_circle.png"`:
|
||||
|
||||

|
||||

|
||||
|
||||
The following graphic is rendered for progress example above:
|
||||
|
||||
<img src="img/sensor_mode2.jpg" alt="sensor mode 2 example">
|
||||
<img src="../../img/sensor_mode2.jpg" alt="sensor mode 2 example">
|
||||
|
||||
|
||||
## Known Issues
|
||||
@@ -14,7 +14,7 @@ Sensor configuration fields:
|
||||
|
||||
Example `panel.json` with two "progress" indicator sensor and the following (partial) background image in `img`:
|
||||
|
||||
<img src="img/sensor_mode3_background.png" alt="sensor mode 3 background image example">
|
||||
<img src="../../img/sensor_mode3_background.png" alt="sensor mode 3 background image example">
|
||||
|
||||
The background image and sensor definitions are taken from the default system panel configuration in the AOOSTAR-X app.
|
||||
|
||||
@@ -83,11 +83,11 @@ The background image and sensor definitions are taken from the default system pa
|
||||
|
||||
Progress image `"pic": "progress.png"`:
|
||||
|
||||

|
||||

|
||||
|
||||
The following graphic is rendered for progress example above:
|
||||
|
||||
<img src="img/sensor_mode3.png" alt="sensor mode 3 example">
|
||||
<img src="../../img/sensor_mode3.png" alt="sensor mode 3 example">
|
||||
|
||||
|
||||
## Known Issues
|
||||
@@ -20,7 +20,7 @@ The following configuration and graphics are taken from the `三环_windows` pan
|
||||
|
||||
Example `panel.json` with a single "pointer" indicator sensor and the following (partial) background image in `img`:
|
||||
|
||||
<img src="img/sensor_mode4_background.png" alt="sensor mode 4 background image example">
|
||||
<img src="../../img/sensor_mode4_background.png" alt="sensor mode 4 background image example">
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -52,11 +52,11 @@ Example `panel.json` with a single "pointer" indicator sensor and the following
|
||||
|
||||
Pointer image `"pic": "pointer.png"`:
|
||||
|
||||

|
||||

|
||||
|
||||
The following graphic is rendered for a sensor value of `47.7`:
|
||||
|
||||
<img src="img/sensor_mode4.png" alt="sensor mode 4 example">
|
||||
<img src="../../img/sensor_mode4.png" alt="sensor mode 4 example">
|
||||
|
||||
## Known Issues
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Sensor Panels
|
||||
|
||||
The `asterctl` tool is started in sensor panel mode if the `--config` command line option is specified.
|
||||
|
||||
Sensor panels are dynamic screens showing various sensor values. Multiple rotating panels are supported.
|
||||
The sensor values must be provided in simple key-value text files from external scripts or tools. The `asterctl` tool
|
||||
is only responsible for rendering the panels on the embedded screen.
|
||||
|
||||
Example panels from the AOOSTAR-X software, rendered with `asterctl` using dummy sensor values:
|
||||
|
||||
<img src="../img/sensor_panel-01.png" alt="Sensor panel 1">
|
||||
|
||||
<img src="../img/sensor_panel-02.png" alt="Sensor panel 1">
|
||||
|
||||
See [custom sensor panels](custom_panel.md) for including custom panels.
|
||||
|
||||
## Supported Features
|
||||
|
||||
- One or multiple panels rotating in configurable interval (configuration value `setup.switchTime`).
|
||||
- Each panel can be configured with multiple sensor fields.
|
||||
- Text sensor value fields are supported (`sensor.mode: 1`), but there are still some text size and positioning issues.
|
||||
- Fan (2), progress (3) and pointer (4) sensor modes are being worked on and not all configuration options are working yet.
|
||||
- Each sensor field can be customized with an individual font, size, color and text alignment.
|
||||
- Panels are redrawn at a configurable interval (configuration value `setup.refresh`).
|
||||
- Only the updated areas of the image are sent to the display for faster updates.
|
||||
|
||||
See [Sensor Configuration](cfg/) for more information.
|
||||
@@ -0,0 +1 @@
|
||||
# Sensor Value Provider
|
||||
@@ -1,6 +1,6 @@
|
||||
# Sensor Data Provider Shell Scripts
|
||||
|
||||
The [/linux/scripts](../linux/scripts) directory contains some proof-of-concept Linux shell scripts.
|
||||
The [/linux/scripts](../../../linux/scripts) directory contains some proof-of-concept Linux shell scripts.
|
||||
|
||||
CPU and memory usage are written into a sensor data source text file that can be used by `asterctl`.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# sysinfo Tool
|
||||
|
||||
The Rust based [sysinfo](../crates/sysinfo/src/main.rs) tool gathers many more system sensor values with the help of
|
||||
The Rust based [sysinfo](https://github.com/zehnm/aoostar-rs/blob/main/crates/sysinfo) tool gathers many more system sensor values with the help of
|
||||
the [sysinfo](https://github.com/GuillaumeGomez/sysinfo) crate.
|
||||
|
||||
It supports FreeBSD, Linux, macOS, Windows and other OSes, but it has only been tested on Linux so far.
|
||||
@@ -18,7 +18,8 @@ Options:
|
||||
Temporary directory for preparing the output sensor file.
|
||||
|
||||
The system temp directory is used if not specified.
|
||||
The temp directory must be on the same file system for atomic rename operation!
|
||||
The temp directory must be on the same file system for atomic rename
|
||||
operation!
|
||||
|
||||
--console
|
||||
Print values in console
|
||||
@@ -27,7 +28,8 @@ Options:
|
||||
System sensor refresh interval in seconds
|
||||
|
||||
--disk-refresh <DISK_REFRESH>
|
||||
Enable individual disk refresh logic as used in AOOSTAR-X. Refresh interval in seconds
|
||||
Enable individual disk refresh logic as used in AOOSTAR-X.
|
||||
Refresh interval in seconds
|
||||
|
||||
--smartctl
|
||||
Retrieve drive temperature if `disk-update` option is enabled.
|
||||
@@ -17,7 +17,7 @@
|
||||
- If a directory is specified, all children matching the sensor file naming pattern will be read and monitored.
|
||||
- Any subdirectories are ignored (no recursive support).
|
||||
|
||||
Example text file for the [cfg/monitor.json](../cfg/monitor.json) panel configuration:
|
||||
Example text file for the [cfg/monitor.json](https://github.com/zehnm/aoostar-rs/blob/main/cfg/monitor.json) panel configuration:
|
||||
|
||||
```
|
||||
cpu_temperature: 65
|
||||
@@ -1,68 +0,0 @@
|
||||
# Sensor Panels
|
||||
|
||||
The `asterctl` tool is started in sensor panel mode if the `--config` command line option is specified.
|
||||
|
||||
Sensor panels are dynamic screens showing various sensor values. Multiple rotating panels are supported.
|
||||
The sensor values must be provided in simple key-value text files from external scripts or tools. The `asterctl` tool
|
||||
is only responsible for rendering the panels on the embedded screen.
|
||||
|
||||
Example panels from the AOOSTAR-X software, rendered with `asterctl` using dummy sensor values:
|
||||
|
||||
<img src="img/sensor_panel-01.png" alt="Sensor panel 1">
|
||||
|
||||
<img src="img/sensor_panel-02.png" alt="Sensor panel 1">
|
||||
|
||||
## Supported Features
|
||||
|
||||
- One or multiple panels rotating in configurable interval (configuration value `setup.switchTime`).
|
||||
- Each panel can be configured with multiple sensor fields.
|
||||
- Text sensor value fields are supported (`sensor.mode: 1`), but there are still some text size and positioning issues.
|
||||
- Fan (2), progress (3) and pointer (4) sensor modes are being worked on and not all configuration options are working yet.
|
||||
- Each sensor field can be customized with an individual font, size, color and text alignment.
|
||||
- Panels are redrawn at a configurable interval (configuration value `setup.refresh`).
|
||||
- Only the updated areas of the image are sent to the display for faster updates.
|
||||
|
||||
## Panel Configuration File
|
||||
|
||||
Specify configuration file to use:
|
||||
```shell
|
||||
asterctl --config monitor.json
|
||||
```
|
||||
|
||||
- The configuration file is loaded from the configuration directory if not an absolute path is specified.
|
||||
- The default configuration directory is `./cfg` and can be changed with the `--config-dir` command line option.
|
||||
|
||||
The original AOOSTAR-X json configuration file format is used, but only a subset of the configuration is supported:
|
||||
|
||||
- Setup object fields:
|
||||
- `switchTime`: Optional switch time between panels in seconds, string value interpreted as float and converted to milliseconds. Default: 5
|
||||
- `refresh`: Panel redraw interval in seconds specified as a float number. Default: 1
|
||||
- Panel object fields in `diy[]`:
|
||||
- `img`: Background image filename. Loaded from the specified configuration directory if not an absolute path is specified.
|
||||
- `sensor`: Array of sensor objects.
|
||||
- Sensor object fields:
|
||||
- `label`: label identifier, also used as sensor value data source identifier
|
||||
- `integerDigits`: sensor value format option: number of integer places. Value is 0-prefixed to number of places and set to `99` if overflown.
|
||||
- `decimalDigits`: sensor value format option: number of decimal places.
|
||||
- `unit`: optional unit label, appended after the sensor value
|
||||
- `x`: x-position
|
||||
- `y`: y-position
|
||||
- `fontFamily`: Font name matching font filename without file extension. Fonts are loaded from the configured font directory.
|
||||
- `fontSize`: Font size
|
||||
- `fontColor`: Font color in `#RRGGBB` notation, or `-1` if not set. Examples: `#ffffff` = white, `#ff0000` = red. Default: `#ffffff`
|
||||
- `textAlign`: Text alignment: `left`, `right`, `center`
|
||||
- Fields used for the fan (2), progress (3) and pointer (4) sensor modes:
|
||||
- `min_value` and `max_value`
|
||||
- `width` and `height`
|
||||
- `direction`
|
||||
- `pic`: progress image, loaded from the specified configuration directory if not an absolute path is specified.
|
||||
- `min_angle` and `max_angle`
|
||||
- `xz_x` and `xz_y`
|
||||
|
||||
Example configuration file: [cfg/monitor.json](../cfg/monitor.json).
|
||||
|
||||
Sensor values are not read from the configuration file (the `sensor.value` field is ignored). See data sources below.
|
||||
|
||||
More options might be supported later.
|
||||
|
||||
See [custom sensor panels](sensor_custom_panel.md) for including custom panels.
|
||||
Reference in New Issue
Block a user