We’ve received a number of similar requests for calculating whether a device is “connected” by some factor other than whether it’s currently connected to our MQTT broker, so we’re brainstorming on how to allow users to mark devices as connected – and more importantly, when to flip them back to a “disconnected” state.
In your case, you’re using a webhook to report state. I would assume that if a device reports state through this method, you’d like it to automatically be marked as “connected” even though a continuous connection to is it not open. Would you expect that the device flipped back to disconnected if it did not receive another state report within a certain timeframe? And what if state was reported on the device through some other means besides the webhook?