Node-RED on WRTnode
TL;DR – it runs – now I need to put together some GPIO nodes.
Updated 5 Dec 2014 – In my original post Node-RED was so slow it was unusable. Using Michal Vondráček’s node-ws package fixed that.
Node.js on WRTnode
My first hurdle was to get Node.js running on the WRTnode. Node has previously been run on OpenWRT, but that implementation was old and specifically targeted to a big endian MIPS architecture. Luckily Michal Vondráček published a working WRTnode implementation of Node.js the day before the ThinkMonk hack day.
I next struggled with installation, as ‘npm install –production’ was first running out of memory and then complaining about a lack of filesystem locks. Thankfully Node-RED creator Nick O’Leary was on hand to point out that I could simply copy an installed Node-RED from another system (like a VM on my laptop).
With Node.js installed (mostly onto a USB stick) and Node-RED also copied onto the USB stick I was able to start Node-RED, see it coming up on port 1880 and browse to it.
Having installed Michal’s node-ws and deleted the ws package from the Node-RED node_modules directory everything works:
I now need to get the GPIO mapped so that I can get Node-RED to blink some lights etc.
Filed under: WRTnode | 1 Comment