From 2eda97537b63d68b2e9ba06500e3fb491894d10c Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Sat, 7 Feb 2026 17:29:48 +0100 Subject: feat: camper van energy monitoring widget for Plasma 6 Pure QML KPackage widget with Rust background service for real-time Victron energy system monitoring via MQTT and D-Bus. Co-Authored-By: Claude Opus 4.6 --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..1e73e60 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# Camper Widget + +A Plasma 6 applet that displays real-time information about your camper van's energy system. It consists of a pure QML widget and a Rust background service that reads Victron MQTT data and publishes it over D-Bus. + +## Features + +- **Battery monitoring**: State of charge, power draw, charge/discharge/idle state +- **Solar tracking**: Solar panel power generation +- **AC monitoring**: AC input and AC load power +- **Compact view**: Direction icon, battery icon, battery percentage, and system power +- **Full view**: Detailed breakdown of all energy subsystems +- **Real-time updates**: D-Bus property signals push changes to the widget instantly +- **Rust backend**: Async service with tokio, zbus 5, and rumqttc + +## Requirements + +- Plasma 6.3+ (for `org.kde.plasma.workspace.dbus` QML module) +- Rust toolchain +- [just](https://just.systems/man/en/introduction.html) command runner +- D-Bus session bus +- Victron energy system accessible via MQTT + +## Installation + +### Build from source + +1. Clone the repository: + + ```bash + git clone https://codeberg.org/knightdave/camper-widget.git + cd camper-widget + ``` + +2. Build the service: + + ```bash + just build + ``` + +3. Install the widget and service: + + ```bash + just install + ``` + +4. Restart Plasma or log out and back in + +### Configuration + +Configure the MQTT connection (hosts, credentials, refresh interval) through the widget's settings page in Plasma. The service reads this configuration from the Plasma applet INI file and automatically picks up changes when you save. + +## Development + +Run `just` to see all available commands. + +```bash +just check # Format check + clippy + cargo check +just test # Run Rust tests +just verify # check + build +just ci # Full CI pipeline (check + test) +just ci-quick # Quick check (no build/test) +just run # Run widget in plasmoidviewer +just run-service # Run service locally +``` + +## Contributing + +Contributions are welcome! Please feel free to submit issues and pull requests. + +## Credits + +This project was initially inspired by [bcdt-rust_plasmoid_example](https://codeberg.org/black-cat-engineering/bcdt-rust_plasmoid_example) -- cgit v1.2.3