ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#1 Post by reza » 23 Sep 2017, 12:25

hi guys
i am using espeasy with D1 mini for control some relay. but after send and reseive some command , i see esp is not in my network !
i setup ip static in espeasy setting (in config) but some time this is lost and when i restart my router so again work and come to network.other espeasy (that use for sensors) dont have this problem . i think this is related to EMI noise from relay.can you help me ? please .thank you
Last edited by reza on 18 Oct 2017, 23:41, edited 4 times in total.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: disconnect wifi

#2 Post by papperone » 23 Sep 2017, 13:09

Please give more details on your hardware, configuration, picture of the relay, etc...
I've many ESP8266 (even D1 mini) happily running ESPEasy with relay at less than 1cm distance without any disconnection!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: disconnect wifi

#3 Post by Shardan » 23 Sep 2017, 13:33

Honestly i don't think it is an EMI effect.
Too many devices as the sonoff's for example have a relay near the esp and work.

It is more likely that this is an issue with pulses over power supply or possibly a problem
with the wifi router.

I'd suggest to use a separate power supply for the relay only to test this.

Can you provide a 'photo and a schematic?

Regards
Shardan
Regards
Shardan

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi

#4 Post by reza » 24 Sep 2017, 23:19

Shardan wrote: 23 Sep 2017, 13:33 Honestly i don't think it is an EMI effect.
Too many devices as the sonoff's for example have a relay near the esp and work.

It is more likely that this is an issue with pulses over power supply or possibly a problem
with the wifi router.

I'd suggest to use a separate power supply for the relay only to test this.

Can you provide a 'photo and a schematic?

