|
|
пре 5 дана | |
|---|---|---|
| .. | ||
| fonts | пре 5 дана | |
| models | пре 5 дана | |
| qml | пре 5 дана | |
| scripts | пре 9 месеци | |
| .env.example | пре 1 недеља | |
| .gitattributes | пре 9 месеци | |
| .gitignore | пре 1 недеља | |
| FIRMWARE_MIGRATION.md | пре 1 недеља | |
| RASPBERRY_PI_SETUP.md | пре 9 месеци | |
| README.md | пре 5 дана | |
| backend.py | пре 5 дана | |
| configure-boot.sh | пре 9 месеци | |
| discovery.py | пре 1 недеља | |
| dune-weaver-touch.desktop | пре 9 месеци | |
| dune-weaver-touch.service | пре 4 месеци | |
| firmware_client.py | пре 5 дана | |
| install-service.sh | пре 9 месеци | |
| install.sh | пре 6 месеци | |
| main.py | пре 5 дана | |
| png_cache_manager.py | пре 5 месеци | |
| requirements.txt | пре 1 недеља | |
| run.sh | пре 1 недеља | |
| setup-autologin.sh | пре 9 месеци | |
| setup-autostart.sh | пре 9 месеци | |
| setup_kiosk.sh | пре 9 месеци | |
| thr_preview.py | пре 5 дана | |
A PySide6/QML touch interface for the Dune Weaver sand table. It talks directly to the table's FluidNC firmware over its stateless HTTP/JSON API — there is no separate host (Raspberry Pi FastAPI) service in between.
The firmware is headless and advertises itself over mDNS. On launch the app:
_http._tcp advertisements with model=dune-weaver).
If exactly one is found it connects automatically; otherwise pick one from the Control
page's table list (tap Refresh to re-scan).DUNE_WEAVER_URL in .env (e.g. DUNE_WEAVER_URL=dunetable.local
or an IP). This skips discovery.The chosen table is remembered in touch_settings.json.
GET /sand_status (~1 Hz) instead of a WebSocket.$... commands via /command and the /sand_* routes
(run/stop/pause/resume/home/goto/feed/LED).GET /sand_patterns; previews are rendered locally and cached
under preview_cache/. The .thr source is read from the co-located backend catalog
(../patterns/, matched by path suffix / unique basename) when available — fetching
from the board's SD (/sd/patterns/...) is the slow fallback for board-only patterns.$Sand/Password key is stored
(base64) in touch_settings.json and sent as X-Sand-Key on every request; set it
under Control → Table Connection. 503 busy: low memory responses are retried with
backoff, and the clock sync pushes epoch + POSIX timezone (quiet-hours/autostart
schedules run on board-local time)..txt files on the SD card — listed via GET /sand_playlists,
read from /sd/playlists/..., and created/edited by uploading/deleting files.$LED/* / /sand_led).See the firmware's API.md for the full contract.
qml/components/ThemeManager.qml; bundled Outfit + Material Icons Round
fonts in fonts/ (registered in main.py, no system fonts needed)GET /sand_patterns on the table; .thr previews rendered locally$... commands via /command + /sand_* routesGET /sand_status (~1 Hz)firmware_client.py — shared async HTTP client + LED/clear-mode maps (singleton)discovery.py — mDNS table discovery (zeroconf; degrades gracefully if absent)thr_preview.py — renders .thr → cached PNG previewsbackend.py — QML-facing controller (status poll, actions, LEDs, playlists, local screen)models/ — PatternModel / PlaylistModel, both firmware-backedOne command to set up everything for kiosk/production use:
sudo ./install.sh
This will:
venv/)/usr/local/bin/screen-on, screen-off, touch-monitor)# Control the service
sudo systemctl start dune-weaver-touch # Start now
sudo systemctl stop dune-weaver-touch # Stop service
sudo systemctl status dune-weaver-touch # Check status
sudo journalctl -u dune-weaver-touch -f # View logs
# Disable auto-start
sudo systemctl disable dune-weaver-touch
Create virtual environment and install dependencies:
python3 -m venv venv
source venv/bin/activate # or: . venv/bin/activate
pip install -r requirements.txt
Power on the sand table and make sure it's on the same network (or set
DUNE_WEAVER_URL in .env to pin its address).
Run the touch interface:
./run.sh # Uses virtual environment automatically
# OR manually:
./venv/bin/python main.py
For custom installations:
sudo ./setup-autostart.sh
Choose from multiple setup options including systemd service, desktop autostart, or kiosk optimizations.
dune-weaver-touch/
├── main.py # Application entry point (fonts, QML engine)
├── backend.py # Backend controller (status poll, actions, LEDs)
├── fonts/ # Bundled Outfit + Material Icons Round fonts
├── models/
│ ├── pattern_model.py # Pattern list model (firmware-backed)
│ └── playlist_model.py # Playlist model (firmware-backed)
├── qml/
│ ├── main.qml # Main window, tab navigation, error dialog
│ ├── pages/
│ │ ├── ModernPatternListPage.qml # Browse: grid + search
│ │ ├── PatternDetailPage.qml # Pattern detail: clear mode + play
│ │ ├── ModernPlaylistPage.qml # Playlists: list, detail, settings
│ │ ├── PatternSelectorPage.qml # Add-to-playlist pattern picker
│ │ ├── TableControlPage.qml # Connection, movement, system settings
│ │ ├── LedControlPage.qml # Light: power, effects, ball tracker
│ │ └── ExecutionPage.qml # Now Playing: progress ring + transport
│ └── components/
│ ├── ThemeManager.qml # Design tokens (palettes, type, spacing)
│ ├── Icon.qml # Material icon glyph by name
│ ├── ModernControlButton.qml # Pill button (filled / outlined)
│ ├── ChoiceChip.qml # Selectable option chip
│ ├── DwSlider.qml / DwSwitch.qml / SectionLabel.qml / SettingsCard.qml
│ ├── ModernPatternCard.qml # Pattern card with circular preview
│ └── BottomNavigation.qml / BottomNavTab.qml / ConnectionStatus.qml
├── requirements.txt
└── README.md
DUNE_WEAVER_URL)