ESP 8266 Standalone

• Hardware model: NodeMCU Lua Lolin V3 ESP 8266MOD 12-F
• communication type: Sending the code via usb but for my project it’s connected to my Wifi
• I’m Using the Blynk console (Web Dashboard)
• Arduino IDE with Blynk v 1.0.1 and “Card type: Generic ESP8266 Module”
• My ESp is marked as “ONLINE” to blynk

I was previously using the first version of Blynk with my Iphone and was working perfectly but I had to move the Blynk v2 wich getting me a hard Time, Not really good at coding but trying to improve ahah.

My project is a simple on/off switch x10 but for some reason when i setup the Web Dashboard On the Datastream V0 that I created, it does nothing and i don’t understand, I’ve tryed some “random” stuf for the past 2 days but can’t find a solution so… if someone tha tpass by have a solution :sob:

Thx!

My code:

#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID   "TXXXXXh"
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "IXXXXXp";

char ssid[] = "NXXXXXD";
char pass[] = "JXXXXXX";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  pinMode(16, OUTPUT); // D0
  pinMode(5, OUTPUT); // D1
  pinMode(4, OUTPUT); // D2
  pinMode(0, OUTPUT); // D3
  pinMode(2, OUTPUT); // D4
  pinMode(14, OUTPUT); // D5
  pinMode(12, OUTPUT); // D6
  pinMode(13, OUTPUT); // D7
  pinMode(15, OUTPUT); // D8
  pinMode(3, OUTPUT); // D9
}

void loop()
{
  Blynk.run();
}

BLYNK_WRITE(V0) // Executes when the value of virtual pin 0 changes
{
  if(param.asInt() == 1)
  {
    // execute this code if the switch widget is now ON
    digitalWrite(16,HIGH);
  }
  else
  {
    // execute this code if the switch widget is now OFF
    digitalWrite(16,LOW);
  }
}

PINS VERTEILUNG

How is your V0 datastream defined in the web dashboard?

I’m actually very surprised that your code was working well under Blynk Legacy, as you’re trying to use more GPIOs than the ESP8266 can really support, because many of the ESP8266’s pins behave in a way that is incompatible with what you appear to be trying to achieve. You should read this…

Pete.

Hi Peteknight,
Here the Datastream:


and Here the button:
image

Oh, actually with the previous version of blynk I didn’t have to code, Blynk was doing everything itself, I only had to configure the buttons and inject the base code to connecting my esp to blynk server but with the V2 it’s horrible for the newbies like me :sob:

Here my esp: https://www.amazon.fr/gp/product/B074Q2WM1Y/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&th=1

Try adding another one of your datastreams, along with the corresponding widget on the dashboard and BLYNK_WRITE function in your sketch. See if that one works.

There was a problem when using V0 with switch widgets in the web dashboard, but I thought that this had been fixed.

Pete.

Hi back PeteKnight,
I tryed as you suggested and same problem, I tryed on the pin D3 (GPIO 0) and added this code

BLYNK_WRITE(V3) // Executes when the value of virtual pin 0 changes
{
  if(param.asInt() == 1)
  {
    // execute this code if the switch widget is now ON
    digitalWrite(0,HIGH);
  }
  else
  {
    // execute this code if the switch widget is now OFF
    digitalWrite(0,LOW);   
  }
}

Is there, by any chance a way to get back to the old Bynk ?

It would have been better if you’d chosen one of the pins marked as “safe pin” or “quite safe pin” in the link I provided.

What do you have connected to these GPIO pins?
Do you a test meter that you could use to measure the voltage on the pins that you are trying to switch? If so, then disconnect everything from the board except the USB cable and check the voltage that you are getting on each pin.

Why did you stop using Blynk Legacy?

Pete.

  • I did the chage and used the GPIO 4 (D2 on my board) but same issue.

I’ve a multimeter yes, I don’t have strange values, just the dashboard that’s doing nothing ahah

I was using Blynk and one day a popup blocked the application and forced me to Blynk v2, when I came back on te Blynk (not the v2) all of my stuff was suppressed so I was thinking maybe I was forced to change to the v2, so I can still use the v1 app ?

I was suggesting that you use the multimeter to see if the pins are switching HIGH (3.3v) and LOW (0v) when you activate the widget switch.
I asked how you were ascertaining that the code you running wasn’t working, but you’re not answered that.

Blynk Legacy doesn’t have a pop-up that blocks the app.

If you didn’t use the app for a while then your account will be deactivated for GDPR compliance reasons.

Pete.

It was only one time maybe 6 months ago isk if it was a popup but something told me to go to the v2 ahah.

It was 1 day without use, but to for going back at this:

I did setup on the old app (it’s what your calling “Legacy” if I remember ahah) with the old config that was worked and it still working perfectly.
So with this base i wanted to just connect the Esp to blynk.cloud with

#define BLYNK_TEMPLATE_ID "xxxxxxxxx"
and
char auth[] = "xxxxxxxx";

but as soon as I upload the code, my esp just doing like before

I don’t really understand ahahI want to connect the esp to blynkcloud to make it communicate with my homebridge server xD.

https://docs.blynk.io/en/blynk-1.0-and-2.0-comparison/migrate-from-1.0-to-2.0

Hi John,
I did everything in the documentation but it’s just don’t work,
With the upgrade done The blynk v1 app is not working anymore and the V2 still not working, when I got back at the first version, the v1 is working again, I think I’m just gonna give up my hyped to connect blynk to my homebridge :sob:

I’m happy to help you to get this V2 app working with your hardware, but you need to answer the questions that I’ve asked you.

You’ve also mentioned HomeBridge for the first time. Where does this fit into the equation?

Pete.

Oh yeah sorry, I think it’s not working because the pin D0,D1 and D3 stay on high and the other D’re staying on low and nothing change when I play with the dashboard.

I did mention homebridge now because I just wanted to make this v2 working on my esp before but because you ask:
I’ve a d’usine hot and cool (not the link version) and I want to increment Blynk to homebridge like that I could control Blynk from Siri and the app house, everything is setup, the only thing that making me blocked is my comprehension of Blynk :sweat_smile:

My question is, How do you know that these pins are staying HIGH?
Do you have something attached to them, that indicates this?
Have you tested the voltage on these pins with your meter? If so, what results are you seeing?

When you boot-up your device, what are you seeing in the serial monitor? (copy and paste the results, do not post a screenshot).

I have no idea what you are saying here!

Pete.

Hi,
Nevermind I found a solution ahah:
thx!