"SmartLED Controller" - ESP+FastLED+Blynk (Video)

@Jamin and @Costas

Jamin thank you for this project and the code i finished it and it works just fine. In the past Costas has guided me how to find a solutuon with a pin that i wanted to conect with IFTTT via webhooks on a similar project but that used a digital pin of the Wemos d1 mini so it was simpler than this.

Can ether of you let me know if its possible to control the “manual” On and Off button only via IFTTT ?

It is possible.

Thanks @Jamin i have done it and also integrated it with Google Assitant.

1 Like

Please share the code snippet you used so others can try it out! :slight_smile:

Sure i used your code and the same virtual pin. Then i created a google asistant ifttt rule with web hooks for it to send the comand to that virutal pin:
http://139.59.206.133/xxxxxputhereyourblynkauthtkenxxxxxx/update/V10
And then the on comand is actualy off [<<<0>>>] in the webhooks of ifttt. This is becuse when i have “Manual mode” ON on your blynk app i have the “all off” buton presed from before. The result is that the LED strip comes on when i say “ok Google lights on”.
The only mod i did in your code is i changed the nuber of LEDs to 60 and the type of LEDs to WS2812B and RGB.

1 Like

There is one thing i noticed though your app (and thank u for it so much) the red R button does not make my strip red. But i dont care its a great app and great code u made for us and thank u for sharing it and the Blynk CEO Pavel amd team that created this powerfull tool caled Blynk.

I might just remove those buttons and replace with a proper user selectable favorites button array.

Thanks for pointing out the issue! :slight_smile:

1 Like

Interesting… I had full control of all colors with default buttons… I wonder if it is due to the selection of physical strip vs settings?

I have used standard 5v-WS2812B–30LED-B and 60LED versions with these settings (Note change from WS2811 to WS2812 - Perhaps makes a difference?)

image

Hey I’m working on this project using Blynk, but I came from an OpenHAB project that led me to trying Blynk. Basically I had a few more patterns but I can’t figure out how to translate the items between the two different codes. If you could provide any insight on where I could start learning the code you are using that would be helpful so I can add some of the other effects like CandyCane. The other light control code I am using is the .ino file from here: https://github.com/bkpsu/ESP-MQTT-JSON-Digital-LEDs . The JSON file lists out all of the effects he utilized.

The secondary issue that I am running into is this some intermittent LED flashing. This happens only when I adjust the HUE Blending from 0 to anything else under the config page. Nothing looks out of place but I noticed when I set the starting speed to 10 at this point in your code:
“varRainbowSpeed = 0; // Start stationary”

After changing that to 10 or 20 it will appear as a rainbow moving but there’s intermittent flashing throughout the strip. When I change HUE Blending to any other number it starts to look like this in the video: https://youtu.be/eLdGjznZ-5A and the intermittent flashing sets in. The only settings I changed were in two .h files referenced. Otherwise the code is untouched and everything operates as intended except for the flashing.

I’m all excited at this point but I can’t figure out why it’s acting differently between the JSON file and your Blynk file. The speed, LED strip, NodeMCU, and everything else look the same unless there is a key difference I can’t spot. If this is something I should be asking in a general forum I’d be happy to move it, I started here because you were one of the few projects I could find utilizing WS2812 and NodeMCU’s (or equivalent).

Cool project. I would like to control colour of 2 individual ws2812 strips seperately for high school experiment using Blynk. Is this possible with nodemcu?

You can control as many as there are suitable data pins availed. Now coding for all of them, particularly if using different patterns… well, have fun with that :stuck_out_tongue:

Am thinking of putting 2 strips in series and make first 8 led’s colour 1 and second 8 led’s colour 2. I only have to use 1 pin in that case.

very nice project @Jamin, i’ve currentl just rigged up 7 ws2812’s to an ESP-01 changed settings to GPIO2 and LED NUM to 7, power only 3.3v and it works like a charm. i was using a wemos D1 R1 old board, then a wemos D1mini and just to see the ESP-01.
just one question, i’m using the arduinoOTA anyway, just a bit confused about how to use the lounge / office setup in settings, can you explain just that portion please?

