usr/sbin/omv-pwmfanis the Python 3 daemon that reads/etc/openmediavault/pwmfan.jsonand drives sysfs PWM.usr/share/openmediavault/contains plugin integration assets:confdb/config DB create/delete hooks.datamodels/config + RPC schemas.engined/backend module and RPC implementation.workbench/UI routes, navigation, and components (services.pwmfan.*).
lib/systemd/system/openmediavault-pwmfan.servicedefines the systemd unit.debian/holds Debian packaging metadata for the.deb._omv-core/and_omv-developer/are upstream/dev environment artifacts; edit only when working on those toolchains.
dpkg-buildpackage -b -us -ucbuilds the Debian package (requires Debian packaging toolchain).debuild -bis an alternative build entrypoint for the same package.sudo systemctl restart openmediavault-pwmfanreloads the daemon after installing a package.sudo /usr/sbin/omv-pwmfanruns the daemon manually for a smoke test (requires PWM-capable hardware).
- Python: 4-space indentation, PEP 8 style, keep functions small and focused.
- YAML/UI definitions: 2-space indentation; keep
config,request, andfieldsblocks ordered. - Naming follows OMV plugin conventions:
pwmfanfor modules/paths andservices.pwmfan.*for workbench assets.
- No automated test suite is present. Validate on target hardware:
- Update
/etc/openmediavault/pwmfan.json, restart the service, and verify fan speed changes. - Check
systemctl status openmediavault-pwmfanfor failures.
- Update
- Git history is minimal (e.g., “Initial ...”), so no formal convention is established. Use short, imperative subject lines.
- PRs should include a clear description, testing notes (hardware + command output), and screenshots if UI YAML changes.
- For packaging changes, update
debian/changelogwith a version and summary.
- The daemon writes to
/sys/class/pwmand reads SMART data; run with appropriate privileges. - Avoid hardcoding device paths in code; prefer defaults in JSON config and datamodels.