Nodemcu goes offline after a few minutes

What do you see in the serial monitor when this happens?
How do you have your device and power supplies wired at the moment?

Pete.

In the monitor i can see tomorrow maybe what he shows and i have a 5v power adapter on the usb connector on the nodemcu and the relais on the vpin. But the relay is currently not connected, to test because you said I should test it without a relay

So the only hardware connected to your board is the DHT22?

You should be powering the Wemos from your PC in that case, with a good quality USB cable.

Pete.

No, the dht22 , big fan, small fan and the humidifier. But its connected on the relais and just the contacts are in the pin 12,13,14 but the relay is dissconnected from the vpin. so yes in principle only that is currently the dht22 connected.

And i have no pc i use just a macbook for the code uploade. And a power adapter for the nodemcu. And this is a good power adapter.

Typo?

You should be powering the NodeMCU from your MacBook then, with a good quality USB cable, otherwise you can’t monitor the serial output in the Arduino IDE.
The serial output is the single most valuable debugging tool available to you - make use of it.

Pete.

Yes ok you mean for the monitoring ok yes i use a good quality usb cable

No i have disconnect it from the board for test it without the relays whether it stays online then.

You said “vPin” as in Virtual Pin within the Blynk app as opposed to Digital Pin (D pin maybe?) that physically exists on your NodeMCU.

To eliminate all potential issues you should disconnect everything from your NodeMCU apart from the DHT22 sensor and the USB cable that is connected to your MacBook.

Pete.

Oh sry no i mean the vin pin what you say to me in the other post

Ok when i monitoring i disconnect all except for the dht and the power cable

Ok and if i test this steps i say you what say the monitor

thank you for your patience and help

I don’t understand.

Okay.

There is one other issue that could be contributing to the problem you have.
The auth code that you included in your first post, then deleted, tells me that your project is on the Blynk cloud server in Singapore.
Blynk has three cloud servers - located in Frankfurt, New York and Singapore. Your project would normally be located on the one that is nearest to you when the Blynk account was created. I assume that the account was created fort you, maybe by someone in India?

When your device tried to connect to the project you ISP’s DNS server will probably resolve blynk-cloud.com to the nearest server (Frankfurt in your case) and when a project with your auth code isn’t found there it will be redirected to the server that does hold your project. When this happens your serial monitor will show something like Redirecting to 188.166.206.43
This shouldn’t be a problem, but as you are experiencing disconnection issues I guess it is something that may need to be eliminated.

Does your Blynk account have any additional energy attached to it, or are you using the 2000 points that come as standard when you signed-up?

Pete.

You post here

That i connect it via the vin pin and i connect the relais via the vin pin

Yes thats right then i make a new auth token for me

Yes this energy is empty but i have more energy…why you asking?

You cannot connect a relay to a virtual pin - it’s virtual and doesn’t physically exist. Your relays will be connected to physical pins , labelled D0, D1, D2 etc on your board - but they should be disconnected for initial testing until your disconnection issue is solved.

I don’t understand what you mean by this.
The best solution would be for you to create a new Blynk account using a new email address. This would be created by default on your local Frankfurt server and overcome the redirection issue (assuming that it is actually an issue). However, if you’ve bought any energy on your existing account this would not transfer to your new account.

Pete.

Ahh ok you say i have to connect the relay over vin pin and I thought you mean this pin and then i connect the relais on this pin :sweat_smile:

image

exactly you are right first of all it has to work

Ah ok yes this account created the indian guy and i have another account then i use this account this account is created with my email address

The Vin pin is “Voltage In” and is a way of providing power to your NodeMCU as an alternative to the USB connection. Once you’ve solved the disconnection issue then you could power both the NodeMCU and the relays from one 5v power supply using this pin and the VCC pin on the relay board. For now, use the USB connector and leave the relays fully disconnected.

You should create a project in this account, generate an Auth code and use this in your code. You will need to add the widgets and attach them to the correct virtual pins.

Pete.

Ok

Ok yes i do this and then i post the result

And by the way i do nothing just dissconnect the relais and its work since 4 hours without offline message

and what on the auth token did you see that it is not the frankfurt server?

Trial and error!
As I’m in the UK, Frankfurt is my local server, so entering…

blynk-cloud.com/your_auth-code/project

should have returned information about your project, but instead it gave me ‘invalid auth code’ which told me that the project lives on a different server.
I replaced blynk-cloud.com with the IP address of the New York server with the same result. Doing the same with the IP address of the Singapore server gave me the data I was looking for.

Pete.

1 Like

Yes ok i understand what you mean and test it too

Set serial to 9600 higher rate can cause processor reboot.

so i changed the auth token and the serial started to 9600 it ran for 5 hours without restart then again about 13 hours over night and now it goes offline again very often. unfortunately i can only check the monitor on saturday.

When you say “changed the Auth code” do you mean that you re-created your project in the Blynk account that you set-up and are loved-in to that account on your phone and are using a corresponding Auth code for a device linked to that account in your sketch?

Also, I strongly disagree with the notion that serial monitor baud rates above 9600 can cause reboots with this hardware.
In my opinion, you should always run the serial monitor at the native baud rate for the board you are using. In the case of the NodeMCU this will probably be 74880.
The reason for doing this is that the board will output valuable data to the serial monitor when it boots-up, but that data will be at its native baud rate. If you have your serial monitor set to a different baud rate then this data will either not show up, or appear as random characters on the screen.
Matching your serial monitor output to the native baud rate for your board allows both system messages from your board and debug data from your sketch to be viewed in the serial monitor at the same time.

There is a scenario, where a ‘virtual’ serial port is created using the SoftwareSerial library, where restricting the baud rate for that virtual port is necessary - but that is not the case here.

Seeing the output from your serial monitor, when it’s set to the native baud rate for your device and the sketch is using the same setting, would be very useful as it would show whether your device is rebooting when a Blynk disconnection/reconnection is taking place. If it is, then the system message will show a code which gives the reason for that reboot.
If the disconnections do not coincide with reboots then we need to start looking at other issues like WiFi signal strength etc.

If you are physically away from your hardware and MacBook during the week then maybe something like TeamViewer would be useful way of monitoring your serial output?

Pete.