IFTTT Maker
Moderators: grovkillen, Stuntteam, TD-er
IFTTT Maker
I have seen a few requests for the option to send push notifications directly from ESPEasy.
The best way to do this is to use an external utility like MQTTWarn running on the same machine as your MQTT broker - but then you need to have MQTT running. If you don’t want to use MQTT then it is quite possible for ESPEasy modules to send push notifications directly using the popular package IFTTT (IF This Then That) – my plugin IFTTTMaker does just that.
It is a very simple plugin which sends a trigger to IFTTT when sensor readings exceed specified limits.
If you want to give it a try, download the plugin 'IFTTT Maker' from the ESPEasyPlayground.
https://github.com/ESP8266nu/ESPEasyPluginPlayground
You will need to download two files - _P209IFTTTMaker.ino and Extra_Utilities.ino. Make sure you take the latest version of Extra_Utilities.ino as I have added a couple of functions recently. Copy those two files to your project folder and recompile/upload.
The configuration screen for IFTTTMaker looks like this:
You will need to provide your IFTTT Key and the IFTTT Event name as the two main parameters. The IFTTT Key is a unique string which identifies you to IFTTT and the Event Name is the name of the trigger which you will send to IFTTT.
‘IFTTTMaker’ can monitor up to 4 sensor values – the example shown above only monitors two. The standard parameter Delay specifies how often the values are checked.
The first field is the name of the sensor value in the form [%tskname%#%valname%]. The second and third parameters are the lower and upper limits and the last is the hysteresis. Thus, in the case of the examples above, a single trigger event called “ESP01” will be sent to IFTTT when [DHT22#Temperature] goes above 25 degrees. Once the trigger has been sent, so long as the temperature remains above 23 (Upper Limit – Hysteresis) no further triggers will be sent. If the temperature drops below 23 and then again rises above 25 then another trigger will be sent.
The IFTTT interface allows three data values to be sent to IFTTT along with the trigger. I have specified these as:
Value1 - the Identifier such as [DHT22#Temperature]
Value2 - the current value of the temperature
Value3 - a concatenation of the Lower and Upper Limits in the form [LL/UL].
Before using this plugin, you must log onto your IFTTT account and make a ‘recipe’ to tell IFTTT what you would like it to do when it receives your trigger. As an example, I have made a ‘recipe’ where IFTTT sends a PushBullet note to my phone – here is what the ‘recipe looks like:
Now, whenever my temperature goes above 25 degrees, I receive a PushBullet note like this:
You can configure IFTTT to do a huge range of different things when it receives your trigger – but please heed the warning below.
Security Warning. I originally tried to make this plugin use the WiFiClientSecure library so that communication with IFTTT was secure using HTTPS. Unfortunately I did not succeed. The WiFiClientSecure library is just too big and although it works in a simple test sketch, it crashes when built into a larger framework like ESPEASY. I was therefore forced to use the simple WiFiClient library and communicate with IFTTT using HTTP on port 80 - I am slightly surprised that IFTTT accept this sort of traffic but for now they do.
This means that your IFTTT Key is wide open to anybody who wants to snoop into your network traffic. This may not be an issue if all you do with IFTTT is send PushBullet notes to yourself - but if you use it to control your domestic heating or cook your dinner then you might get some unpleasant surprises! Take care.
If you find a way to get WiFiClientSecure to run in ESPEASY then I would like to hear about it!
Please let me know how you get on with this plugin.
N
The best way to do this is to use an external utility like MQTTWarn running on the same machine as your MQTT broker - but then you need to have MQTT running. If you don’t want to use MQTT then it is quite possible for ESPEasy modules to send push notifications directly using the popular package IFTTT (IF This Then That) – my plugin IFTTTMaker does just that.
It is a very simple plugin which sends a trigger to IFTTT when sensor readings exceed specified limits.
If you want to give it a try, download the plugin 'IFTTT Maker' from the ESPEasyPlayground.
https://github.com/ESP8266nu/ESPEasyPluginPlayground
You will need to download two files - _P209IFTTTMaker.ino and Extra_Utilities.ino. Make sure you take the latest version of Extra_Utilities.ino as I have added a couple of functions recently. Copy those two files to your project folder and recompile/upload.
The configuration screen for IFTTTMaker looks like this:
You will need to provide your IFTTT Key and the IFTTT Event name as the two main parameters. The IFTTT Key is a unique string which identifies you to IFTTT and the Event Name is the name of the trigger which you will send to IFTTT.
‘IFTTTMaker’ can monitor up to 4 sensor values – the example shown above only monitors two. The standard parameter Delay specifies how often the values are checked.
The first field is the name of the sensor value in the form [%tskname%#%valname%]. The second and third parameters are the lower and upper limits and the last is the hysteresis. Thus, in the case of the examples above, a single trigger event called “ESP01” will be sent to IFTTT when [DHT22#Temperature] goes above 25 degrees. Once the trigger has been sent, so long as the temperature remains above 23 (Upper Limit – Hysteresis) no further triggers will be sent. If the temperature drops below 23 and then again rises above 25 then another trigger will be sent.
The IFTTT interface allows three data values to be sent to IFTTT along with the trigger. I have specified these as:
Value1 - the Identifier such as [DHT22#Temperature]
Value2 - the current value of the temperature
Value3 - a concatenation of the Lower and Upper Limits in the form [LL/UL].
Before using this plugin, you must log onto your IFTTT account and make a ‘recipe’ to tell IFTTT what you would like it to do when it receives your trigger. As an example, I have made a ‘recipe’ where IFTTT sends a PushBullet note to my phone – here is what the ‘recipe looks like:
Now, whenever my temperature goes above 25 degrees, I receive a PushBullet note like this:
You can configure IFTTT to do a huge range of different things when it receives your trigger – but please heed the warning below.
Security Warning. I originally tried to make this plugin use the WiFiClientSecure library so that communication with IFTTT was secure using HTTPS. Unfortunately I did not succeed. The WiFiClientSecure library is just too big and although it works in a simple test sketch, it crashes when built into a larger framework like ESPEASY. I was therefore forced to use the simple WiFiClient library and communicate with IFTTT using HTTP on port 80 - I am slightly surprised that IFTTT accept this sort of traffic but for now they do.
This means that your IFTTT Key is wide open to anybody who wants to snoop into your network traffic. This may not be an issue if all you do with IFTTT is send PushBullet notes to yourself - but if you use it to control your domestic heating or cook your dinner then you might get some unpleasant surprises! Take care.
If you find a way to get WiFiClientSecure to run in ESPEASY then I would like to hear about it!
Please let me know how you get on with this plugin.
N
Re: IFTTT Maker
how to get device identifier for device doorbell ?
Re: IFTTT Maker
I suppose the value of [doorbell#switch] changes from 1 to 0 when the doorbell button is pressed?
If that is the case then you could set the lower limit to 0.5 and the upper limit to 1.5 with a hysteresis of 0.2.
This would send a trigger event called 'button' to IFTTT.com each time your doorbell button is pressed.
You must log onto your IFTTT account and make up a 'recipe' to tell IFTTT what you would like it to do when it receives that trigger event.
N
If that is the case then you could set the lower limit to 0.5 and the upper limit to 1.5 with a hysteresis of 0.2.
This would send a trigger event called 'button' to IFTTT.com each time your doorbell button is pressed.
You must log onto your IFTTT account and make up a 'recipe' to tell IFTTT what you would like it to do when it receives that trigger event.
N
Re: IFTTT Maker
works perfectly with my sonoff switch and my pir motion sensor
Re: IFTTT Maker
i am unable to make it work with this esp device controlling my door lock , doorbell and reed sensor
Re: IFTTT Maker
You are only checking the value every 30 seconds - it's quite possible that you are simply missing the event.
N
N
Re: IFTTT Maker
yesterday i did a lot of testing with your plugin with a variety of esp8266 modules and found that the modules become quite unresponsive after i compile the image using IFTTT plugin. The ping times which are normally in single digits increase to 300-400. After i removed the plugin and recompiled the image the modules became normal and the ping times returned to single digits.
Re: IFTTT Maker
That's strange. I have tried the same ping checks here and see no difference whether IFTTT Maker is included or not.
IFTTT Maker is a very simple plugin and I can't see any reason why it should overload your esp - unless perhaps you are using a very short Delay?
N
IFTTT Maker is a very simple plugin and I can't see any reason why it should overload your esp - unless perhaps you are using a very short Delay?
N
Re: IFTTT Maker
yesterday what i first marked was my sonoff switches were behaving erratically. when i use to switch them on / off from domoticz the were responding erratically. As soon as i recompiled without the ifttt plugin they started working normally.
i will try again today with new esp's
i will try again today with new esp's
Re: IFTTT Maker
i want to connect my doorbell esp to ifttt plugin. when i am keeping a delay of 5 seconds or more the notifications does not trigger. As the doorbell triggers the esp8266 for about a second or less. what delay should i keep in the settings ? when i am keeping the delay for less than 5 seconds the esp becomes almost unresponsive.
Thanks
Thanks
Re: IFTTT Maker
Very good plugin...Thanks...Works, nice job.
Congratulate.
Congratulate.
Re: IFTTT Maker
@rajbadri
On one of my esps I reduced the delay down to 2 seconds without problems but it is true that the esp is becoming fully loaded at that point - I have about 80% load with a 2 second delay ( and 6 other plugins running) which is too high. When I wrote this plugin I was thinking about checking sensor readings like temperature where a typical delay might be 60s - I was not thinking about pushbuttons!
Is there any way you can make your button trigger the esp for longer? Doesn't the "Switch Input" plugin allow you to input pulses of different lengths?
I can certainly improve the efficiency of the IFTTT plugin which may help - but I doubt whether it will ever suit your application unless you can extend the pulse length somehow.
N
On one of my esps I reduced the delay down to 2 seconds without problems but it is true that the esp is becoming fully loaded at that point - I have about 80% load with a 2 second delay ( and 6 other plugins running) which is too high. When I wrote this plugin I was thinking about checking sensor readings like temperature where a typical delay might be 60s - I was not thinking about pushbuttons!
Is there any way you can make your button trigger the esp for longer? Doesn't the "Switch Input" plugin allow you to input pulses of different lengths?
I can certainly improve the efficiency of the IFTTT plugin which may help - but I doubt whether it will ever suit your application unless you can extend the pulse length somehow.
N
Re: IFTTT Maker
I have just uploaded a new version with a few bugs removed - it runs much lighter now.
if you want to try it, please re-download the revised version of Extra_Utilities.ino as well.
@rajbadri - I think you could try your doorbell again with this new version - it can handle a delay of 1 second without problem
N
if you want to try it, please re-download the revised version of Extra_Utilities.ino as well.
@rajbadri - I think you could try your doorbell again with this new version - it can handle a delay of 1 second without problem
N
Re: IFTTT Maker
will try
thanks
thanks
Re: IFTTT Maker
I have made yet another change to this plugin to match the changes made recently in ESPEasy R99. Update available in playground.
N
N
Re: IFTTT Maker
Works with everything requiring 5 sec delay or more. But does not run with doorbell which requires 1 sec delay. also it still jacks the load to 100% @ 1 sec delay.
Re: IFTTT Maker
currently using espeasy --> Thingspeak ----> Pushingbox to get notifications on my smartphone.
Re: IFTTT Maker
Hi all,
Can someone confirm that this plugin work, recently iftt made some changes and when I create recipe and test it trough browser on ifttt.com it works, but when I create task under ESP I cant get mail notification.
One more ting, IFTTT Key: field accept only 24 characters, my key is much longer!? Maybe there is a problem.
Thanks
Can someone confirm that this plugin work, recently iftt made some changes and when I create recipe and test it trough browser on ifttt.com it works, but when I create task under ESP I cant get mail notification.
One more ting, IFTTT Key: field accept only 24 characters, my key is much longer!? Maybe there is a problem.
Thanks
Re: IFTTT Maker
For everyone running into the same problems as doxikus. Just open the _P209_IFTTTMaker.ino and change the lines
string += F("<TR><TD>IFTTT Key:<TD> <input type='text' size='40' maxlength='24' name='APIKey' value='");
strncpy(Template[0].Ident, WebServer.arg("APIKey").c_str(), 24);
Just change the 24 into something so the key fits.
Greetings Enferax
string += F("<TR><TD>IFTTT Key:<TD> <input type='text' size='40' maxlength='24' name='APIKey' value='");
strncpy(Template[0].Ident, WebServer.arg("APIKey").c_str(), 24);
Just change the 24 into something so the key fits.
Greetings Enferax
Re: IFTTT Maker
Hi
Tnx Enferax, I will try with this solution, post back after I have test it.
Tnx Enferax, I will try with this solution, post back after I have test it.
Re: IFTTT Maker
Hello,
I'am trying to make an burglar alarm work with my ESPEasy. In ESPEasy it generates an Valua 0 in rest and an 1 in alarm situation.
I configurated your IFTTT Maker as in your description.
22 string key found at https://ifttt.com/maker_webhooks (the digits shown here as dots at https://maker.ifttt.com/use/......)
I installed IFTTT on my iphone and pc.
I chose for Pushbullet and installed it also.
I tested 4 applets and nighter of them worked yet
1st and 2nd: as trigger IFTTT (chosen: "new service activated by you") and as actioner 1 with SMS en the second applet with Pushbullet)
3rd and 4th: as trigger Button widget and as actioner 1 with SMS en the second applet with Pushbullet).
There is still something wrong in my thinking, can you please help me to make this work?
Regards
Jan
I'am trying to make an burglar alarm work with my ESPEasy. In ESPEasy it generates an Valua 0 in rest and an 1 in alarm situation.
I configurated your IFTTT Maker as in your description.
22 string key found at https://ifttt.com/maker_webhooks (the digits shown here as dots at https://maker.ifttt.com/use/......)
I installed IFTTT on my iphone and pc.
I chose for Pushbullet and installed it also.
I tested 4 applets and nighter of them worked yet
1st and 2nd: as trigger IFTTT (chosen: "new service activated by you") and as actioner 1 with SMS en the second applet with Pushbullet)
3rd and 4th: as trigger Button widget and as actioner 1 with SMS en the second applet with Pushbullet).
There is still something wrong in my thinking, can you please help me to make this work?
Regards
Jan
Re: IFTTT Maker
Hi
The IFTTT key length has been changed. Actually it is 43 characters.
Could you change your solution?
Norbert
The IFTTT key length has been changed. Actually it is 43 characters.
Could you change your solution?
Norbert
Re: IFTTT Maker
Just a thought, would the pulse counter not work for the doorbell?
It might still take 5 seconds to read the single pulse but should be reliable.
Iv'e been using the pulse counter plugin for a water meter and it seems spot-on.
It might still take 5 seconds to read the single pulse but should be reliable.
Iv'e been using the pulse counter plugin for a water meter and it seems spot-on.
Re: IFTTT Maker
Hi
Is it possible to send by email the value of the esp %ip% using the IFTT Marker and plugin "Extra Utilities" and "_P209_IFTTTMAKER" ?
thanks
Carlini
Is it possible to send by email the value of the esp %ip% using the IFTT Marker and plugin "Extra Utilities" and "_P209_IFTTTMAKER" ?
thanks
Carlini
Re: IFTTT Maker
Firstly, thank you to everyone involved in making ESP_Easy what it is. I've not long been using it and it is fantastic.
I'm having the same issue - I just can't seem to get it to send to ifttt under rules.
I've tried every combo I can think of. e.g.:
on extrearpir do
SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
endon
There are no errors in the log and it appears to respond ok:
6683213: EVENT: extrearpir
6683219: ACT : SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
6683232: Command: sendtohttp
6683234: EVENT: extrearpir Processing time:21 milliSeconds
6691848: WD : Uptime 112 ConnectFailures 0 FreeMem 19352
6702705: EVENT: Clock#Time=Tue,15:19
6702711: EVENT: Clock#Time=Tue,15:19 Processing time:5 milliSeconds
If I send :
https://maker.ifttt.com/trigger/ExtRear ... /key/MYKEY (it seems to have truncated this line but you can see the url in the browser)
directly from any browser it works fine.
Just to add, I've tried with a space instead of the comma after sendtohttp, space with a comma, etc. as there seems to be a few opinions on format. I'm more than happy to be called a dope and got it completely wrong.
I would be very grateful for any ideas.
Thank you.
I'm having the same issue - I just can't seem to get it to send to ifttt under rules.
I've tried every combo I can think of. e.g.:
on extrearpir do
SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
endon
There are no errors in the log and it appears to respond ok:
6683213: EVENT: extrearpir
6683219: ACT : SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
6683232: Command: sendtohttp
6683234: EVENT: extrearpir Processing time:21 milliSeconds
6691848: WD : Uptime 112 ConnectFailures 0 FreeMem 19352
6702705: EVENT: Clock#Time=Tue,15:19
6702711: EVENT: Clock#Time=Tue,15:19 Processing time:5 milliSeconds
If I send :
https://maker.ifttt.com/trigger/ExtRear ... /key/MYKEY (it seems to have truncated this line but you can see the url in the browser)
directly from any browser it works fine.
Just to add, I've tried with a space instead of the comma after sendtohttp, space with a comma, etc. as there seems to be a few opinions on format. I'm more than happy to be called a dope and got it completely wrong.
I would be very grateful for any ideas.
Thank you.
Re: IFTTT Maker
Dear namirda
Do you have a New Version of Plugin IFTTT MAKER for espeasy 2.0 ?
tks
Do you have a New Version of Plugin IFTTT MAKER for espeasy 2.0 ?
tks
Re: IFTTT Maker
Try this
SendToHTTP maker.ifttt.com,80,/trigger/YOURS_IFTT_TRIGGER/with/key/YOURS_IFTT_KEYS
In my case works very well.
SendToHTTP maker.ifttt.com,80,/trigger/YOURS_IFTT_TRIGGER/with/key/YOURS_IFTT_KEYS
In my case works very well.
Geoffers wrote: ↑03 Jul 2018, 16:26 Firstly, thank you to everyone involved in making ESP_Easy what it is. I've not long been using it and it is fantastic.
I'm having the same issue - I just can't seem to get it to send to ifttt under rules.
I've tried every combo I can think of. e.g.:
on extrearpir do
SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
endon
There are no errors in the log and it appears to respond ok:
6683213: EVENT: extrearpir
6683219: ACT : SendToHTTP,maker.ifttt.com,443,/trigger/ExtRearPir/with/key/MYKEY
6683232: Command: sendtohttp
6683234: EVENT: extrearpir Processing time:21 milliSeconds
6691848: WD : Uptime 112 ConnectFailures 0 FreeMem 19352
6702705: EVENT: Clock#Time=Tue,15:19
6702711: EVENT: Clock#Time=Tue,15:19 Processing time:5 milliSeconds
If I send :
https://maker.ifttt.com/trigger/ExtRear ... /key/MYKEY (it seems to have truncated this line but you can see the url in the browser)
directly from any browser it works fine.
Just to add, I've tried with a space instead of the comma after sendtohttp, space with a comma, etc. as there seems to be a few opinions on format. I'm more than happy to be called a dope and got it completely wrong.
I would be very grateful for any ideas.
Thank you.
Who is online
Users browsing this forum: No registered users and 3 guests