feat: simple sensor panels with file-based data source (#7)

* add simulation mode for easier development

* improved sensor file watcher, poc cpu & mem usage

Trigger file read by rename event

* feat: system information sensor tool

Gather various sensor values with the sysinfo crate:
https://github.com/GuillaumeGomez/sysinfo
Values can be written to a sensor source file with the `--out` cmd line
option for the `asterctl` tool.

* ci: build sysinfo tool and include in build artifact

* feat: support integerDigits, decimalDigits sensor value format options

* docs: update documentation

Closes #6
This commit is contained in:
Markus Zehnder
2025-08-22 13:41:31 +02:00
committed by GitHub
parent 3f174251d6
commit e85d616da7
32 changed files with 3803 additions and 3933 deletions
+8 -3
View File
@@ -25,7 +25,7 @@ permissions:
jobs:
lint:
name: Clippy & Rustfmt
name: Clippy, Rustfmt, Tests
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
@@ -54,9 +54,13 @@ jobs:
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Unit tests
run: cargo test
build:
name: Linux-x64 build
needs: lint
# using an older Ubuntu release on purpose to link against an older libc version for greater compatibility
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
@@ -93,7 +97,7 @@ jobs:
- name: Release build
shell: bash
run: cargo build --release
run: cargo build --release --bins --all-features
# Archive is required to preserve file permissions and re-used for release uploads
- name: Create upload artifact
@@ -102,8 +106,9 @@ jobs:
ls -la target/release
mkdir -p ${GITHUB_WORKSPACE}/${{env.BIN_OUTPUT_PATH }}
cp target/release/${{ env.APP_NAME }} ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}
cp target/release/sysinfo ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}
cp linux/*.service ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}
cp Monitor3.json ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}
cp -r cfg ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}
echo "VERSION=${{ env.APP_VERSION }}" > ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}/version.txt
echo "TIMESTAMP=$(date +"%Y%m%d_%H%M%S")" >> ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }}/version.txt
tar czvf ${{ env.ARTIFACT_NAME }}.tar.gz -C ${GITHUB_WORKSPACE}/${{ env.BIN_OUTPUT_PATH }} .