Skip to content

[inputs.modbus] Handle coils and discrete_inputs as booleans #9284

@mirkocomparetti-synesis

Description

Feature Request

Proposal:

Coils and Discrete_Inputs in modbus are boolean values by definition of the standard. It can be useful to store them in the DB as boolean values then, instead of integers, to replicate the meaning that those values have in the standard.

Current behavior:

Right now the values read from coils and discrete_inputs are exported in line protocol as integers, and if you want to save them as booleans, you need to convert them with a dedicated processor.

Desired behavior:

Maybe, for backward compatibility, this can be added as a configuration option, more or less like

coils = [
    { name = "...", measurement="...", data_type="BOOL/INT", address = [...]},
]

Metadata

Metadata

Assignees

Labels

area/modbusfeature requestRequests for new plugin and for new features to existing plugins

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions