MySensors with NodeJS Controller and OTA bootloader on RPi

My RPi runs Arduino to compile and flash sketches and the bootloader. With this setup no separate PC/Mac is needed. Exactly the same could be achieved (faster) using a PC/Mac for all the Arduino compilation and flashing activities – just skip the steps and execute on PC/Mac instead.

Hardware

Headless Raspberry Pi model B with wired Ethernet

I'm connecting a monitor only for first time boot to get the IP address and then connect via Putty/xRDP

Download and install latest Raspbian version on a fresh SD-Card

Tutorials for this task are available on the internet (download, copy to SD)

Setup base parameters

(adjust to your needs - here: RPi-IP: 10.0.1.5 / Router-IP: 10.0.1.1 / password: test / timezone: Europe,Berlin / hostname: mysensors)

Install latest updates

Install Remote Desktop

Optional… my RPi is headless and I use xRDP to connect from a Windows PC to run a graphical UI if needed (e.g. for Arduino IDE)

Install NodeJS (here: latest stable version available for RPi: 0.10.28)

Install MongoDB

Install Arduino (and update to latest 1.0.5)

Enable programming via GPIO UART (for serial gateway only)

Install MySensors from Git branch development (here: password: test)

Start NodeJsController on boot

Configure Arduino

Serial Gateway

Hardware

Disable default use of serial port

Flash (assuming that the ATmega has a valid Arduino bootloader installed)

Setup NodeJsController

Ethernet Gateway

Hardware

Adjust Sourcecode (here: address 10.0.1.99 / port: 9999)