Regards
Shardan
thank you friend for answer. @papperone @Shardan
i dont have schematic but this is pic of my board :
photo_2017-09-22_13-26-1hhh.jpg
photo_2017-09-22_13-26-1hhh.jpg (310.5 KiB) Viewed 16023 times
arduino nano is a PME for esp8266.
i am using some ferrite beads because first i have EMI noise and after some turn on/off ,arduino nano go to freeze. but now i dont have this problem. but after some time when i want use wifi for turn on relay i see dont work. after see network and my devices in network, i see this esp is not between my devices(but other devices are in my network ( other esp , raspberry , my phone and etc) . so i think this is not related to router. esp dont freeze because when i turn off/on router again give ip and work. thing that is see , esp is disconnect for a unknow reason and can not auto connect again(one question: espeasy can auto reconnection after disconnect?)
please help . thank you

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi

#5 Post by reza » 25 Sep 2017, 11:56

can i use a trick? i think this is related to use relay , relay is just a receiver so if wifi go to disconnect so relay can not understand that wifi is disconnect. but about sensors because every time send a command so if wifi was disconnect so again reconnect ...
relay dont send any command (auto and after times) so espeasy can not found connection is lost ....
so i think there is a trick for this . do you this this is solved my problem ?
trick : add a dummy device in espeasy(espeasy that i use for relay).add a fake IDX (for example 1000) and add a delay time for send command for example 2min.
do you think this is help me for when connection was lost so reconnection after 2min ?

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (please read last post and guidance me)

#6 Post by reza » 01 Oct 2017, 22:28

can not any body to help me?:(

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: disconnect wifi (please read last post and guidance me)

#7 Post by TD-er » 01 Oct 2017, 23:23

How is the relais connected to the ESP module?
I hope it is triggered via an optocoupler, or some transistor?

And how do you trigger the transistor?
Do you have the internal pull-down resistors enabled for all non-connected pins?
And what about the pins connected to the transistor? Either pull-down or pull-up enabled?
Especially with coils near the ESP device, it is best to let all the pins have a well defined state, which can be done by setting pull-up or pull-down resistors, depending on whichever default state is desired.
The internal pull-resistors are about 30 - 50 kOhm. You may want to lower that to about 10k using external resistors. That's also often the advice for I2C communications, but these operate on much higher frequencies.
Wires without proper pull-up or -down resistors, may act as antenna which may lead to very unpredictable behavior and in some cases may affect the existing antenna.

Is the used power supply sufficient? When this is under dimensioned, it may lead to erratic behaviour.

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: disconnect wifi (please read last post and guidance me)

#8 Post by Drum » 02 Oct 2017, 00:05

The electronics you have are a bit beyond me, but just to be sure, did you also set the ip address reservation in your router?
Have you tried looking at the serial log to see if there is any clue there?

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: disconnect wifi (please read last post and guidance me)

#9 Post by papperone » 02 Oct 2017, 07:16

You are using a custom PCB apparently so I'm clueless as in a very similar setup but driving the relays directly from the ESP8266 I've no problem at all, and my ESP8266 is as close as your to relays so I can fairly assume that's not the main issue.
I'm not sure what you mean in the picture as "ferrite beds" and I see general strange test (you wrote 12V 2A as input but all is working 5V as far as I can see).
Last but not least, your are using a single voltage regulator to drive all the electronics and if not genuine with good quality and proper filtering "that" can cause a lot of random issues (by personal experience I had a bunch of 7805s which cannot handle more than 200/300mA without behaving weirdly resetting my ESP8266 every now and then!)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (please read last post and guidance me)

#10 Post by reza » 02 Oct 2017, 20:52

thanks friend for answer.
i have a D1mini that connect to a arduino nano for PME. also i add some pins in arduino for switch. so D2-D8 are for key (and are pullup with 4.7). D9-D10-D11-D12-D14-D15-D16-D17 are for relays. D18 - D19 is for connect to I2C connection with D1 mini . and other pins are free. i have a board (pcb) that this pcb can connect to relay 8channel board with pin header.relay board have "opto" and etc. i am weak in electronic design too. i search and found this devices ( regulator , beads and etc for filtering noise...) and design pcb...
i static ip in my router . i use 12v and 5v regulator for fix V and remove noise.also i use separate power for relays and esp+arduino.
this photo:
photo_2017-10-02_21-48-59.jpg
photo_2017-10-02_21-48-59.jpg (280.23 KiB) Viewed 15859 times
behavior of board is strange. first lost wifi and ip address after some time(device is not in network watcher and have not ping in cmd...)
"some time" means 1days or 2 days or 1 week ! so i can not monitoring with IDE serial monitor(for example 1 week) !
other strange behavior disconnect connection between arduino and esp(key is work but wifi dont work ( esp is in network and have ip)

i test a experience . i add a device in esp for send system info(RSSI) every 5min to one IDX in domoticz. after happen(lost wifi) i check that IDX. i see every 5min receive a info(RSSI) also now receive !!!!! D1 is not in my network !!!!!! i have not ip and ping is unreachable... but esp is sending info every 5min yet !!!
I'm confused :( is that possible this problems related to just that regulator ? if this is fake , so is that possible happen this strange problems ?

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: disconnect wifi (strange problem)

#11 Post by toffel969 » 03 Oct 2017, 18:59

Is it maybe just a weak wifi connection? I had that Problem and overcame it with using wemos _d1 pro mini with external antenna. It has the same pin layout as the normal mini, just also a pigtail connector for external antenna.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (strange problem)

#12 Post by reza » 03 Oct 2017, 19:58

toffel969 wrote: 03 Oct 2017, 18:59 Is it maybe just a weak wifi connection? I had that Problem and overcame it with using wemos _d1 pro mini with external antenna. It has the same pin layout as the normal mini, just also a pigtail connector for external antenna.
i tested with a near distance .but i have error yet:(

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: disconnect wifi (strange problem)

#13 Post by Drum » 04 Oct 2017, 18:11

Do you have a network scanner, like Fing? Maybe I am not understanding, but if it is sending every 5 minutes, I do see a problem with the D1. If you think it may be the 5V regulator, remove it and plug in a good USB power supply and see if that helps. If it is sending I do not see where it is possible to NOT have an IP address.

I believe having 2 devices with the same IP could have this effect and I have seen this on my own network. However, It could very well be something else.

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (strange problem)

#14 Post by reza » 04 Oct 2017, 22:59

Drum wrote: 04 Oct 2017, 18:11 Do you have a network scanner, like Fing? Maybe I am not understanding, but if it is sending every 5 minutes, I do see a problem with the D1. If you think it may be the 5V regulator, remove it and plug in a good USB power supply and see if that helps. If it is sending I do not see where it is possible to NOT have an IP address.

I believe having 2 devices with the same IP could have this effect and I have seen this on my own network. However, It could very well be something else.
i am trying with a good power this week. yes i have "wireless network watcher" and i see when i have report every 5 min , in wireless network watcher i dont have that ip. there is not any same ip. for this module i set static ip in 210 and i dont have any device in this ip...

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: disconnect wifi (strange problem)

#15 Post by Drum » 05 Oct 2017, 11:51

I think you need the serial log. When I was using domoticz, I am pretty sure it would not send data if it was not connected to the server.
Do you have syslog running on anything? You can also send the logs to syslog. That will at least tell you what the ESP is doing.

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: disconnect wifi (strange problem)

#16 Post by TD-er » 05 Oct 2017, 20:55

Can you install some syslog server in your network where the ESP will send its logs? (Log Settings in the Advanced Settings page under "Tools")
Then you can try to add a device in ESP easy to log the network strength. (Device "System Info", Indicator "Wifi RSSI")

This log will serve two purposes:
  • WiFi signal strength
  • Time of disconnect
To start with the first, when you plot it, it may indicate a straight declining line which indicates a problem with the electronics and/or impedance. (e.g. pull-up or -down resistors needed)
Or when there is no pattern visible, or constant values, the electronics are fine and then it is probably something in the software.

The second item may be of special interest if it is some 'interesting' time.
For example, a sensor I have, has been crashing a number of times in the last few weeks and the time still active on the display was always xx:59.
And the device was completely frozen. No reaction to pings, no animation on the display, etc.

I use NTP on my devices, so its internal timestamp is useful when sent to a display. But when you log to a Syslog server, it may log the time the logs are received.

79kiko
Normal user
Posts: 15
Joined: 23 Aug 2016, 05:18

Re: disconnect wifi (strange problem)

#17 Post by 79kiko » 07 Oct 2017, 16:28

Hello. Try connect Wemos directly to relay without your board.

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (strange problem)

#18 Post by reza » 18 Oct 2017, 23:11

TD-er wrote: 05 Oct 2017, 20:55 Can you install some syslog server in your network where the ESP will send its logs? (Log Settings in the Advanced Settings page under "Tools")
Then you can try to add a device in ESP easy to log the network strength. (Device "System Info", Indicator "Wifi RSSI")

This log will serve two purposes:
  • WiFi signal strength
  • Time of disconnect
To start with the first, when you plot it, it may indicate a straight declining line which indicates a problem with the electronics and/or impedance. (e.g. pull-up or -down resistors needed)
Or when there is no pattern visible, or constant values, the electronics are fine and then it is probably something in the software.

The second item may be of special interest if it is some 'interesting' time.
For example, a sensor I have, has been crashing a number of times in the last few weeks and the time still active on the display was always xx:59.
And the device was completely frozen. No reaction to pings, no animation on the display, etc.

I use NTP on my devices, so its internal timestamp is useful when sent to a display. But when you log to a Syslog server, it may log the time the logs are received.
i will test with syslog. but this is strange for me . i setup a device for rssi wifi. and build a virtual device (text) in domoticz and esp send rssi every 5 min. also after disconnect i see. rssi receive every 5 min, and this is not freeze i see change after some time. but when i want send from domoticz to esp so dont work and in wireless network watcher i dont see esp and ip also when i "ping" in cmd this is no feedback and is unrichable.... i think this is disconnect, but how every 5 min recevie from espeasy?!
and a more experience , when wifi is disconnect if i turn off/on router, so i see ip and work again,,,, do you think this is related to my router? because any my device (phone , laptop , raspberry , milight ...) never disconnect. just espeasy lost ip...

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: disconnect wifi (strange problem)

#19 Post by reza » 18 Oct 2017, 23:12

79kiko wrote: 07 Oct 2017, 16:28 Hello. Try connect Wemos directly to relay without your board.
with turn off/on router again get ip and i think this is not related my board!?

wim16
Normal user
Posts: 88
Joined: 01 May 2017, 20:35

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#20 Post by wim16 » 19 Oct 2017, 13:39

Maybe this is the same problem as I had some time ago: http://www.letscontrolit.com/forum/view ... f=4&t=3373
I haven't seen it since then and I think it may have been solved by a firmware update of my modem/router (which was initiated by my ISP).

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#21 Post by reza » 19 Oct 2017, 20:38

wim16 wrote: 19 Oct 2017, 13:39 Maybe this is the same problem as I had some time ago: http://www.letscontrolit.com/forum/view ... f=4&t=3373
I haven't seen it since then and I think it may have been solved by a firmware update of my modem/router (which was initiated by my ISP).
thank you . so you think this is related to my modem ?

wim16
Normal user
Posts: 88
Joined: 01 May 2017, 20:35

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#22 Post by wim16 » 20 Oct 2017, 10:04

Not sure. I only know that the problem has dissapeared and the modem update (as far as I can see) was the only change in the environment.

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#23 Post by Drum » 20 Oct 2017, 12:01

It could be the modem if it limits the number of connections, as most ISP provided modems do. Assigning a static IP address in the modem should fix it if this is the issue.

Assigning a IP address in ESPEasy only can be problematic as you can end up with 2 devices with the same IP address, which could be the issue.

I believe setting the IP address in the router and ESPEasy speeds the connection as there is no DHCP negotiation.

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#24 Post by reza » 20 Oct 2017, 21:53

Drum wrote: 20 Oct 2017, 12:01 It could be the modem if it limits the number of connections, as most ISP provided modems do. Assigning a static IP address in the modem should fix it if this is the issue.

Assigning a IP address in ESPEasy only can be problematic as you can end up with 2 devices with the same IP address, which could be the issue.

I believe setting the IP address in the router and ESPEasy speeds the connection as there is no DHCP negotiation.
i test both. first i set static ip in espeasy but i had problem , second i set static in modem , and in last set in both. but there is problem yet...

Martinus

Re: ip of espeasy is lost and i can not send any command but a device is report rssi every 5 min!!!!

#25 Post by Martinus » 22 Oct 2017, 12:28

We have had similar reports on these kind of behavior where the ESP does no longer respond to ping or webrequests, while the TCP client is still operating as normal.

I think these topics are about this or similar issues:
https://github.com/esp8266/Arduino/issues/2330
https://github.com/esp8266/Arduino/issues/1137
https://github.com/esp8266/Arduino/issues/3095
https://github.com/esp8266/Arduino/issues/3215

Whether or not people suffer from this 'bug' seems to depend on your brand/type of access point (or access point settings?)

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests