IFTTT SSE needs to be sent twice before being received by Core

Hi everybody,

this is my first post here.
I have been digging in the Particle community, but I could not find anything relevant to my problem.

I have developed a firmware that keeps the Core into deep sleep most of the time.
Whenever it wakes up, it connects to the cloud (SEMI_AUTOMATIC mode), subscribes to 1 SSE channel (always the same one) and publishes an event.

I have also created an IFTTT recipe that waits for such event and sends back to my device an acknowledge event (to the SSE channel my device subscribes during setup).

I am using my browser (Chrome) to see the events published by my device and it works fine. All the publish() performed by my Core are received successfully and in within a second or two.
My problem is that sometimes I need to send the acknowledge event twice to my device via IFTTT/DoButton before my device receives just one of them.

Some other times by sending the event twice (double DoButton or IFTTTrecipe+DoButton) will make my device receive both events and with a shorter delay compared to the successful single acknowledge event case.

I have also tested my firmware bypassing IFTTT and using the app DoButton to send events to my device and it works much better. Just in very few cases I had to “push the button” twice. Usually my device receives the ack event and reacts in a couple of seconds.

When the firmware publishes the event triggering the IFTTT recipe, my browser prints an event “ifttt-trigger-event-check” about 5-10 seconds after the triggering event. It is not generated by the Core but by IFTTT, right?

In addition can anybody clarify what kind of delays should I expect when waiting for a message sent by IFTTT recipe or DoButton?

ps. My IFTTT recipe and DoButton are based just on Particle/Spark’s ingredients!

Thank you very much


i edited your post to make it more readable. It’s like a chuck of words now! So please try not to revert it :slight_smile:

Thanks!!! :smile:

As an additional test I have tried to send a sequence of events (once every 5-10 seconds) from the DoButton to my device. Sometimes they are all received within a couple of seconds one after the other, some other times instead after some delay (10-20 seconds) only a couple of the sent messages are received, after them none of the following are received any more.

Now I am using Spark CLI to see all the events sent to/from my device (“spark subscribe mine”). Spark CLI receives all the events sent (from DoButton and IFTTT reipe) to my device with a few seconds delay. But the problems is that sometimes my device do not receive them or delays too much in receiving them.

Any ideas what could the cause of this problem be?
Thank you