Enabling rule chain alarms with MQTT doesn't work in thingsboard

608 views Asked by At

When I am sending telemetry to devices in thingsboard using MQTT the alarms I have set up (using this guide https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/create-inactivity-alarm/) doesn't work. It does work to begin with when using POST requests, but it stops working as soon as I use MQTT for a device. The device seems to always be active as indicated by the server attribute "active".

The setup

  • send inactivity to alarm trigger (rule chain)
  • send activity to alarm clear (rule chain)
  • save server attributes (rule chain)
  • set inactivityTimeout server attribute to a value (60000ms in my case) for a device

enter image description here

enter image description here

Anyone have an idea of what I am doing wrong?

Other sources I have checked:

Same problem, but he fixed it by changing the DEFAULT_STATE_CHECK_INTERVAL in the configuration yml file. My file seems to have reasonable values for this - https://github.com/thingsboard/thingsboard/issues/1334 [![enter image description here][3]][3]
1

There are 1 answers

1
DSE dashboard On

Maybe mqtt is keeping the heartbeat alive and keeping the device always active.