my problem is, that my mqtt items are always online in paper ui. Sometimes the xiaomi/aqara items are not connected to my zigbee2mqtt bridge. If this happend, I just notice that if something does not work.
Is there any solution to check if a mqtt Sensor haven’t send a message for x secondes, so i know its offline?
The proper MQTT way to do this would be to have the device use a LWT. But in this case I don’t think that’s possible as the LWT is for the zigbee2mqtt server itself.
Next best would be to have zigbee2mqtt report on some topic where a device is online or not. Look carefully at the zigbee2mqtt docs to verify this is not happening. If it indeed in not happening, I’d open a feature request issue. That server is in the best position to know if a device is online or not.
Failing getting the online status reported at the source, the DP Vincent linked to is your best bet.
The problem with the expire binding solution is that some zigbee end nodes will only report every few hours and it could be a full day before you detect that the device is offline