Hey Folks
I’m working on the IFTTT, and my spark core publishes different values from the sensors. I’d like to know how can I insert more than a one value in the (Event Contents) field? Suppose that I have my sensor’s data looks like this (SA1E,SA2E,…, SAFE), now how can I insert some of these values in the (Event Contents) field so I can send an email notification includes these values and discard the other values which are not included in the (Event Contents) field?
I tried those seperators (. , : ; |), but they didn’t work.
I don’t think it works like that. The values you enter in that field must match the contents of your event exactly, in order for it to be detected. Parsing the contents of not available as far as I’m aware. Perhaps @dave could shed some more light on the possibilities.
What exactly are you trying to achieve, there might be (better) alternatives available?
Thanks @Moors7
I’m trying to detect the data that is not a zero. I mean my sensor’s data as I mentioned is (SA0E,SA1E,SA2E,. . . , SAFE), and I’d like to see all of these data at the cloud and setup the IFTTT to send me an email when I receive some of the values that is not a zero(SA0E). So, I need to insert multiple values with a separators in the (Event Contents) field, or I should create a notification for each individual value.
Particle side, could you combine the values into a single variable of data type String?
SA1E=65;SA2E=47;SA3E=0;…SAFE
Thanks @BulldogLowell
Actually on the Particle side, my data is defined like this:
char Data [64]= { ‘\0’ };
Do you mean that I need to convert this to a variable that has a String type?
Also I don’t know what do you mean by this line:
SA0E=65;SA1E=47;…) ?
Assuming you are looking for a single message with all the data, well yes.
using your C string example…
build your C string with sprintf()
Particle.variable("myData", String(Data), STRING);
that will get you all of your data in a single String you can expose to IFTTT.
Indeed the data that I’m receiving contains one of these values (SA0E, SA1E,…) depending on the sensor’s location in each time. So, I’m not receiving all of the values in each message.
So just build a String with the variables you wish to push.
Do you mean I can make a comparison between my message (char Data) and the variable and see whenever these two values became equal, then I can push the value to the IFTTT? Am I correct or there is a misunderstanding?
Yup, but it would be much easier to help if you explained what you are trying to accomplish., in practical terms.
As I mentioned the data that I’m receiving is related with the sensor’s location. For example when sensor 1 is active the data is SA1E, and when all of the sensors are active, the data is SAFE. So, I need to check when I got some of these data, I’ll send an email notification through the IFTTT channel. Therefore, I need to insert more than one option in the Event Contents.
well, IFTTT isn’t really extensible to give you options like IFTOTOTTT (If This Or This Or This Then That)
So you may need to break up that to several recipes, perhaps.
I still don’t know what you are trying to do… for example:
I have three door sensors on a single photon that when any of their statuses change, I would like to receive an email notification through IFTTT.
Yes, my data is similar to your example, but I’d like to see all of the sensors data publish on the cloud and receive an email notification from IFTTT for two of these three door sensors. I think it is easier to do it individually for each value in the IFTTT.
Any suggestion please @Dave
Hi @Ahmedsa1983,
Hmm, what about doing the sensor logic in the firmware, and just publishing the notification event from your firmware to IFTTT? That way you have total control from firmware and you can do all the comparisons necessary?
Thanks,
David
Thanks @Dave for your suggestion. Actually, I need all the data to be published on the cloud since it is the sensor’s data, but I do need to send some notifications to my email when specific sensors become active. I thought there is a way to do that because the IFTTT website has this feature for the email receiver field. Therefore, if there is no way to insert more than one value in the Event Contents field, I’ll make a single notification for each sensor’s value that I’d like to monitor.
Thanks in advance.
This is kind of related to the topic of this question so I leave a link to IFTTT reddit question that I posted.
What I’m trying to achieve is to send a one long JSON string in one event, and to get on the other end a google sheets row with different columns.
I’ve been converting number values to a string, publishing to the console, then IFTTT sends that number string to google sheets. I left the “is (Event Contents)” blank.