tjhowse / modbus4mqtt

Modbus TCP <-> MQTT glue. YAML configuration. Robust.
Other
75 stars 34 forks source link

Add json_key field to YAML configuration #9

Closed tjhowse closed 3 years ago

tjhowse commented 3 years ago

If a register has a json_key field then its key and value should be published to its pub_topic MQTT topic as JSON rather than the raw value. Multiple registers can share the same pub_topic, and this topic will be published at most once per scan populated with all relevant key/value pairs for those registers.

It is not allowed for more than one register to share a pub_topic unless they all have a json_key field and that value is not duplicated amongst registers that share a pub_topic.

tjhowse commented 3 years ago

Added in v0.4.0