Hi there coders! ![]()
I have 3 WS2811 through hole individually addressable LEDs hooked up to a NodeMCU 1.0.
I want to use them as notification lights using IFTTT i.e. to have them light up when I get mail or whatever.
Eventually I would also like to communicate in the other direction e.g. wirelessly report temperature readings.
I've got the LEDS working fine using the FastLED library and some example code so no issue there.
I found this tutorial, that uses this code.
The webhook part of my applet looks like this:
I modified the code, slightly, to use the LEDs instead of the servo as in the video.
When I run the code on my device, serial monitor returns the following:
WiFi Connected
192.168.1.60
Receiving Data for MyESP
Connecting to : dweet.io
Connected Successfully!Closing Connection
Key not found
Receiving Data for MyESP
Connecting to : dweet.io
Connected Successfully!Closing Connection
[etc...]
If I just load the dweet.io url directly in a browser while the NodeMCU is running it returns:
{"this":"failed","because":"Rate limit exceeded, try again in 1 second(s)."}
And when the NodeMCU is turned off:
{"this":"failed","with":404,"because":"we couldn't find this"}
I have a reasonable amount of hobby experience using arduinos with sensors and actuators and whatnot but frankly the whole IOT aspect of the ESP8266 is completely foreign to me and I don't have a clue what I'm doing or how dweet.io is supposed to work... C++ is the only language I have any knowledge of and I honestly find all this lua/json/html stuff very confusing. :o
Besides getting this demo up and running I'd love to have someone explain how one generally goes about making an ESP and services like ifttt talk to each other. Good tutorials on this topic seem hard to come by.
In the current applet I'm using the button widget for testing and it shows up in the activity log so that part works, but I don't understand what happens during a webhook request and why this example would trigger a GET and not a POST command to make the ESP do something. If there are convenient alternatives to using dweet.io to achieve what I'm going for I'm open to suggestions.
I'll add the exact code I'm running as an attachment. The returns from the serial monitor tell me the issue is somewhere in the PrintValue() function, most of which I do not understand. ![]()
Looking forward to your -sure to be enlightening- replies. Thanks in advance.
iftttled.ino (4.02 KB)
