I have a hardware issue which I am working to resolve, but it has exposed a potential ‘bug’ in the handling of events by SharpTools.
What happens is my hardware fires off false open/close events at random intervals. These come milliseconds apart. I suspect that these events may be arriving at the SharpTools platform out of order (they are IP packets after all) and if the open arrives after the close my state is now out of sync with reality.
Would it possible to add some logic to detect this by looking for out of order events? Maybe by checking the timestamp and ignoring packets older than the most recent packet received.
I realize that having to keep track of this per ‘thing’ adds complexity.
The issue is that SmartThings events drop the millisecond precision and get truncated to seconds precision, so multiple events within the same second look the same. I’ve brought it up with the SmartThings team before, but never got traction on it.
What kind of hardware is it? It seems like fixing the underlying issue would be the right place to focus. I’m open to a Feature Requests to kick off a device-sync without reauthorizing, but it seems like a better fix would be with the device issue itself.