Back on Sept 20th I created a post titled "Witty Cloud NodeMCU ESP8266: Needs Reset after Power-On?", explaining that my webserver based 'BME280' enviro sensor ESP8266 works fine -- but only *after* resetting via 'node.restart()' or by pressing the 'RST' button on the actual device. Actually 'pinging' the IP address works fine all the time. I thought that this was unique to the Witty Cloud, so I ordered a regular V3 NodeMCU.
Well, I just got the V3 NodeMCU, and I moved my code to it, and was disappointed to see the *same behavior* there. Sure, pressing the 'RST' button solves the situation, but I intend to mount this outside -- and would not want to go out to press that button after every power failure (in the dead of winter)!
So, if 'pinging' works all the time, but the actual webserver doesn't respond until after a reset, what is going on and how can I fix it? I guessed that (perhaps) a cold start was not giving sufficient time for the wifi to be set up properly in time for the webserver to start, but my feeble test of that theory has not made any difference.
What is even stranger is that I have an *identical* NodeMCU V3 unit with a 'DHT22/BM180', and the same wifi/webserver setup -- and it has no problems at all working after a power interruption/reboot! No 'RST' button press is required!
EDIT: I found some LUA code that appears to solve my problem:
http://hoefnix.tumblr.com/post/139726485931/adding-wifi-to-my-home-ventilation-system
Now, after a power-down/restart, I no longer need to press the RST button -- given a few seconds, it begins to respond on its own. This still leaves the mystery of why my *other* NodeMCU setup doesn't require this special attention, but I am pleased nevertheless!