🚀 Feature Request
Description
Please consider adding support for derived/computed deviceResources in device-modbus-go, driven by the device profile.
This would be a significant improvement for industrial automation scenarios where computed parameters are essential but not always exposed by Modbus devices.
I would like to request a new feature in device-modbus-go that allows defining derived/computed datapoints inside the device service.
Example use case: The Modbus device exposes two registers:
Register 104 → value A
Register 105 → value B
I want to define a third data point C, which is computed inside the device service (e.g., C = A + B or C = A * B), and then returned as a normal Reading in the Event.
This avoids the building a custom application service just to compute simple arithmetic values that belong at the device layer.
Describe the solution you'd like
Extend device profile schema with a new field, e.g.:
deviceResources:
- name: c
valueType: Float64
readWrite: R
derivedFrom:
- a
- b
expression: "a + b"
Where:
derivedFrom lists input resources
expression defines the formula (basic arithmetic: +, -, *, /, possibly functions)
Describe alternatives you've considered
Allow derived resources to reference operations instead of raw registers, e.g.:
attributes:
operation: "sum"
operands: ["a", "b"]
🚀 Feature Request
Description
Please consider adding support for derived/computed deviceResources in device-modbus-go, driven by the device profile.
This would be a significant improvement for industrial automation scenarios where computed parameters are essential but not always exposed by Modbus devices.
I would like to request a new feature in device-modbus-go that allows defining derived/computed datapoints inside the device service.
Example use case: The Modbus device exposes two registers:
Register 104 → value A
Register 105 → value B
I want to define a third data point C, which is computed inside the device service (e.g., C = A + B or C = A * B), and then returned as a normal Reading in the Event.
This avoids the building a custom application service just to compute simple arithmetic values that belong at the device layer.
Describe the solution you'd like
Extend device profile schema with a new field, e.g.:
deviceResources: - name: c valueType: Float64 readWrite: R derivedFrom: - a - b expression: "a + b"Where:
derivedFrom lists input resources
expression defines the formula (basic arithmetic: +, -, *, /, possibly functions)
Describe alternatives you've considered
Allow derived resources to reference operations instead of raw registers, e.g.: