Node-Red is a very light weighted run time built on top of Node.js, taking full advantage of its event-driven, non-blocking model of operation.
A Node-Red node is a function block which consists of at least one input, some internal logic, and zero or more output. Data is usually carried via the msg.payload though it can be carried by other properties under msg.
A node can also be configured to access to certain resources such as file from the file system, a database, MQTT messages, or the local hardware I/O, for example, I/O pins on a Raspberry Pi.
The NodeMCU dev board is used to provide all the functionalities of a weather station including measuring the sun light, reading the temperature and relative humidity sensor readings, publishing to the MQTT broker the measure sensor values. It is designed so that it will wake up from deep sleep every 10 minutes to measure, connect and publish, then go back to deep sleep. According to the dev board manufacturer, it’s current in deep sleep mode uses only a few micro-Amps of current, ideal for batter operations like this one.
Cont. … Circult