a-bali/janitor

When configuring topic with single level wildcard "+", timeout does not work

pdalak opened this issue · 1 comments

Hello, fist thanks for a great tool!

Issue is, when i have signle level wildcard "+" like this in my config:

monitor:
  mqtt:
    server: 192.168.x.x.
    port: 1883
    user: "username"
    password: "pass"
    targets:
    - topic: "zigbee2mqtt/sensor_out/#"
      timeout: 2000
    - topic: "other_gateway/+/1/#"
      timeout: 1200
    - topic: "other_gateway/+/2/#"
      timeout: 1200

then I can see topics like "other_gateway/15/1/2", "other_gateway/17/1/1" ... etc are monitored, but timeout 1200 does not apply for them. Instead, only standardtimeout is applied.

I need this filter because othergateway use this topic structure:
other_gateway/SENSOR_ID/CHILD_ID/MESSAGE_ID/

And I need to monitor all sensors, but just specific child_ids.

As a workaround I can specify all topics separately, but there are quite a lot of them, and each time new sensor is added, I need to modify this config.

Thank You.
pd.

Thank You. It works now.