This is my first effort using the particle.io platform.
I have a Photon_2 taking a temperature measurement every 15 minutes and posting it on a ThingSpeak channel.
I set up the integration using the ThingSpeak template and keeping the default name for the integration as "thingspeak-data".
It worked properly and never saw any errors reported in the daily traffic report.
I did notice that not all the readings were showing up on the ThingSpeak channel.
Trying different things I decided to define a second integration but this time I named it "myInt-ThingSpeak"; set up exactly the same as "thingspeak-data".
With the "myInt-ThingSpeak" all the readings showed up properly on the ThingSpeak channel.
Would like to understand why the difference in behavior between the two integrations when the only difference is in their names.
Thank you!
There's no way to determine that from the information provided. It doesn't make sense that that would occur.
Agreed! it does not make sense.
Here is another bit that does not make sense.
I deleted the integration I created with the event named "thingspeak-data".
The Photon_2 keeps publishing to it and something keeps posting to the ThingSpeak channel.
Also, the handler defined with the subscription associated with "thingspeak-data" continues to receive *event and *data content.
I was expecting some sort of error when Photon_2 published to a deleted, non-existent integration.
Any suggestions are appreciated.
Three things to be aware of with integrations:
The integration trigger event name is a prefix, so an event publish with the name thingspeak-data
will also trigger an integration with the event name thingspeak
.
Integration event triggers are not unique, and don't consume the event. All webhooks that match are run, not just the first one.
If you have an integration in both in your sandbox level (for a claimed device) and in the product level, both can be triggered.
a note on this: a publish will send a message from the device to the cloud, and it will not fail on whether there is an integration matching it or not.
One can have zero webhooks and a publish will still work by sending data from a device to the cloud.
In fact, there could be a device in the fleet that subscribed to this publish, so that would "justify" the publish, but this is totally optional. You could publish "for your eyes only" (observing the publish on the Particle console) and that'll be ok too.
Cheers
Interesting!
Is there a way of listing the directory of existing webhooks events by name?
Get a sense of what events might be run by the integration trigger.
Never mind. I think I figured it out.
What integrations are listed depends on the path taken to list them (global or related to one device)
global:
one device:
Thank you!