Great project thanks! I’m struggling to making it work tho. I think I might be doing something wrong with the Blynk app, I couldn’t scan your project because I don’t have that much “energy” that is why I wanted to add the modules I could afford with the free app. For instance I added a push button, assigned it to pin v6 (behavior 0-1), according to the code that might turn all LEDs red, but nothing happens. Am I wrong?

PS. I’ve tried with neopixel library with an esp8266 server for triggering it and it worked, so I might not have the schematics and PIN numbers wrong. I think the only thing wrong is the Blynk app logic I’m using.

Waiting for your response,
Thanks!

EDIT: after some debugging and trying with other projects that use FASTLED library, I came to the conclusion that it is its fault. With NeoPixel library I have no problem at all, but with the FASTLED I’m not getting any response. Perhaps it has to be something with the initial error I get when compiling:

    In file included from /Users/user1/Documents/Arduino/ESP8266-WS28xx-Blynk/ESP8266-WS28xx-Blynk.ino:5:0:
    /Users/user1/Documents/Arduino/libraries/FastLED-3.1.8/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008
     #    pragma message "FastLED version 3.001.008"
                         ^
    In file included from /Users/user1/Documents/Arduino/libraries/FastLED-3.1.8/FastLED.h:68:0,
                     from /Users/user1/Documents/Arduino/ESP8266-WS28xx-Blynk/ESP8266-WS28xx-Blynk.ino:5:
    /Users/user1/Documents/Arduino/libraries/FastLED-3.1.8/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
     #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                           ^

Hi,

I’m having an issue getting this code to work. I have a WS2812B LED strip and a Wemos D1 Mini. I’ve got the strip working with example code from the FastLED library. I got the BlynkBlink example working through wifi to light the built in LED on the Wemos.

I’ve followed the Readme.md file from the github link. When I upload the sketch it seems to be having an issue with the wifi connection. In the app it says “Wemos D1 Mini wasn’t online yet”. In the Arduino IDE serial monitor I get strange characters like this “⸮ࠆ⸮⸮⸮Ȯ⸮⸮v⸮⸮)
^⸮⸮c⸮⸮⸮V$”

Anyone know what I’m missing?

These strange characters in the serial monitor are because the baud rate of the serial monitor doesn’t match the baud rate of the Wemos.

The Wemos uses a default baud rate of 74880, so all boot messages are displayed at this rate. Once the device has booted and started running the code the baud rate will change to whatever is specified in the code.

I prefer to use the 74880 baud rate for my debug messages, so that the serial monitor will correctly display both the Wemos system messages and the debug messages from within the code.

Pete.

1 Like

I changed the baud rate in Serial Monitor to 74880 but still funny characters. 115200 works though. It says …

[1308822] Connecting to 192.168.1.2
[1313823] Connecting to 192.168.1.2
[1318824] Connecting to 192.168.1.2
[1323825] Connecting to 192.168.1.2

Adds a new line every few seconds.

That’s because you’ve not edited the settings.h file. By default, it’s trying to connect to a Blynk local server at 192.168.1.2

Pete.

1 Like

I hadn’t commented out the Local server settings in the settings.h file. I did that and it seems to be working fine :smiley: Thank you Jamin and everyone for all the code and info

First of all, thank you very much for this code.
Im using this for my living room ceiling light and it doesnt only look amazing, its easy to use too!
But i have one small problem…
Depending on the set value on “updates per sec”, the esp happens to “reset” itself after a few minutes (sooner or later, depending on the value set earlier).
Im guessing there is just a timer or delay function resetting the preset/loop after a given time?
Is it possible to bypass or strech that time? Because i want to replace my original ceiling light with my new WS2811 LEDs. But if its resetting itself, its just odd.

I hope that you didnt have too many problems reading this lol.

regards!