Chat freely about anything...

User avatar
By shoelessone
#32355 Hello all!

I wrote a long post a week or two back about my idea for making a web connected device, and I've come some way since then. Some way, but not a LONG way :).

I've finally gotten my esp8266 board in the mail and I've managed to flash it with the nodemcu firmware that seems popular. That said, I'm sort of going "cowboy" and just going straight into this project, but now that I have actually gotten things up and running I'm beginning to see that there is a lot of various forum chatter regarding things working on the face of it, but perhaps not being super robust or reliable.

I'm specifically interested in doing these things:

1. On startup, if unable to connect to router/internet then instead broadcast a network, allow somebody to connect, and setup the router/wifi password (see this post here: https://www.hackster.io/noelportugal/if ... ton-e11841)
2. Normal operation the system will subscribe to a topic via MQTT, and will listen, indefinitely for a message to posted to that topic. I believe messages should be pushed to the device when they come in to the mqtt broker.
3. listen for a button press. If a button is pressed, publish a message to the mqtt broker notifying it that this button was pressed.

Now, I think in theory this is all possible with nodemcu, but as I mentioned i"m noticing a lot of people post with various problems ("messages aren't queued", "things stopped working after an hour", "things stopped working after 24 hours", etc).

I'm wondering if there is a different firmware other than nodemcu that is recommended by people, and if so, what that might be.

Thank you very much!
User avatar
By Mmiscool
#32357 I have been using the arduino ide and things are very good compared to any interpreter based firmware in the way of speed.
User avatar
By shoelessone
#32375 Thanks for the info!

I have a few (stupid) follow up questions:

1. Is the basic functionality the same, regardless? I'm a bit confused on what's actually happening at a lower level on this thing. At some point I would guess that code is being compiled down to machine code or bytecode or something, that the processor can handle. But it's not clear to me what nodemcu vs arduino vs compiling custom firmware is really doing. Is Lua run in some sort of interpreter, on top of another system?

2. Because I'm interested in building this for my family, I'm hoping that I'll be able to allow them to configure their router ssid/key themselves. Have you come across and code that allows for this type of functionality using the arduino ide "platform"?

Thanks again!
User avatar
By David Rio
#32420
shoelessone wrote:Thanks for the info!

I have a few (stupid) follow up questions:

1. Is the basic functionality the same, regardless? I'm a bit confused on what's actually happening at a lower level on this thing. At some point I would guess that code is being compiled down to machine code or bytecode or something, that the processor can handle. But it's not clear to me what nodemcu vs arduino vs compiling custom firmware is really doing. Is Lua run in some sort of interpreter, on top of another system?

2. Because I'm interested in building this for my family, I'm hoping that I'll be able to allow them to configure their router ssid/key themselves. Have you come across and code that allows for this type of functionality using the arduino ide "platform"?

Thanks again!


1. The functionality is still the same. Lua is compiled with the SDK along some extra code (nodemcu) that is the
one orchestrating the interactions between lua code and the SDK code. Yes, the code is compiled into native binary.

2. Write a little script (bash/python/lua ...) that modifies the wifi variables before sending them to the chip.

Nodecmu has a lot of potential and I hope the code gets more stable as it matures.

Hope that helps,
-drd