NodeMCU and Sonoff don’t have Espruino installed by default, so I used ThingsSDK and their Flasher.js App to flash them in less than a minute. After that, pushing the code on the node is easy as npm run dev.
At the first boot of a new node, it starts an Access Point to configure the Network SSID, Password and the Aurora Code, a 4-digit code that is used by the node to obtain the right MQTT channel and to register himself on the server.
The interface for the Wi-Fi setup is really simple: this is caused by the fact that all the HTML code for the page is inside the node, and they have limited memory. To avoid lots of
... read the whole story at medium.com.