I have the following situation:
[Contact Sensor: open-closed] --> [Arduino running STAnything] --> [SmartThings Device Handler] --> [SmartApp] --> [Virtual Switch]
The system is very reliable, working almost always as designed. It’s the “almost always” that is the subject of this question.
When the system does not work, the symptom is that the [Virtual Switch] is out of synch with the known state of the contact. Debugging the chain of connections shown above, I have a situation in which I see this:
Contact Sensor: Closed
Arduino : Sends message that contact is closed
ST Device Handler Events Log: Shows the contact closed
SmartApp: Did it run? Did it send a message?
Virtual Switch Events Log: Never got a message to change state.
Of course, I’ve put debug code into the SmartApp to drop a reference into the Debug.log, but it happens so infrequently, that I can never catch it live.
I can post a ton of code, but I’m not asking for code debug help (well, OK, I’ll take the help, but that’s not what I’m expecting!) What I am wondering is whether there have been reports of:
- SmartApps not running when triggered by events to which they’re subscribed?
- SmartApps not sending events through the platform?
- The platform just losing state?
I’ve been tempted to just build a SmartApp to do a routine state-of-things clean-up, perhaps every 15 minutes or something, but this seems sloppy.