924b7b5b34
Seed the repo described in pda-fieldbus ADR-0009: a sibling repo that
ships device profiles independently of the fieldbus binary.
Layout:
- profiles/schneider-iem2135.json — distilled from the inline extract
rules in examples/poll-d27-g110.yaml
- profiles/lug-heat-meter-v4.json — heat-meter profile with derived
delta_temperature
Both validate against pda-fieldbus's profile.LoadDirs.
Packaging:
- nfpm.yaml builds pda-fieldbus-profiles.deb installing profiles/ to
/usr/share/pda-fieldbus/profiles/, where the loader's DirPackaged dir
picks them up. Recommends pda-fieldbus.
- .gitea/workflows/auto-tag.yml: same conventional-commit auto-tagging
as pda-fieldbus, on tag push installs nfpm, builds .deb, uploads to
repo.pda.cz/PDAT/main using the existing PDA_REPO_TOKEN secret.
- .gitea/workflows/ci.yml: JSON syntax check + schema validation by
importing pda-fieldbus's loader and calling LoadDirs against profiles/.
62 lines
1.8 KiB
Markdown
62 lines
1.8 KiB
Markdown
# pda-fieldbus-profiles
|
|
|
|
Reusable device profiles for [pda-fieldbus](https://git.pda.cz/PDAT/pda-fieldbus).
|
|
|
|
A device profile is a JSON description of one device model: which
|
|
DIF/VIF records to read on M-Bus (or which registers on Modbus), what
|
|
units they have, how to scale them, and any derived values to compute
|
|
from them. Profiles let `pda-fieldbus poll` configurations stay short
|
|
(`profile: schneider-iem2135`) instead of repeating extract rules per
|
|
deployment.
|
|
|
|
See `pda-fieldbus` ADR-0009 and spec PDA-0010 for the full schema and
|
|
loader semantics.
|
|
|
|
## Layout
|
|
|
|
```
|
|
profiles/
|
|
schneider-iem2135.json
|
|
lug-heat-meter-v4.json
|
|
...
|
|
```
|
|
|
|
Each file is one profile. The filename stem is the profile name
|
|
referenced from a poll config (`profile: schneider-iem2135`).
|
|
|
|
## Installation
|
|
|
|
The `pda-fieldbus-profiles` `.deb` installs files to:
|
|
|
|
```
|
|
/usr/share/pda-fieldbus/profiles/
|
|
```
|
|
|
|
The `pda-fieldbus` loader scans that directory plus
|
|
`/etc/pda-fieldbus/profiles.d/` (operator overrides — wins on filename
|
|
collision). To override a packaged profile on one box, copy it to the
|
|
operator dir and edit there; the package will not overwrite it.
|
|
|
|
## Adding a profile
|
|
|
|
1. Create `profiles/<name>.json` following an existing profile.
|
|
2. Validate it loads against the current `pda-fieldbus` loader:
|
|
```
|
|
pda-fieldbus poll --config <some.yaml> --profile-dir ./profiles --dry-run
|
|
```
|
|
3. Open a PR. Use a `feat:` commit (`feat: add <vendor>-<model> profile`).
|
|
The `feat:` prefix triggers a minor version bump and a release of the
|
|
`.deb` to repo.pda.cz.
|
|
|
|
## Conventional commits
|
|
|
|
Same convention as `pda-fieldbus`:
|
|
|
|
- `feat:` — new profile (minor bump)
|
|
- `fix:` — correction to an existing profile (patch bump)
|
|
- `docs:`, `chore:`, `ci:` — no version bump
|
|
|
|
## License
|
|
|
|
MIT. See `LICENSE`.
|