Skip to content

item plugin conf: prec value is ignored from config file #8

@karel-rehor

Description

@karel-rehor

related to #6

---yaml
broker:
  host: "localhost"
  port: 1883
  auth:
    username: "fred"
    password: "changeit"
devices:
- id: "random"
  name: "accelTestDevice"
  description: "testing accelerator plugin"
  samples:
  - name: "accelTestSample"
    id: "random"
    topic: "test/accel"
    items:
    - name: "speed"
      label: "speed"
      type: "Plugin"
      pluginName: "AcceleratorPlugin"
      resultType: "Double"
      prec: 3
  interval: 500
  jitter: 100
  count: 3
ttl: 10000

run with

java -Drunner.conf=plugins/examples/accelerator/sampleRunnerConfig.yml -jar target/virtual-device-0.1-SNAPSHOT-8c36a7e.jar 

from listener

Callback on publish MqttPublish{topic=test/accel, payload=118byte, qos=AT_MOST_ONCE, retain=false}
Payload {
  "id" : "531a8eb4-6c6e-4a36-83ca-30586ba806e7-001",
  "timestamp" : 1685364020473,
  "speed" : 31.294118694885583
}
Callback on publish MqttPublish{topic=test/accel, payload=118byte, qos=AT_MOST_ONCE, retain=false}
Payload {
  "id" : "531a8eb4-6c6e-4a36-83ca-30586ba806e7-003",
  "timestamp" : 1685364020474,
  "speed" : 58.081942774582416
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions