Node.js on ESP8266

re: Node.js installation on an ESP8266 using ESPruino.

If I were to use Node-RED to develop a flow intended for the ESP8266, would it be possible to simply load the JSON file to the ESP8266 and it would perform the same function as in Node-RED?

No, that is not possible today.

Espruino is a JavaScript runtime. It implements the core JavaScript language for the ESP device.

Node.js is a runtime that includes a large number of additional libraries that are not part of the JavaScript language specification. So you cannot take a node.js application and run it on ESPruino.

1 Like

Thanks, I was afraid it wouldn't be that simple, knowing the extra baggage that Node-RED requires.
It certainly would be extremely useful if an App could be developed that would format the JSON so it could be loaded to an ESP8266; that would make Node-RED an IDE.

Yup, an espruino compatible runtime has been on my list of interesting side projects to tackle for a long time. It wouldn't be a full Node-RED runtime - the palette of nodes would be very limited and specific to the ESP, but it would be fun to do.

1 Like

I certainly appreciate the requirement for a limited palette given the limitations of the ESP8266 platform. However, I'm sure you would agree that the including MQTT node would be of significant importance.

It's pretty academic discussion because it's unlikely to be something I have the bandwidth to do anything with.

So yes, I'm sure there are plenty of 'must have' nodes. The real challenge is keeping the footprint small enough to fit. That will always be the downside of using an interpreted rather than compiled language - you have the overhead of the language runtime to consider.

I quite agree on Interpreted vs Compiled; one of the reasons I liked Visual Basic (VB6 now legacy) is that it had both.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.