Asset Parameter
Asset Parameter Messages
Kelvin SmartApps™ can publish an Asset Parameter Message in order to (asynchronously) update a given Asset Parameter for a given Asset.
The Asset Parameter update will persist as soon as this message is synced with the Kelvin Cloud.
The AssetParameter Object supports the following attributes:
| Attribute | Required | Description |
|---|---|---|
resource |
required | The KRNAssetParameter that this update is meant for. |
value |
required | Asset Parameter value (Boolean, Integer, Float or String). |
comment |
optional | Detailed description of the Asset Parameter update. |
Examples
Basic Usage
This is how they can be created and published:
from datetime import timedelta, datetime
from kelvin.application import KelvinApp
from kelvin.message import AssetParameter
from kelvin.krn import KRNAssetParameter
(...)
# Create and Publish AssetParameter
await app.publish(
AssetParameter(
resource=KRNAssetParameter("my_asset", "my_parameter"),
value=100,
comment="reason why the parameter was updated"
)
)