BlackZork / mqmgateway

MQTT gateway for modbus networks
GNU Affero General Public License v3.0
44 stars 20 forks source link

named map should allow to use converters that handles multiple registers as input #49

Closed BlackZork closed 5 months ago

BlackZork commented 5 months ago

This should be possible to define as mqtt topic:

  objects:
    - topic: test_state
      state:
        - name: sensor1
          register: tcptest.1.2
          register_type: input
          count: 2
          converter: std.int32()
        - name: sensor2
          register: tcptest.1.3
          register_type: input
          converter: std.divide(10,2)

output: { "sensor1": "<converted int32">, "sensor2": "divided val" }

Currently it works for divide but for int32 throw conf exception "count is disallowed".

BlackZork commented 5 months ago

Fixed in 4a0873fb9