Skip to content

Commit 961828a

Browse files
committed
installation instructions
1 parent c8c5607 commit 961828a

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

NodeJsController/Readme.html

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ <h2>Setup base parameters</h2>
1010
<ul>
1111
<li>login as pi / raspberry
1212
<li>sudo nano /etc/network/interfaces
13-
<p>#iface eth0 inet dhcp<br/>
14-
iface eth0 inet static<br/>
13+
<p><font color="#FF0000">#</font>iface eth0 inet dhcp<br/>
14+
<font color="#FF0000">iface eth0 inet static<br/>
1515
address 10.0.1.5<br/>
1616
netmask 255.255.255.0<br/>
1717
gateway 10.0.1.1<br/>
18-
nameserver 10.0.1.1</p>
18+
nameserver 10.0.1.1</font></p>
1919
<li>sudo raspi-config
2020
<ul>
2121
<li>1. Expand Filesystem
@@ -44,13 +44,15 @@ <h2>Install latest updates</h2>
4444
<li>sudo apt-get upgrade
4545
<li>sudo reboot
4646
</ul>
47+
<!--
4748
<h2>Install Remote Desktop</h2>
4849
<p>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)</p>
4950
<ul>
5051
<li>login as pi / test
5152
<li>sudo apt-get install xrdp
5253
<li><i>to confirm it's working as expected try to connect from a remote computer to the RPi (e.g. from a Windows PC using the "Remote Desktop Connection" tool)</i>
5354
</ul>
55+
-->
5456
<h2>Install NodeJS (here: latest stable version available for RPi: 0.10.28)</h2>
5557
<ul>
5658
<li>login as pi / test
@@ -61,8 +63,8 @@ <h2>Install NodeJS (here: latest stable version available for RPi: 0.10.28)</h2>
6163
<li>sudo cp -r node-v0.10.28-linux-arm-pi/* /opt/node
6264
<li>rm -rf node-v0.10.28-linux-arm-pi/
6365
<li>sudo nano /etc/profile
64-
<p>NODE_JS_HOME="/opt/node"<br/>
65-
PATH="$PATH:$NODE_JS_HOME/bin"<br/>
66+
<p><font color="#FF0000">NODE_JS_HOME="/opt/node"<br/>
67+
PATH="$PATH:$NODE_JS_HOME/bin"</font><br/>
6668
export PATH</p>
6769
<li>sudo reboot
6870
<li><i>to confirm it's working as expected login as pi/test and run "node -v" which should return the installed node version (here: v0.10.28)</i>
@@ -96,6 +98,7 @@ <h2>Install MongoDB</h2>
9698
<li><i>to confirm it's working as expected login as pi/test and run "/opt/mongo/bin/mongo" which should start the mongo shell (type "exit" to close the shell again)</i>
9799
<li><i>if the RPi loses power without proper shutdown while mongod is running, you can't restart without manually removing the pid file first. To do so run “sudo rm /var/lib/mongodb/mongod.lock”</i>
98100
</ul>
101+
<!--
99102
<h2>Install Arduino (and update to latest 1.0.5)</h2>
100103
<ul>
101104
<li>login as pi / test
@@ -128,6 +131,7 @@ <h2>Enable programming via GPIO UART (for serial gateway only)</h2>
128131
<li>cd ..
129132
<li>rm -rf avrdude-rpi-master
130133
</ul>
134+
-->
131135
<h2>Install MySensors from Git branch development (here: password: test)</h2>
132136
<ul>
133137
<li>login as pi / test
@@ -137,7 +141,7 @@ <h2>Install MySensors from Git branch development (here: password: test)</h2>
137141
<li>cd NodeJsController
138142
<li>npm install
139143
<li>nano NodeJsController.js (optional : removing sample firmwares)
140-
<p>const fwHexFiles = [ ];</p>
144+
<p>const fwHexFiles = <font color="#FF0000">[ ]</font>;</p>
141145
<li><i>to confirm that the NodeJsController is working as expected and connects to the local mongo DB: "node NodeJsController.js" which should start the controller, connect to the database and run into an error connecting to the gateway. Stop node again via Ctrl-c</i>
142146
</ul>
143147
<h2>Start NodeJsController on boot</h2>
@@ -151,6 +155,7 @@ <h2>Start NodeJsController on boot</h2>
151155
<li>sudo reboot
152156
<li><i>to confirm that NodeJsController is starting at boot, check the log file /home/pi/logs/NodeJsController.log</i>
153157
</ul>
158+
<!--
154159
<h2>Configure Arduino</h2>
155160
<ul>
156161
<li>start graphical UI (startx on RPi or via RDP)
@@ -163,11 +168,12 @@ <h2>Configure Arduino</h2>
163168
</ul>
164169
<li>Close Arduino IDE
165170
</ul>
171+
-->
166172

167173
<h1>Serial Gateway</h1>
168174
<h2>Hardware</h2>
169175
<ul>
170-
<li>as described for the standard Serial Gateway
176+
<li>as described for the standard Serial Gateway - using the standard Serial Gateway sketch with DEBUG (in MyConfig.h) disabled
171177
<li>I'm using the version with inclusion mode button and LEDs based on no Arduino but a plain ATmega328p on a breadboard
172178
<li>Connect directly to the serial GPIO pins of the RPi:
173179
<p>Arduino GND <-> Raspberry Pi GND (pin 6)<br/>
@@ -176,17 +182,18 @@ <h2>Hardware</h2>
176182
Arduino RESET <-> Raspberry Pi GPIO22 (pin 15)</p>
177183
<li>Right now I'm using a separate power supply for the serial gateway instead of the 3.3V or 5V pins of the RPi because I ran in some issues with power consumption during programming
178184
</ul>
179-
<h2>Disable default use of serial port</h2>
185+
<h2>Disable default use of RPi serial port</h2>
180186
<ul>
181187
<li>sudo nano /etc/inittab
182-
<p>#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100</p>
188+
<p><font color="#FF0000">#</font>T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100</p>
183189
<li>sudo nano /boot/cmdline.txt - remove part of the file:
184-
<p>console=ttyAMA0,115200</p>
190+
<p><font color="#FF0000"><strike>console=ttyAMA0,115200</strike></font></p>
185191
<li>cd /dev
186192
<li>sudo ln -s ttyAMA0 ttyUSB9
187193
<li>sudo apt-get install minicom
188194
<li>sudo reboot
189195
</ul>
196+
<!--
190197
<h2>Flash (assuming that the ATmega has a valid Arduino bootloader installed)</h2>
191198
<ul>
192199
<li>login as pi / test
@@ -198,30 +205,33 @@ <h2>Flash (assuming that the ATmega has a valid Arduino bootloader installed)</h
198205
<li>File - Upload
199206
</ul>
200207
</ul>
208+
-->
201209
<h2>Setup NodeJsController</h2>
202210
<ul>
203211
<li>nano ~/Arduino/NodeJsController/NodeJsController.js
204-
<p>//const gwType = 'Ethernet';<br/>
205-
//const gwAddress = '10.0.1.99';<br/>
206-
//const gwPort = 9999;<br/>
207-
const gwType = 'Serial';<br/>
208-
const gwPort = '/dev/ttyAMA0';<br/>
209-
const gwBaud = 115200;</p>
212+
<p><font color="#FF0000">//</font>const gwType = 'Ethernet';<br/>
213+
<font color="#FF0000">//</font>const gwAddress = '10.0.1.99';<br/>
214+
<font color="#FF0000">//</font>const gwPort = 9999;<br/>
215+
<font color="#FF0000"><strike>//</strike></font>const gwType = 'Serial';<br/>
216+
<font color="#FF0000"><strike>//</strike></font>const gwPort = '<font color="#FF0000">/dev/ttyAMA0</font>';<br/>
217+
<font color="#FF0000"><strike>//</strike></font>const gwBaud = 115200;</p>
210218
<li>sudo service mysensors restart
211219
</ul>
212220

213221
<h1>Ethernet Gateway</h1>
214222
<h2>Hardware</h2>
215223
<ul>
216-
<li>as described for the standard Ethernet Gateway
224+
<li>as described for the standard Ethernet Gateway - using the standard Ethernet Gateway sketch with DEBUG (in MyConfig.h) disabled
217225
<li>I'm using the version with inclusion mode button and LEDs based on no Arduino but a plain ATmega328p on a breadboard and the ENC28J60 Ethernet module
226+
<li>here: 10.0.1.99 / port: 9999
218227
</ul>
228+
<!--
219229
<h2>Adjust Sourcecode (here: address 10.0.1.99 / port: 9999)</h2>
220230
<ul>
221231
<li>[I you are running into compilation errors due to missing files in the utility directory, do the following]
222232
cp -R ~/Arduino/libraries/UIPEthernet/src/utility ~/Arduino/libraries/UIPEthernet/utility
223233
<li>nano ~/Arduino/libraries/MySensors/MyConfig.h
224-
<p>//#define DEBUG</p>
234+
<p><font color="#FF0000">//</font>#define DEBUG</p>
225235
<li>start Arduino IDE
226236
<ul>
227237
<li>File - Sketchbook - EthernetGateway
@@ -247,10 +257,11 @@ <h2>Flash (assuming that the ATmega has a valid Arduino bootloader installed)</h
247257
<li>File - Upload
248258
</ul>
249259
</ul>
260+
-->
250261
<h2>Setup NodeJsController</h2>
251262
<ul>
252263
<li>nano ~/Arduino/NodeJsController/NodeJsController.js
253-
<p>const gwAddress = '10.0.1.99';</p>
264+
<p>const gwAddress = '<font color="#FF0000">10.0.1.99</font>';</p>
254265
<li>sudo service mysensors restart
255266
</ul>
256267

0 commit comments

Comments
 (0)