Skip to content

added support for JSON tree structures#48

Open
tweidelt wants to merge 2 commits into
tjhowse:masterfrom
tweidelt:main
Open

added support for JSON tree structures#48
tweidelt wants to merge 2 commits into
tjhowse:masterfrom
tweidelt:main

Conversation

@tweidelt
Copy link
Copy Markdown

This merge request extends modbus4mqtt to support nested JSON structures.

@tweidelt
Copy link
Copy Markdown
Author

Example configuration:

[...]
registers:
  - json_key: "grid.power"
    pub_topic: "grid/em540"
    address: 40
    scale: 0.1
    type: "int32"
  - json_key: "grid.voltage"
    pub_topic: "grid/em540"
    address: 36
    scale: 0.1
    type: "int32"
  - json_key: "grid.energy_forward"
    pub_topic: "grid/em540"
    address: 52
    scale: 0.1
    type: "int32"
  - json_key: "grid.energy_reverse"
    pub_topic: "grid/em540"
    address: 78
    scale: 0.1
    type: "int32"

  - json_key: "grid.L1.power"
    pub_topic: "grid/em540"
    address: 18
    scale: 0.1
    type: "int32"
  - json_key: "grid.L1.voltage"
    pub_topic: "grid/em540"
    address: 0
    scale: 0.1
    type: "int32"
  - json_key: "grid.L1.current"
    pub_topic: "grid/em540"
    address: 12
    scale: 0.001
    type: "int32"
  - json_key: "grid.L1.energy_forward"
    pub_topic: "grid/em540"
    address: 64
    scale: 0.1
    type: "int32"
[...]

integrate upstream changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant