Problems with (BME280) - actually reconnecting WIFI!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
HarpieC
Normal user
Posts: 22
Joined: 20 Mar 2016, 20:33

Problems with (BME280) - actually reconnecting WIFI!

#1 Post by HarpieC » 21 Mar 2016, 09:16

Hello from Germany.

First I want to thank you for your great project! Amazing what you managed to do with this little MCU. Myself I was trying to get some sensors working with LUA scripts and always had problems with the limited resources.

Setting up am ModeMCU ESP12e together with an BME280 sending Data via MQTT to an openHAB installation was a 30 miniutes task. :)

I was happy to have a high accurate environmental sensor for my greenhouse. But after a few hours I was disappoined seeing that the esp stopped responding after. Only a coold boot helped.

Do anybody else ran into a similar problem?
Is there a kind of watchdog to prevent the esp for stopping?

I checked different power supplies and cables to make shure that it is not an power issue (all 1A min output)
The module is directly connected with 4 f/f wires.

That didn't help :(

I like to connect a relay to the esp too to controll the greenhouse heating, but if it is not reliable I'm afraid to over or underheat and kill all my wife's jung plans.

Thank you for your help.

Chris
Last edited by HarpieC on 27 Mar 2016, 12:37, edited 1 time in total.

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Problems with BME280

#2 Post by costo » 21 Mar 2016, 13:21

I have had problems with a NodeMCU once. It was the NodeMCU that had stopped working reliable.
You could try another NodeMCU, maybe that helps.
Other possibility may be that your system or the sensor is located near a refrigerator or a similar device that has a relais switching 230 volt. The switching of a relais may influence sensitive electronics and make it freez or reset. Finding another location may help.

BerndJ
Normal user
Posts: 86
Joined: 28 Sep 2015, 06:57

Re: Problems with BME280

#3 Post by BerndJ » 21 Mar 2016, 13:29

HarpieC wrote:That didn't help
Hi Chris,

did u use PullUp Rs on I2C ??

See:

http://www.esp8266.nu/index.php/Baromet ... iderations

could be helpful

Bernd

HarpieC
Normal user
Posts: 22
Joined: 20 Mar 2016, 20:33

Re: Problems with BME280

#4 Post by HarpieC » 22 Mar 2016, 07:43

Thank you for your help. Will try next Weekend!

HarpieC
Normal user
Posts: 22
Joined: 20 Mar 2016, 20:33

Re: Problems with BME280

#5 Post by HarpieC » 27 Mar 2016, 12:35

Hello again,

I've tested several power supply solutions. Finally I found that it is actually NOT a power supply issue here. When I installed 2 ESPs with the same sensor setup they both whent offline after some hours working and never recovered. There must be a connection between both = WLAN connection!

As I wrote the sensors are located in the Garden quite far away from the house (where the router is). I think once the wifi connection is lost the esp has problems to reconnect, even if the singnal strength is ok again. I installed a wlan repeater on an outside wall of the house facing the garden and it worked the first night without lossing the connection but I still have the fear that this happens again. I use the sensor to controll the heating in my greenhouse! So a failure will be a desanster for the young plants.

Any Ideas to make the wlan connection more secure? After Reboot every thing is fine.
Is there a certain reconnect strategy implemented.

Thank you for your help.

HarpieC
Normal user
Posts: 22
Joined: 20 Mar 2016, 20:33

Re: Problems with (BME280) - actually reconnecting WIFI!

#6 Post by HarpieC » 27 Mar 2016, 13:55

After more research I found the fallback to AP Mode. I think there must be a better solution especially for hidden sensors where it is difficult to do a cold restart (i.e. false ceilings or in my greenhouse)

There must be a timeout for ap-mode too to give the sensor a chance to try to reconnect to the Wlan again. Or perhaps better:

Go into AP mode only after one minute trying to connect to the wlan for aprox 2 Minutes. After thant try to connect to the wlan infinite.

If there is a need to change the ap settings its ok to do a cold reset and wait a minute and then connect directly to the esp.

If there are no ap-information stored on the esp stay in ap-mode to do the first setup.

Or make a switch on the config page to enable endless reconnect with the same strategy to AP Mode (30 sec) after cold boot - same as sleep mode.

Does this sound reasonable?

Perhaps you can use the esp blue led, or the second led on the modeMCU (think it is gpio16) to indicate AP-Mode.

chunter1
Normal user
Posts: 82
Joined: 22 Jan 2016, 22:40

Re: Problems with (BME280) - actually reconnecting WIFI!

#7 Post by chunter1 » 27 Mar 2016, 23:23

same here...
added an feature request already.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests