A few days ago all of my smartapps started having problems reliably reacting to events from subscribed devices. It might coincide with the 27.8 firmware update (I have a hub v2) but im not sure. It looks like after calling subscribe(), the smartapp’s event handler will run fine only for the first event, after which the handler will no longer run for any subsequent events. Calling subscribe() again fixes the issue but also for only one event.
This issue is affecting all my smartapps for all event types such as contact sensor, switches, buttons etc. One of my smartapps affected is very simple and looks something like this:
For the above smartapp, pushing the button the first time will trigger the handler, but the handler will not fire again for any subsequent pushes until I “reconfigure” the app which calls the subscribe() inside updated(). I can see from the button device event log that the pushed event is being fired each time.
Is anyone else seeing similar problems? Any help would be appreciated.
I tried that, but then no event is received by the smartapp.
After some more testing, it seems like every 2 in 3 events or so are being dropped and not delivered to the smartapp. I tested this by opening and closing a door 3 times. In the sensor event list I can see the open event 3 times, but the smartapp only receives 1 out of those 3 events.
This seems to be a problem with the SmartThings platform. I don’t know if any of their staff frequents this forum so I’ll try to contact support.
I’m seeing the same exact problem with ArloPilot, which subscribes to SHM mode changes. It used to work flawlessly, but since a couple of days ago it seems that the handler is not being called consistently. I bet a recent firmware upgrade broke this.
Here’s a quick sample code that reproduces this issue:
Something has to still be wrong on the smartthings side. This has been going on for a couple days now. I’d say only 20% of events are currently being handled by my smartapps or even by smartapps integrated into smartthings such as Alexa, Ring and IFTTT. Who knows what’s happening to the rest.
For instance, I have a contact I’m using to test. When I open the contact, smartthings immediately detects it. I see the events in the logs through the IDE. I then have a smartapp that subscribes to this contact for open/close and opens a url. I’m logging all events that are detected by this smartapp. At this point, this should all be occurring in the smartthings cloud, yet I’m lucky to receive 1 in 5 events.