Write a device profile
A profile is a YAML file that describes one device model. It supports Modbus TCP, Modbus RTU and HTTP with JSON.
Copy a built-in profile that uses the same transport.
Change the blocks and channels. Refer to the profile schema.
Examine the file:
bashpvmon profile validate ./profiles/my-meter.yamlSet the path of the file in the device:
yamldevices: meter: { address: "tcp://10.0.0.50:502", unit: 2, profile: ./profiles/my-meter.yaml }Compare the values on the page Devices with the display of the device.
Make sure that the signs agree with the site model.
The path must end in .yaml or .yml. In config.yaml, a relative path starts at the directory of that file. In the web interface, it starts at the data directory.
Record the values of a device
Stop pvmon.
Record the values:
bashpvmon dump --device meter --count 10 -o meter.fixture.json
The file contains only the values that the profile reads.
Send a profile to the project
Open a pull request with these items:
- the profile
- a recorded file (fixture)
- the expected values
Set verified: false until a recorded file from a real device agrees with the profile.