· 10 years ago · Aug 23, 2016, 06:30 PM
1mv-mbp:~ mv$ cd projects/
2mv-mbp:projects mv$ ls
3SLA-test isbn pmvester
4cc2650ibmiotf node pmvester.zip
5cloudant pipo tmp
6iphone pmv-coursera-iot workspace
7mv-mbp:projects mv$ cd isbn/
8mv-mbp:isbn mv$ ls
9isbn-numbers.txt isbn.py
10isbn-numbers.txt-mv160221 json.txt
11isbn-scanner.py
12mv-mbp:isbn mv$ python isbn.py
139780091938086not in Libris DB
14
15A Wanted Man
16Harry Potter and the philosopher's stone
17Personal
18Jarhead : a Marine's chronicle of the Gulf War and other battles
199781841957869not in Libris DB
20
21Grisfesten : [en rövarroman]
22Profitörerna
23Samhällsbärarna : [en roman om ett brott]
24Linda - som i Lindamordet : roman om ett brott
25Svensk maffia : en kartläggning av de kriminella gängen
26Welcome to the Jungle : legenden om Guns N' Roses
27Gatans lag
28Den stora bankhärvan : finansparet Hagströmer och Qvibergs uppgång och fall
29Tärningsspelaren
30Skjut apelsinen
31Det var inte mitt fel! : om konsten att ta ansvar
32Odjuret
33Box 21
34Flickan som lekte med elden : [en kriminalroman]
35NÃ¥gon sorts extas
36Jakten mot nollpunkten : [en roman om mig själv]
37Jordens Väktare : custodes orbis
38Hanteringen av odöda
39K2 - på liv och död
40Porr : en bästsäljande historia
41Misstaget : [en Jack Reacher-thriller]
42Den dolda alliansen : Sveriges hemliga NATO-förbindelser
43Den besynnerliga händelsen med hunden om natten
44Min mormor hälsar och säger förlåt
45Attack! : mitt liv som kommandosoldat
46Warszawas bödel : ett tyskt öde
47Kollektivt självmord
48Kamikaze : japans självmordspiloter
49Blackout
50Edward Finnigans upprättelse
51Flickan under gatan
52Vietnamkrigen 1880-1980
53Salvekvick och kvacksalveri : alternativmedicinen under luppen
54Tre sekunder
55Hundraåringen som klev ut genom fönstret och försvann
56Jägare : bakom fiendens linjer
57Gängmedlem : en annan sida av Sverige
58Konsten att tala med en änkling [Ljudupptagning]
59Fördelarna med en kollaps
60Metro 2033 : den sista tillflykten
61(Geim)
62Brobyggarna
63Tito : folkets diktator
64(Bubble)
65Flykten från Läger 14 : den dramatiska rymningen från ett nordkoreanskt fångläger
66Överklassen i Sverige
67Brev till samhället
68mv-mbp:isbn mv$ ls
69isbn-numbers.txt isbn.py
70isbn-numbers.txt-mv160221 json.txt
71isbn-scanner.py
72mv-mbp:isbn mv$ cat isbn.py
73import json, sys, urllib2;
74
75def isbn_query( isbn_number ):
76 req = urllib2.Request('http://libris.kb.se/xsearch?query=' + isbn_number + '&format=json')
77 response = urllib2.urlopen(req)
78 data = json.load(response)
79 xs = data['xsearch']
80 if xs['records'] > 0:
81 li = xs['list']
82 print li[0]['title']
83 else:
84 print isbn_number + 'not in Libris DB\n'
85 return;
86
87with open('isbn-numbers.txt') as f:
88 lines = f.readlines()
89
90for l in lines:
91 isbn_query(l.strip());
92
93mv-mbp:isbn mv$
94mv-mbp:isbn mv$
95mv-mbp:isbn mv$
96mv-mbp:isbn mv$ ls
97isbn-numbers.txt isbn.py
98isbn-numbers.txt-mv160221 json.txt
99isbn-scanner.py
100mv-mbp:isbn mv$ cat isbn-scanner.py
101import json, sys, urllib2;
102
103def isbn_query( isbn_number ):
104 req = urllib2.Request('http://libris.kb.se/xsearch?query=' + isbn_number + '&format=json')
105 response = urllib2.urlopen(req)
106 data = json.load(response)
107 xs = data['xsearch']
108 if xs['records'] > 0:
109 li = xs['list']
110 print li[0]['title'] + ', ' + li[0]['creator']
111 else:
112 print isbn_number + 'not in Libris DB\n'
113 return;
114
115#with open('isbn-numbers.txt') as f:
116# lines = f.readlines()
117#
118#for l in lines:
119# isbn_query(l.strip());
120#
121
122#isbn_query(input())
123
124one = 1
125
126while one == 1:
127 s = raw_input()
128 isbn_query(s.strip())
129print 'good bye'
130mv-mbp:isbn mv$ ls
131isbn-numbers.txt isbn.py
132isbn-numbers.txt-mv160221 json.txt
133isbn-scanner.py
134mv-mbp:isbn mv$ cp json.txt text.json
135mv-mbp:isbn mv$ rm text.json
136mv-mbp:isbn mv$ ls
137isbn-numbers.txt isbn.py
138isbn-numbers.txt-mv160221 json.txt
139isbn-scanner.py
140mv-mbp:isbn mv$ grep json *.py
141isbn-scanner.py:import json, sys, urllib2;
142isbn-scanner.py: req = urllib2.Request('http://libris.kb.se/xsearch?query=' + isbn_number + '&format=json')
143isbn-scanner.py: data = json.load(response)
144isbn.py:import json, sys, urllib2;
145isbn.py: req = urllib2.Request('http://libris.kb.se/xsearch?query=' + isbn_number + '&format=json')
146isbn.py: data = json.load(response)
147mv-mbp:isbn mv$
148mv-mbp:isbn mv$
149mv-mbp:isbn mv$
150mv-mbp:isbn mv$ pwd
151/Users/mv/projects/isbn
152mv-mbp:isbn mv$ cd
153mv-mbp:~ mv$ cd projects/
154mv-mbp:projects mv$ ls
155SLA-test isbn pmvester
156cc2650ibmiotf node pmvester.zip
157cloudant pipo tmp
158iphone pmv-coursera-iot workspace
159mv-mbp:projects mv$ cd pmv-coursera-iot/
160mv-mbp:pmv-coursera-iot mv$ ls
161app-dev-bluemix assignment3.txt bluemix-app-skeleton
162assignment1.txt assignment5.txt pmv-coursera-week4
163assignment2.txt assignment8.py
164mv-mbp:pmv-coursera-iot mv$ cd pmv-coursera-week4/
165mv-mbp:pmv-coursera-week4 mv$ ls
166README.md assignment7.js package.json
167application.js manifest.yml server.js
168assignment6.js manifest.yml-mv160811 service.js
169mv-mbp:pmv-coursera-week4 mv$ view assignment6.js
170mv-mbp:pmv-coursera-week4 mv$ view assignment7.js
171mv-mbp:pmv-coursera-week4 mv$ pwd
172/Users/mv/projects/pmv-coursera-iot/pmv-coursera-week4
173mv-mbp:pmv-coursera-week4 mv$
174mv-mbp:pmv-coursera-week4 mv$
175mv-mbp:pmv-coursera-week4 mv$
176mv-mbp:pmv-coursera-week4 mv$ ls
177README.md assignment7.js package.json
178application.js manifest.yml server.js
179assignment6.js manifest.yml-mv160811 service.js
180mv-mbp:pmv-coursera-week4 mv$ cd
181mv-mbp:~ mv$ cd .node-gyp/
182mv-mbp:.node-gyp mv$ ls
1830.12.7
184mv-mbp:.node-gyp mv$ cd
185mv-mbp:~ mv$ pwd
186/Users/mv
187mv-mbp:~ mv$ cd projects/
188mv-mbp:projects mv$ ls
189SLA-test isbn pmvester
190cc2650ibmiotf node pmvester.zip
191cloudant pipo tmp
192iphone pmv-coursera-iot workspace
193mv-mbp:projects mv$ cd ..
194mv-mbp:~ mv$ cd .node-gyp/0.12.7/
195mv-mbp:0.12.7 mv$ ls
196common.gypi deps installVersion src tools
197mv-mbp:0.12.7 mv$ cd
198mv-mbp:~ mv$ ssh pi3
199
200The programs included with the Debian GNU/Linux system are free software;
201the exact distribution terms for each program are described in the
202individual files in /usr/share/doc/*/copyright.
203
204Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
205permitted by applicable law.
206Last login: Mon Aug 22 10:22:28 2016 from 10.0.1.3
207pi@mv-pi3:~ $ cd .node-red/
208pi@mv-pi3:~/.node-red $ ls
209flows_mv-pi3.json flows_mv-pi3_cred.json lib node_modules settings.js
210pi@mv-pi3:~/.node-red $
211pi@mv-pi3:~/.node-red $
212pi@mv-pi3:~/.node-red $
213pi@mv-pi3:~/.node-red $ cd
214pi@mv-pi3:~ $ node-red stop
215
216
217Welcome to Node-RED
218===================
219
22022 Aug 18:08:35 - [info] Node-RED version: v0.13.4
22122 Aug 18:08:35 - [info] Node.js version: v0.10.29
22222 Aug 18:08:35 - [info] Linux 4.4.14-v7+ arm LE
22322 Aug 18:08:35 - [info] Loading palette nodes
22422 Aug 18:08:39 - [info] Settings file : /home/pi/.node-red/settings.js
22522 Aug 18:08:39 - [info] User directory : /home/pi/.node-red
22622 Aug 18:08:39 - [info] Flows file : /home/pi/.node-red/stop
22722 Aug 18:08:39 - [info] Creating new flow file
22822 Aug 18:08:40 - [info] Starting flows
22922 Aug 18:08:40 - [info] Started flows
23022 Aug 18:08:40 - [warn] Communication server error: Error: listen EADDRINUSE
23122 Aug 18:08:40 - [error] Unable to listen on http://127.0.0.1:1880/
23222 Aug 18:08:40 - [error] Error: port in use
233pi@mv-pi3:~ $ node-red start
234
235
236Welcome to Node-RED
237===================
238
23922 Aug 18:08:54 - [info] Node-RED version: v0.13.4
24022 Aug 18:08:54 - [info] Node.js version: v0.10.29
24122 Aug 18:08:54 - [info] Linux 4.4.14-v7+ arm LE
24222 Aug 18:08:54 - [info] Loading palette nodes
24322 Aug 18:08:59 - [info] Settings file : /home/pi/.node-red/settings.js
24422 Aug 18:08:59 - [info] User directory : /home/pi/.node-red
24522 Aug 18:08:59 - [info] Flows file : /home/pi/.node-red/start
24622 Aug 18:08:59 - [info] Creating new flow file
24722 Aug 18:08:59 - [info] Starting flows
24822 Aug 18:08:59 - [info] Started flows
24922 Aug 18:08:59 - [warn] Communication server error: Error: listen EADDRINUSE
25022 Aug 18:08:59 - [error] Unable to listen on http://127.0.0.1:1880/
25122 Aug 18:08:59 - [error] Error: port in use
252pi@mv-pi3:~ $ node-red stop
253
254
255Welcome to Node-RED
256===================
257
25822 Aug 18:09:16 - [info] Node-RED version: v0.13.4
25922 Aug 18:09:16 - [info] Node.js version: v0.10.29
26022 Aug 18:09:16 - [info] Linux 4.4.14-v7+ arm LE
26122 Aug 18:09:16 - [info] Loading palette nodes
26222 Aug 18:09:21 - [info] Settings file : /home/pi/.node-red/settings.js
26322 Aug 18:09:21 - [info] User directory : /home/pi/.node-red
26422 Aug 18:09:21 - [info] Flows file : /home/pi/.node-red/stop
26522 Aug 18:09:21 - [info] Creating new flow file
26622 Aug 18:09:21 - [info] Starting flows
26722 Aug 18:09:21 - [info] Started flows
26822 Aug 18:09:21 - [warn] Communication server error: Error: listen EADDRINUSE
26922 Aug 18:09:21 - [error] Unable to listen on http://127.0.0.1:1880/
27022 Aug 18:09:21 - [error] Error: port in use
271pi@mv-pi3:~ $ sudo reboot
272Connection to 10.0.1.125 closed by remote host.
273Connection to 10.0.1.125 closed.
274mv-mbp:~ mv$ ssh pi3
275
276The programs included with the Debian GNU/Linux system are free software;
277the exact distribution terms for each program are described in the
278individual files in /usr/share/doc/*/copyright.
279
280Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
281permitted by applicable law.
282Last login: Mon Aug 22 18:09:55 2016
283pi@mv-pi3:~ $ node-red status
284
285
286Welcome to Node-RED
287===================
288
28922 Aug 18:10:36 - [info] Node-RED version: v0.13.4
29022 Aug 18:10:36 - [info] Node.js version: v0.10.29
29122 Aug 18:10:36 - [info] Linux 4.4.14-v7+ arm LE
29222 Aug 18:10:36 - [info] Loading palette nodes
29322 Aug 18:10:41 - [info] Settings file : /home/pi/.node-red/settings.js
29422 Aug 18:10:41 - [info] User directory : /home/pi/.node-red
29522 Aug 18:10:41 - [info] Flows file : /home/pi/.node-red/status
29622 Aug 18:10:41 - [info] Creating new flow file
29722 Aug 18:10:41 - [info] Starting flows
29822 Aug 18:10:41 - [info] Started flows
29922 Aug 18:10:42 - [warn] Communication server error: Error: listen EADDRINUSE
30022 Aug 18:10:42 - [error] Unable to listen on http://127.0.0.1:1880/
30122 Aug 18:10:42 - [error] Error: port in use
302pi@mv-pi3:~ $ node-red stop
303
304
305Welcome to Node-RED
306===================
307
30822 Aug 18:10:59 - [info] Node-RED version: v0.13.4
30922 Aug 18:10:59 - [info] Node.js version: v0.10.29
31022 Aug 18:10:59 - [info] Linux 4.4.14-v7+ arm LE
31122 Aug 18:10:59 - [info] Loading palette nodes
31222 Aug 18:11:04 - [info] Settings file : /home/pi/.node-red/settings.js
31322 Aug 18:11:04 - [info] User directory : /home/pi/.node-red
31422 Aug 18:11:04 - [info] Flows file : /home/pi/.node-red/stop
31522 Aug 18:11:04 - [info] Creating new flow file
31622 Aug 18:11:04 - [info] Starting flows
31722 Aug 18:11:04 - [info] Started flows
31822 Aug 18:11:04 - [warn] Communication server error: Error: listen EADDRINUSE
31922 Aug 18:11:04 - [error] Unable to listen on http://127.0.0.1:1880/
32022 Aug 18:11:04 - [error] Error: port in use
321pi@mv-pi3:~ $ netstat -a
322Active Internet connections (servers and established)
323Proto Recv-Q Send-Q Local Address Foreign Address State
324tcp 0 0 *:5901 *:* LISTEN
325tcp 0 0 *:x11-1 *:* LISTEN
326tcp 0 0 *:ssh *:* LISTEN
327tcp 0 0 *:1880 *:* LISTEN
328tcp 0 0 10.0.1.125:1880 10.0.1.12:55928 ESTABLISHED
329tcp 0 0 10.0.1.125:39854 d4.a9.089f.ip4.sta:8883 ESTABLISHED
330tcp 0 172 10.0.1.125:ssh 10.0.1.43:50880 ESTABLISHED
331tcp 0 0 10.0.1.125:39856 d4.a9.089f.ip4.sta:8883 ESTABLISHED
332tcp6 0 0 [::]:ssh [::]:* LISTEN
333udp 0 0 *:bootpc *:*
334udp 0 0 10.0.1.125:ntp *:*
335udp 0 0 localhost:ntp *:*
336udp 0 0 *:ntp *:*
337udp 0 0 *:mdns *:*
338udp 0 0 *:60956 *:*
339udp6 0 0 fe80::15ee:56e1:bf3:ntp [::]:*
340udp6 0 0 localhost:ntp [::]:*
341udp6 0 0 [::]:ntp [::]:*
342udp6 0 0 [::]:mdns [::]:*
343udp6 0 0 [::]:46374 [::]:*
344raw6 0 0 [::]:ipv6-icmp [::]:* 7
345Active UNIX domain sockets (servers and established)
346Proto RefCnt Flags Type State I-Node Path
347unix 2 [ ] DGRAM 10170 /tmp/libdhcpcd-wpa-888.1
348unix 2 [ ACC ] STREAM LISTENING 9664 @/tmp/.X11-unix/X0
349unix 2 [ ACC ] STREAM LISTENING 9665 /tmp/.X11-unix/X0
350unix 2 [ ] DGRAM 6184 /run/systemd/notify
351unix 2 [ ACC ] STREAM LISTENING 6186 /run/systemd/private
352unix 2 [ ACC ] STREAM LISTENING 7979 /var/run/dhcpcd.sock
353unix 2 [ ACC ] STREAM LISTENING 7981 /var/run/dhcpcd.unpriv.sock
354unix 2 [ ] DGRAM 6199 /run/systemd/shutdownd
355unix 2 [ ACC ] STREAM LISTENING 8761 /var/run/avahi-daemon/socket
356unix 2 [ ACC ] STREAM LISTENING 8764 /var/run/dbus/system_bus_socket
357unix 15 [ ] DGRAM 6204 /run/systemd/journal/dev-log
358unix 2 [ ACC ] SEQPACKET LISTENING 6208 /run/udev/control
359unix 2 [ ACC ] STREAM LISTENING 6212 /run/systemd/journal/stdout
360unix 6 [ ] DGRAM 6214 /run/systemd/journal/socket
361unix 2 [ ACC ] STREAM LISTENING 12608 /tmp/ssh-3Ou0XQkxdxNb/agent.906
362unix 2 [ ACC ] STREAM LISTENING 9733 /tmp/.X11-unix/X1
363unix 6 [ ] DGRAM 9312 /var/run/wpa_supplicant/wlan0
364unix 2 [ ACC ] STREAM LISTENING 10698 /tmp/ssh-lFd6B6DnEtLs/agent.904
365unix 2 [ ACC ] STREAM LISTENING 11513 /tmp/ssh-fmhnpaElZcq6/agent.711
366unix 2 [ ACC ] STREAM LISTENING 12643 /tmp/.pcmanfm-socket--1-pi
367unix 2 [ ACC ] STREAM LISTENING 10873 /tmp/.menu-cached-:1-pi
368unix 2 [ ACC ] STREAM LISTENING 12752 /tmp/.menu-cached-:0-pi
369unix 2 [ ] DGRAM 10888 /tmp/libdhcpcd-wpa-889.0
370unix 2 [ ] DGRAM 9366 /var/run/thd.socket
371unix 2 [ ACC ] STREAM LISTENING 11536 @/tmp/dbus-tzIAhnjrG8
372unix 2 [ ACC ] STREAM LISTENING 12486 /tmp/ssh-w2LHbtl3ydfT/agent.803
373unix 2 [ ] DGRAM 10889 /tmp/libdhcpcd-wpa-889.1
374unix 2 [ ACC ] STREAM LISTENING 11708 /tmp/.pcmanfm-socket--0-pi
375unix 2 [ ] DGRAM 10169 /tmp/libdhcpcd-wpa-888.0
376unix 2 [ ACC ] STREAM LISTENING 11520 @/tmp/dbus-pOBqp5jHLl
377unix 2 [ ] DGRAM 8178 /run/user/1000/systemd/notify
378unix 2 [ ACC ] STREAM LISTENING 8180 /run/user/1000/systemd/private
379unix 2 [ ] DGRAM 1278 /run/systemd/journal/syslog
380unix 3 [ ] STREAM CONNECTED 11713
381unix 3 [ ] STREAM CONNECTED 7103 /run/systemd/journal/stdout
382unix 3 [ ] STREAM CONNECTED 12491
383unix 3 [ ] STREAM CONNECTED 7056 /var/run/dbus/system_bus_socket
384unix 3 [ ] STREAM CONNECTED 10598 @/tmp/dbus-pOBqp5jHLl
385unix 3 [ ] STREAM CONNECTED 10956
386unix 3 [ ] STREAM CONNECTED 11730 /run/systemd/journal/stdout
387unix 3 [ ] STREAM CONNECTED 11727 @/tmp/.X11-unix/X0
388unix 3 [ ] STREAM CONNECTED 10821
389unix 3 [ ] STREAM CONNECTED 12716
390unix 3 [ ] STREAM CONNECTED 9374
391unix 3 [ ] STREAM CONNECTED 7028
392unix 3 [ ] STREAM CONNECTED 12635
393unix 3 [ ] STREAM CONNECTED 12498 /run/systemd/journal/stdout
394unix 3 [ ] STREAM CONNECTED 10079
395unix 3 [ ] STREAM CONNECTED 10737
396unix 3 [ ] STREAM CONNECTED 11475
397unix 3 [ ] STREAM CONNECTED 10138 /tmp/.menu-cached-:0-pi
398unix 3 [ ] STREAM CONNECTED 11863 /run/systemd/journal/stdout
399unix 3 [ ] STREAM CONNECTED 12683
400unix 3 [ ] STREAM CONNECTED 9483
401unix 3 [ ] STREAM CONNECTED 7054
402unix 3 [ ] STREAM CONNECTED 11696 @/tmp/.X11-unix/X0
403unix 3 [ ] STREAM CONNECTED 12503
404unix 3 [ ] STREAM CONNECTED 10154 /var/run/dbus/system_bus_socket
405unix 3 [ ] STREAM CONNECTED 10592
406unix 3 [ ] STREAM CONNECTED 12342 /run/systemd/journal/stdout
407unix 3 [ ] STREAM CONNECTED 10865 @/tmp/dbus-tzIAhnjrG8
408unix 3 [ ] DGRAM 11770
409unix 3 [ ] STREAM CONNECTED 11882 @/tmp/dbus-pOBqp5jHLl
410unix 3 [ ] STREAM CONNECTED 12505 /run/systemd/journal/stdout
411unix 3 [ ] STREAM CONNECTED 10157
412unix 3 [ ] STREAM CONNECTED 12461 @/tmp/.X11-unix/X0
413unix 3 [ ] STREAM CONNECTED 8929
414unix 3 [ ] STREAM CONNECTED 10738 /tmp/.X11-unix/X1
415unix 3 [ ] STREAM CONNECTED 10887
416unix 3 [ ] STREAM CONNECTED 10791 @/tmp/dbus-tzIAhnjrG8
417unix 3 [ ] STREAM CONNECTED 10703
418unix 3 [ ] STREAM CONNECTED 8930 /run/systemd/journal/stdout
419unix 3 [ ] STREAM CONNECTED 10127 @/dbus-vfs-daemon/socket-Zk2W3rOS
420unix 3 [ ] STREAM CONNECTED 12740
421unix 3 [ ] STREAM CONNECTED 11898
422unix 3 [ ] STREAM CONNECTED 10848 /run/systemd/journal/stdout
423unix 3 [ ] STREAM CONNECTED 8074 /run/systemd/journal/stdout
424unix 3 [ ] STREAM CONNECTED 11554 @/tmp/.X11-unix/X0
425unix 3 [ ] STREAM CONNECTED 12756
426unix 3 [ ] STREAM CONNECTED 10787 /var/run/dbus/system_bus_socket
427unix 3 [ ] STREAM CONNECTED 10139
428unix 3 [ ] STREAM CONNECTED 10704 /tmp/.X11-unix/X1
429unix 3 [ ] STREAM CONNECTED 10884
430unix 3 [ ] STREAM CONNECTED 12675
431unix 3 [ ] STREAM CONNECTED 12684
432unix 3 [ ] STREAM CONNECTED 12493 @/tmp/.X11-unix/X0
433unix 3 [ ] STREAM CONNECTED 12693
434unix 3 [ ] STREAM CONNECTED 9829 /var/run/dbus/system_bus_socket
435unix 3 [ ] DGRAM 6360
436unix 3 [ ] STREAM CONNECTED 11861 /run/systemd/journal/stdout
437unix 2 [ ] DGRAM 10537
438unix 3 [ ] STREAM CONNECTED 10152
439unix 3 [ ] STREAM CONNECTED 9832 /tmp/.X11-unix/X1
440unix 3 [ ] STREAM CONNECTED 10870 @/dbus-vfs-daemon/socket-uKuC3ubi
441unix 3 [ ] STREAM CONNECTED 12718 @/tmp/dbus-tzIAhnjrG8
442unix 3 [ ] STREAM CONNECTED 9897 /tmp/.X11-unix/X1
443unix 3 [ ] STREAM CONNECTED 9863
444unix 3 [ ] STREAM CONNECTED 12487 @/tmp/.X11-unix/X0
445unix 3 [ ] STREAM CONNECTED 12463
446unix 3 [ ] STREAM CONNECTED 11854
447unix 3 [ ] STREAM CONNECTED 10826 /run/systemd/journal/stdout
448unix 3 [ ] STREAM CONNECTED 12737
449unix 3 [ ] STREAM CONNECTED 12636 /var/run/dbus/system_bus_socket
450unix 3 [ ] STREAM CONNECTED 11881 /run/systemd/journal/stdout
451unix 3 [ ] STREAM CONNECTED 10811 @/tmp/dbus-tzIAhnjrG8
452unix 3 [ ] STREAM CONNECTED 7055 /var/run/dbus/system_bus_socket
453unix 3 [ ] STREAM CONNECTED 10788
454unix 2 [ ] DGRAM 9372
455unix 3 [ ] STREAM CONNECTED 11858
456unix 3 [ ] STREAM CONNECTED 10823 /run/systemd/journal/stdout
457unix 3 [ ] STREAM CONNECTED 12633
458unix 3 [ ] STREAM CONNECTED 10867 @/tmp/dbus-pOBqp5jHLl
459unix 3 [ ] STREAM CONNECTED 11848
460unix 3 [ ] STREAM CONNECTED 8969 /run/systemd/journal/stdout
461unix 3 [ ] STREAM CONNECTED 9954 /tmp/.X11-unix/X1
462unix 3 [ ] STREAM CONNECTED 10098
463unix 2 [ ] DGRAM 11738
464unix 3 [ ] STREAM CONNECTED 9955
465unix 3 [ ] STREAM CONNECTED 9866
466unix 3 [ ] STREAM CONNECTED 10969
467unix 3 [ ] STREAM CONNECTED 12753 @/tmp/dbus-pOBqp5jHLl
468unix 3 [ ] STREAM CONNECTED 11757 /run/systemd/journal/stdout
469unix 3 [ ] STREAM CONNECTED 7021 /run/systemd/journal/stdout
470unix 3 [ ] STREAM CONNECTED 12778
471unix 3 [ ] STREAM CONNECTED 11459
472unix 3 [ ] STREAM CONNECTED 12506 /run/systemd/journal/stdout
473unix 3 [ ] STREAM CONNECTED 12490
474unix 3 [ ] STREAM CONNECTED 8986
475unix 3 [ ] STREAM CONNECTED 12648 @/tmp/dbus-pOBqp5jHLl
476unix 3 [ ] STREAM CONNECTED 11904 /tmp/.menu-cached-:1-pi
477unix 3 [ ] STREAM CONNECTED 12695
478unix 3 [ ] STREAM CONNECTED 10853
479unix 3 [ ] STREAM CONNECTED 10589
480unix 3 [ ] STREAM CONNECTED 10158 /var/run/dhcpcd.unpriv.sock
481unix 3 [ ] STREAM CONNECTED 12746 @/dbus-vfs-daemon/socket-EyagiNTp
482unix 3 [ ] STREAM CONNECTED 9957 /var/run/dbus/system_bus_socket
483unix 3 [ ] STREAM CONNECTED 10607 @/tmp/dbus-pOBqp5jHLl
484unix 3 [ ] STREAM CONNECTED 6939
485unix 3 [ ] STREAM CONNECTED 9783 /var/run/dbus/system_bus_socket
486unix 3 [ ] STREAM CONNECTED 10137
487unix 3 [ ] STREAM CONNECTED 12702
488unix 3 [ ] STREAM CONNECTED 9961 /var/run/dbus/system_bus_socket
489unix 3 [ ] STREAM CONNECTED 10840 /run/systemd/journal/stdout
490unix 3 [ ] STREAM CONNECTED 11553
491unix 3 [ ] STREAM CONNECTED 10847
492unix 3 [ ] STREAM CONNECTED 8892 /run/systemd/journal/stdout
493unix 3 [ ] STREAM CONNECTED 10786
494unix 3 [ ] DGRAM 6361
495unix 3 [ ] STREAM CONNECTED 8967
496unix 3 [ ] STREAM CONNECTED 10795
497unix 3 [ ] STREAM CONNECTED 11636 @/tmp/.X11-unix/X0
498unix 3 [ ] STREAM CONNECTED 10883 /tmp/.X11-unix/X1
499unix 3 [ ] STREAM CONNECTED 10105
500unix 2 [ ] DGRAM 6845
501unix 3 [ ] STREAM CONNECTED 10159 /var/run/dhcpcd.unpriv.sock
502unix 2 [ ] STREAM CONNECTED 12744 @/dbus-vfs-daemon/socket-FEHvVzKg
503unix 3 [ ] STREAM CONNECTED 10316 /var/run/dbus/system_bus_socket
504unix 2 [ ] DGRAM 9836
505unix 3 [ ] DGRAM 11771
506unix 3 [ ] STREAM CONNECTED 12715
507unix 3 [ ] STREAM CONNECTED 10801 /var/run/dbus/system_bus_socket
508unix 3 [ ] STREAM CONNECTED 10968
509unix 3 [ ] STREAM CONNECTED 11729 /run/systemd/journal/stdout
510unix 3 [ ] STREAM CONNECTED 12499 /run/systemd/journal/stdout
511unix 3 [ ] STREAM CONNECTED 11526
512unix 3 [ ] STREAM CONNECTED 10849 @/tmp/dbus-pOBqp5jHLl
513unix 3 [ ] STREAM CONNECTED 11860 /run/systemd/journal/stdout
514unix 3 [ ] STREAM CONNECTED 10822
515unix 3 [ ] STREAM CONNECTED 9828
516unix 3 [ ] STREAM CONNECTED 9864 /tmp/.X11-unix/X1
517unix 2 [ ] DGRAM 1282
518unix 3 [ ] STREAM CONNECTED 11699 @/tmp/.X11-unix/X0
519unix 3 [ ] STREAM CONNECTED 12517 @/tmp/dbus-pOBqp5jHLl
520unix 2 [ ] DGRAM 9667
521unix 3 [ ] STREAM CONNECTED 11877 @/tmp/dbus-pOBqp5jHLl
522unix 3 [ ] STREAM CONNECTED 9865
523unix 3 [ ] STREAM CONNECTED 10866
524unix 2 [ ] DGRAM 9362
525unix 3 [ ] STREAM CONNECTED 11758 /run/systemd/journal/stdout
526unix 3 [ ] STREAM CONNECTED 11551
527unix 3 [ ] STREAM CONNECTED 7053
528unix 3 [ ] STREAM CONNECTED 7057 /var/run/dbus/system_bus_socket
529unix 3 [ ] STREAM CONNECTED 11849 @/tmp/dbus-tzIAhnjrG8
530unix 3 [ ] STREAM CONNECTED 10812
531unix 3 [ ] STREAM CONNECTED 10796
532unix 3 [ ] STREAM CONNECTED 12704
533unix 3 [ ] STREAM CONNECTED 12775 @/tmp/.X11-unix/X0
534unix 3 [ ] STREAM CONNECTED 10603
535unix 3 [ ] STREAM CONNECTED 12625
536unix 3 [ ] STREAM CONNECTED 10743
537unix 3 [ ] STREAM CONNECTED 9379
538unix 3 [ ] STREAM CONNECTED 7964 /run/systemd/journal/stdout
539unix 3 [ ] STREAM CONNECTED 11541
540unix 3 [ ] STREAM CONNECTED 9837
541unix 3 [ ] STREAM CONNECTED 12696 @/tmp/dbus-tzIAhnjrG8
542unix 3 [ ] STREAM CONNECTED 7144
543unix 3 [ ] STREAM CONNECTED 12623
544unix 3 [ ] STREAM CONNECTED 10590
545unix 3 [ ] STREAM CONNECTED 10160
546unix 3 [ ] STREAM CONNECTED 11862 /run/systemd/journal/stdout
547unix 3 [ ] STREAM CONNECTED 9723
548unix 3 [ ] STREAM CONNECTED 11754
549unix 3 [ ] STREAM CONNECTED 12497 @/tmp/dbus-tzIAhnjrG8
550unix 3 [ ] STREAM CONNECTED 12492
551unix 3 [ ] STREAM CONNECTED 10846 /run/systemd/journal/stdout
552unix 3 [ ] STREAM CONNECTED 10366 /run/systemd/journal/stdout
553unix 3 [ ] STREAM CONNECTED 11652
554unix 2 [ ] DGRAM 7983
555unix 3 [ ] STREAM CONNECTED 9356
556unix 3 [ ] STREAM CONNECTED 12651 @/tmp/dbus-pOBqp5jHLl
557unix 3 [ ] STREAM CONNECTED 11843 /run/systemd/journal/stdout
558unix 3 [ ] STREAM CONNECTED 7020
559unix 2 [ ] DGRAM 10305
560unix 3 [ ] STREAM CONNECTED 11726
561unix 3 [ ] STREAM CONNECTED 12694
562unix 3 [ ] STREAM CONNECTED 10886
563unix 3 [ ] STREAM CONNECTED 12504
564unix 3 [ ] STREAM CONNECTED 11471 /var/run/dbus/system_bus_socket
565unix 3 [ ] STREAM CONNECTED 12686
566unix 3 [ ] STREAM CONNECTED 10604
567unix 3 [ ] STREAM CONNECTED 12798 /var/run/dbus/system_bus_socket
568unix 3 [ ] STREAM CONNECTED 11903
569unix 3 [ ] STREAM CONNECTED 11880 /run/systemd/journal/stdout
570unix 3 [ ] STREAM CONNECTED 10082
571unix 3 [ ] STREAM CONNECTED 10742
572unix 3 [ ] STREAM CONNECTED 10060 /var/run/dbus/system_bus_socket
573unix 3 [ ] STREAM CONNECTED 11543
574unix 3 [ ] STREAM CONNECTED 12507 @/tmp/dbus-tzIAhnjrG8
575unix 3 [ ] STREAM CONNECTED 10825 /run/systemd/journal/stdout
576unix 3 [ ] STREAM CONNECTED 11698
577unix 3 [ ] STREAM CONNECTED 10813 @/tmp/dbus-pOBqp5jHLl
578unix 3 [ ] STREAM CONNECTED 12703
579unix 3 [ ] STREAM CONNECTED 11542 @/tmp/.X11-unix/X0
580unix 3 [ ] STREAM CONNECTED 12705 @/tmp/dbus-tzIAhnjrG8
581unix 3 [ ] STREAM CONNECTED 12687 @/tmp/dbus-pOBqp5jHLl
582unix 3 [ ] STREAM CONNECTED 10824 /run/systemd/journal/stdout
583unix 3 [ ] STREAM CONNECTED 10705 /tmp/.X11-unix/X1
584unix 3 [ ] STREAM CONNECTED 9891 @/tmp/dbus-tzIAhnjrG8
585unix 3 [ ] STREAM CONNECTED 9838 /var/run/dbus/system_bus_socket
586unix 3 [ ] STREAM CONNECTED 9844 /tmp/.X11-unix/X1
587unix 2 [ ] DGRAM 12345
588unix 3 [ ] STREAM CONNECTED 11879 /run/systemd/journal/stdout
589unix 2 [ ] DGRAM 10955
590unix 3 [ ] STREAM CONNECTED 10606
591unix 3 [ ] STREAM CONNECTED 12774
592unix 2 [ ] STREAM CONNECTED 11897 @/dbus-vfs-daemon/socket-PEK28iW3
593unix 3 [ ] STREAM CONNECTED 11878 /run/systemd/journal/stdout
594unix 3 [ ] STREAM CONNECTED 10165 /var/run/dhcpcd.unpriv.sock
595unix 2 [ ] DGRAM 8167
596unix 3 [ ] STREAM CONNECTED 10854
597unix 3 [ ] STREAM CONNECTED 10469
598unix 3 [ ] STREAM CONNECTED 10126
599unix 3 [ ] STREAM CONNECTED 9959
600unix 3 [ ] STREAM CONNECTED 10161 /var/run/dhcpcd.unpriv.sock
601unix 3 [ ] STREAM CONNECTED 10140 @/tmp/dbus-tzIAhnjrG8
602unix 3 [ ] STREAM CONNECTED 9896
603unix 3 [ ] STREAM CONNECTED 12578
604unix 3 [ ] STREAM CONNECTED 11813
605unix 3 [ ] STREAM CONNECTED 12741 @/dbus-vfs-daemon/socket-1ldw6Ttv
606unix 2 [ ] DGRAM 9729
607unix 3 [ ] STREAM CONNECTED 11859
608unix 3 [ ] STREAM CONNECTED 10845
609unix 3 [ ] STREAM CONNECTED 10735 @/tmp/dbus-tzIAhnjrG8
610unix 3 [ ] STREAM CONNECTED 9890
611unix 3 [ ] STREAM CONNECTED 9185
612unix 3 [ ] STREAM CONNECTED 11894
613unix 2 [ ] DGRAM 6357
614unix 3 [ ] STREAM CONNECTED 10538
615unix 3 [ ] STREAM CONNECTED 9375
616unix 2 [ ] DGRAM 12647
617unix 3 [ ] STREAM CONNECTED 10155 /var/run/dbus/system_bus_socket
618unix 3 [ ] STREAM CONNECTED 10104
619unix 3 [ ] STREAM CONNECTED 10841 /run/systemd/journal/stdout
620pi@mv-pi3:~ $
621pi@mv-pi3:~ $ node-red stop
622
623
624Welcome to Node-RED
625===================
626
62722 Aug 18:11:38 - [info] Node-RED version: v0.13.4
62822 Aug 18:11:38 - [info] Node.js version: v0.10.29
62922 Aug 18:11:38 - [info] Linux 4.4.14-v7+ arm LE
63022 Aug 18:11:38 - [info] Loading palette nodes
63122 Aug 18:11:43 - [info] Settings file : /home/pi/.node-red/settings.js
63222 Aug 18:11:43 - [info] User directory : /home/pi/.node-red
63322 Aug 18:11:43 - [info] Flows file : /home/pi/.node-red/stop
63422 Aug 18:11:43 - [info] Creating new flow file
63522 Aug 18:11:43 - [info] Starting flows
63622 Aug 18:11:43 - [info] Started flows
63722 Aug 18:11:43 - [warn] Communication server error: Error: listen EADDRINUSE
63822 Aug 18:11:43 - [error] Unable to listen on http://127.0.0.1:1880/
63922 Aug 18:11:43 - [error] Error: port in use
640pi@mv-pi3:~ $ sudo node-red stop
641
642
643Welcome to Node-RED
644===================
645
64622 Aug 18:12:01 - [info] Node-RED version: v0.13.4
64722 Aug 18:12:01 - [info] Node.js version: v0.10.29
64822 Aug 18:12:01 - [info] Linux 4.4.14-v7+ arm LE
64922 Aug 18:12:01 - [info] Loading palette nodes
65022 Aug 18:12:06 - [info] Settings file : /root/.node-red/settings.js
65122 Aug 18:12:06 - [info] User directory : /root/.node-red
65222 Aug 18:12:06 - [info] Flows file : /root/.node-red/stop
65322 Aug 18:12:06 - [info] Creating new flow file
65422 Aug 18:12:06 - [info] Starting flows
65522 Aug 18:12:06 - [info] Started flows
65622 Aug 18:12:06 - [warn] Communication server error: Error: listen EADDRINUSE
65722 Aug 18:12:06 - [error] Unable to listen on http://127.0.0.1:1880/
65822 Aug 18:12:06 - [error] Error: port in use
659pi@mv-pi3:~ $ sudo node-red start
660
661
662Welcome to Node-RED
663===================
664
66522 Aug 18:12:43 - [info] Node-RED version: v0.13.4
66622 Aug 18:12:43 - [info] Node.js version: v0.10.29
66722 Aug 18:12:43 - [info] Linux 4.4.14-v7+ arm LE
66822 Aug 18:12:43 - [info] Loading palette nodes
66922 Aug 18:12:48 - [info] Settings file : /root/.node-red/settings.js
67022 Aug 18:12:48 - [info] User directory : /root/.node-red
67122 Aug 18:12:48 - [info] Flows file : /root/.node-red/start
67222 Aug 18:12:48 - [info] Creating new flow file
67322 Aug 18:12:48 - [info] Starting flows
67422 Aug 18:12:48 - [info] Started flows
67522 Aug 18:12:48 - [warn] Communication server error: Error: listen EADDRINUSE
67622 Aug 18:12:48 - [error] Unable to listen on http://127.0.0.1:1880/
67722 Aug 18:12:48 - [error] Error: port in use
678pi@mv-pi3:~ $ ls
679Desktop
680Documents
681Downloads
682Music
683Pictures
684Public
685Templates
686Videos
687_5595b892de9e7badb28f7927f42fad29_iot-coursera-lesson04python-skeleton.zip
688camera.py
689iot-coursera-lesson04python-skeleton
690projects
691python_games
692tmp
693pi@mv-pi3:~ $ pwd
694/home/pi
695pi@mv-pi3:~ $ cd .node-red/
696pi@mv-pi3:~/.node-red $ ls
697flows_mv-pi3.json flows_mv-pi3_cred.json lib node_modules settings.js
698pi@mv-pi3:~/.node-red $ cd node_modules/
699pi@mv-pi3:~/.node-red/node_modules $ ls
700node-red-node-pi-sense-hat-simulator node-red-node-random
701pi@mv-pi3:~/.node-red/node_modules $ dmesg
702[ 0.000000] Booting Linux on physical CPU 0x0
703[ 0.000000] Initializing cgroup subsys cpuset
704[ 0.000000] Initializing cgroup subsys cpu
705[ 0.000000] Initializing cgroup subsys cpuacct
706[ 0.000000] Linux version 4.4.14-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #896 SMP Sat Jul 2 15:09:43 BST 2016
707[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
708[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
709[ 0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
710[ 0.000000] cma: Reserved 8 MiB at 0x36800000
711[ 0.000000] Memory policy: Data cache writealloc
712[ 0.000000] On node 0 totalpages: 225280
713[ 0.000000] free_area_init_node: node 0, pgdat 808c0e00, node_mem_map b6036000
714[ 0.000000] Normal zone: 1980 pages used for memmap
715[ 0.000000] Normal zone: 0 pages reserved
716[ 0.000000] Normal zone: 225280 pages, LIFO batch:31
717[ 0.000000] [bcm2709_smp_init_cpus] enter (9520->f3003010)
718[ 0.000000] [bcm2709_smp_init_cpus] ncores=4
719[ 0.000000] PERCPU: Embedded 13 pages/cpu @b5ff2000 s22592 r8192 d22464 u53248
720[ 0.000000] pcpu-alloc: s22592 r8192 d22464 u53248 alloc=13*4096
721[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
722[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 223300
723[ 0.000000] Kernel command line: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=480 bcm2709.boardrev=0xa02082 bcm2709.serial=0x99d34cf2 smsc95xx.macaddr=B8:27:EB:D3:4C:F2 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
724[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
725[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
726[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
727[ 0.000000] Memory: 874120K/901120K available (6344K kernel code, 432K rwdata, 1712K rodata, 476K init, 764K bss, 18808K reserved, 8192K cma-reserved)
728[ 0.000000] Virtual kernel memory layout:
729 vector : 0xffff0000 - 0xffff1000 ( 4 kB)
730 fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
731 vmalloc : 0xb7800000 - 0xff800000 (1152 MB)
732 lowmem : 0x80000000 - 0xb7000000 ( 880 MB)
733 modules : 0x7f000000 - 0x80000000 ( 16 MB)
734 .text : 0x80008000 - 0x807e6470 (8058 kB)
735 .init : 0x807e7000 - 0x8085e000 ( 476 kB)
736 .data : 0x8085e000 - 0x808ca108 ( 433 kB)
737 .bss : 0x808cd000 - 0x8098c1ac ( 765 kB)
738[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
739[ 0.000000] Hierarchical RCU implementation.
740[ 0.000000] Build-time adjustment of leaf fanout to 32.
741[ 0.000000] NR_IRQS:16 nr_irqs:16 16
742[ 0.000000] Architected cp15 timer(s) running at 19.20MHz (phys).
743[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
744[ 0.000008] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
745[ 0.000025] Switching to timer-based delay loop, resolution 52ns
746[ 0.000295] Console: colour dummy device 80x30
747[ 0.001346] console [tty1] enabled
748[ 0.001391] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
749[ 0.001459] pid_max: default: 32768 minimum: 301
750[ 0.001797] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
751[ 0.001839] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
752[ 0.002791] Disabling cpuset control group subsystem
753[ 0.002848] Initializing cgroup subsys io
754[ 0.002899] Initializing cgroup subsys memory
755[ 0.002960] Initializing cgroup subsys devices
756[ 0.003002] Initializing cgroup subsys freezer
757[ 0.003045] Initializing cgroup subsys net_cls
758[ 0.003115] CPU: Testing write buffer coherency: ok
759[ 0.003202] ftrace: allocating 21209 entries in 63 pages
760[ 0.052470] CPU0: update cpu_capacity 1024
761[ 0.052537] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
762[ 0.052570] [bcm2709_smp_prepare_cpus] enter
763[ 0.052722] Setting up static identity map for 0x8240 - 0x8274
764[ 0.054377] [bcm2709_boot_secondary] cpu:1 started (0) 18
765[ 0.054728] [bcm2709_secondary_init] enter cpu:1
766[ 0.054769] CPU1: update cpu_capacity 1024
767[ 0.054775] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
768[ 0.055149] [bcm2709_boot_secondary] cpu:2 started (0) 16
769[ 0.055412] [bcm2709_secondary_init] enter cpu:2
770[ 0.055433] CPU2: update cpu_capacity 1024
771[ 0.055439] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
772[ 0.055797] [bcm2709_boot_secondary] cpu:3 started (0) 17
773[ 0.055979] [bcm2709_secondary_init] enter cpu:3
774[ 0.055999] CPU3: update cpu_capacity 1024
775[ 0.056005] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
776[ 0.056066] Brought up 4 CPUs
777[ 0.056164] SMP: Total of 4 processors activated (153.60 BogoMIPS).
778[ 0.056193] CPU: All CPU(s) started in HYP mode.
779[ 0.056219] CPU: Virtualization extensions available.
780[ 0.056867] devtmpfs: initialized
781[ 0.067085] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
782[ 0.067441] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
783[ 0.068199] pinctrl core: initialized pinctrl subsystem
784[ 0.068748] NET: Registered protocol family 16
785[ 0.073933] DMA: preallocated 4096 KiB pool for atomic coherent allocations
786[ 0.081061] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
787[ 0.081110] hw-breakpoint: maximum watchpoint size is 8 bytes.
788[ 0.081291] Serial: AMBA PL011 UART driver
789[ 0.081448] uart-pl011 3f201000.uart: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
790[ 0.081657] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
791[ 0.144617] bcm2835-dma 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0x1
792[ 0.145208] SCSI subsystem initialized
793[ 0.145418] usbcore: registered new interface driver usbfs
794[ 0.145529] usbcore: registered new interface driver hub
795[ 0.145647] usbcore: registered new device driver usb
796[ 0.152026] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-07-05 21:33
797[ 0.179190] clocksource: Switched to clocksource arch_sys_counter
798[ 0.223914] FS-Cache: Loaded
799[ 0.224206] CacheFiles: Loaded
800[ 0.236523] NET: Registered protocol family 2
801[ 0.237397] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
802[ 0.237534] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
803[ 0.237744] TCP: Hash tables configured (established 8192 bind 8192)
804[ 0.237859] UDP hash table entries: 512 (order: 2, 16384 bytes)
805[ 0.237926] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
806[ 0.238170] NET: Registered protocol family 1
807[ 0.238504] RPC: Registered named UNIX socket transport module.
808[ 0.238536] RPC: Registered udp transport module.
809[ 0.238564] RPC: Registered tcp transport module.
810[ 0.238592] RPC: Registered tcp NFSv4.1 backchannel transport module.
811[ 0.239705] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
812[ 0.241047] futex hash table entries: 1024 (order: 4, 65536 bytes)
813[ 0.254358] VFS: Disk quotas dquot_6.6.0
814[ 0.254691] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
815[ 0.256949] FS-Cache: Netfs 'nfs' registered for caching
816[ 0.257875] NFS: Registering the id_resolver key type
817[ 0.257939] Key type id_resolver registered
818[ 0.257967] Key type id_legacy registered
819[ 0.260304] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
820[ 0.260469] io scheduler noop registered
821[ 0.260508] io scheduler deadline registered (default)
822[ 0.260583] io scheduler cfq registered
823[ 0.263122] BCM2708FB: allocated DMA memory f6c00000
824[ 0.263168] BCM2708FB: allocated DMA channel 0 @ f3007000
825[ 0.269935] Console: switching to colour frame buffer device 100x30
826[ 1.373933] bcm2835-rng 3f104000.rng: hwrng registered
827[ 1.375736] vc-cma: Videocore CMA driver
828[ 1.377359] vc-cma: vc_cma_base = 0x00000000
829[ 1.378953] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
830[ 1.380546] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
831[ 1.382321] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
832[ 1.398730] brd: module loaded
833[ 1.408964] loop: module loaded
834[ 1.411524] vchiq: vchiq_init_state: slot_zero = 0xb6c80000, is_master = 0
835[ 1.414577] Loading iSCSI transport class v2.0-870.
836[ 1.416812] usbcore: registered new interface driver smsc95xx
837[ 1.418463] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
838[ 1.620349] Core Release: 2.80a
839[ 1.621909] Setting default values for core params
840[ 1.623497] Finished setting default values for core params
841[ 1.825434] Using Buffer DMA mode
842[ 1.827024] Periodic Transfer Interrupt Enhancement - disabled
843[ 1.828623] Multiprocessor Interrupt Enhancement - disabled
844[ 1.830204] OTG VER PARAM: 0, OTG VER FLAG: 0
845[ 1.831772] Dedicated Tx FIFOs mode
846[ 1.833610] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xb6c14000 dma = 0xf6c14000 len=9024
847[ 1.836965] FIQ FSM acceleration enabled for :
848Non-periodic Split Transactions
849Periodic Split Transactions
850High-Speed Isochronous Endpoints
851Interrupt/Control Split Transaction hack enabled
852[ 1.845322] dwc_otg: Microframe scheduler enabled
853[ 1.845376] WARN::hcd_init_fiq:413: FIQ on core 1 at 0x80446aa0
854[ 1.847119] WARN::hcd_init_fiq:414: FIQ ASM at 0x80446e10 length 36
855[ 1.848880] WARN::hcd_init_fiq:439: MPHI regs_base at 0xb7958000
856[ 1.850641] dwc_otg 3f980000.usb: DWC OTG Controller
857[ 1.852335] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
858[ 1.854084] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
859[ 1.855807] Init: Port Power? op_state=1
860[ 1.857446] Init: Power Port (0)
861[ 1.859256] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
862[ 1.860928] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
863[ 1.862588] usb usb1: Product: DWC OTG Controller
864[ 1.864231] usb usb1: Manufacturer: Linux 4.4.14-v7+ dwc_otg_hcd
865[ 1.865887] usb usb1: SerialNumber: 3f980000.usb
866[ 1.868300] hub 1-0:1.0: USB hub found
867[ 1.869952] hub 1-0:1.0: 1 port detected
868[ 1.872102] dwc_otg: FIQ enabled
869[ 1.872111] dwc_otg: NAK holdoff enabled
870[ 1.872119] dwc_otg: FIQ split-transaction FSM enabled
871[ 1.872157] Module dwc_common_port init
872[ 1.872417] usbcore: registered new interface driver usb-storage
873[ 1.874283] mousedev: PS/2 mouse device common for all mice
874[ 1.876611] bcm2835-cpufreq: min=600000 max=1200000
875[ 1.878451] sdhci: Secure Digital Host Controller Interface driver
876[ 1.880004] sdhci: Copyright(c) Pierre Ossman
877[ 1.881826] sdhost: log_buf @ b6c13000 (f6c13000)
878[ 1.959223] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
879[ 1.963030] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
880[ 1.964615] mmc-bcm2835 3f300000.mmc: DMA channel allocated
881[ 2.016263] mmc0: host does not support reading read-only switch, assuming write-enable
882[ 2.019300] sdhci-pltfm: SDHCI platform and OF driver helper
883[ 2.019838] mmc0: new high speed SDHC card at address 0007
884[ 2.020390] mmcblk0: mmc0:0007 SL16G 14.5 GiB
885[ 2.023378] mmcblk0: p1 p2
886[ 2.026248] ledtrig-cpu: registered to indicate activity on CPUs
887[ 2.027998] hidraw: raw HID events driver (C) Jiri Kosina
888[ 2.029842] usbcore: registered new interface driver usbhid
889[ 2.031504] usbhid: USB HID core driver
890[ 2.033655] Initializing XFRM netlink socket
891[ 2.035303] NET: Registered protocol family 17
892[ 2.037027] Key type dns_resolver registered
893[ 2.039105] Registering SWP/SWPB emulation handler
894[ 2.041241] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
895[ 2.041512] registered taskstats version 1
896[ 2.041694] vc-sm: Videocore shared memory driver
897[ 2.041703] [vc_sm_connected_init]: start
898[ 2.048124] [vc_sm_connected_init]: end - returning 0
899[ 2.049224] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
900[ 2.050770] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
901[ 2.053586] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
902[ 2.054162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
903[ 2.054546] of_cfs_init
904[ 2.054621] of_cfs_init: OK
905[ 2.069336] Indeed it is in host mode hprt0 = 00021501
906[ 2.084430] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
907[ 2.086026] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
908[ 2.088534] devtmpfs: mounted
909[ 2.090845] Freeing unused kernel memory: 476K (807e7000 - 8085e000)
910[ 2.152157] mmc1: new high speed SDIO card at address 0001
911[ 2.249238] usb 1-1: new high-speed USB device number 2 using dwc_otg
912[ 2.251010] Indeed it is in host mode hprt0 = 00001101
913[ 2.360179] random: systemd urandom read with 30 bits of entropy available
914[ 2.365851] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
915[ 2.369772] systemd[1]: Detected architecture 'arm'.
916[ 2.449507] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
917[ 2.451351] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
918[ 2.453940] hub 1-1:1.0: USB hub found
919[ 2.455853] hub 1-1:1.0: 5 ports detected
920[ 2.497473] NET: Registered protocol family 10
921[ 2.500865] systemd[1]: Inserted module 'ipv6'
922[ 2.506424] systemd[1]: Set hostname to <mv-pi3>.
923[ 2.729260] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
924[ 2.829528] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
925[ 2.831444] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
926[ 2.836204] smsc95xx v1.0.4
927[ 2.902859] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:d3:4c:f2
928[ 2.913567] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
929[ 2.915886] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
930[ 2.917896] systemd[1]: Starting Remote File Systems (Pre).
931[ 2.922363] systemd[1]: Reached target Remote File Systems (Pre).
932[ 2.924443] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
933[ 2.929020] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
934[ 2.933024] systemd[1]: Starting Encrypted Volumes.
935[ 2.937342] systemd[1]: Reached target Encrypted Volumes.
936[ 2.939463] systemd[1]: Starting Swap.
937[ 2.943687] systemd[1]: Reached target Swap.
938[ 2.945721] systemd[1]: Expecting device dev-mmcblk0p1.device...
939[ 2.950084] systemd[1]: Starting Root Slice.
940[ 2.954500] systemd[1]: Created slice Root Slice.
941[ 2.956552] systemd[1]: Starting User and Session Slice.
942[ 2.961075] systemd[1]: Created slice User and Session Slice.
943[ 2.963099] systemd[1]: Starting Delayed Shutdown Socket.
944[ 2.967285] systemd[1]: Listening on Delayed Shutdown Socket.
945[ 2.969272] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
946[ 2.973489] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
947[ 2.975455] systemd[1]: Starting Journal Socket (/dev/log).
948[ 2.979648] systemd[1]: Listening on Journal Socket (/dev/log).
949[ 2.981527] systemd[1]: Starting udev Control Socket.
950[ 2.985386] systemd[1]: Listening on udev Control Socket.
951[ 2.987194] systemd[1]: Starting udev Kernel Socket.
952[ 2.991060] systemd[1]: Listening on udev Kernel Socket.
953[ 2.992897] systemd[1]: Starting Journal Socket.
954[ 2.996810] systemd[1]: Listening on Journal Socket.
955[ 2.998680] systemd[1]: Starting System Slice.
956[ 2.999241] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
957[ 3.004477] systemd[1]: Created slice System Slice.
958[ 3.006383] systemd[1]: Starting File System Check on Root Device...
959[ 3.059803] systemd[1]: Starting system-systemd\x2dfsck.slice.
960[ 3.064453] systemd[1]: Created slice system-systemd\x2dfsck.slice.
961[ 3.066493] systemd[1]: Starting system-vncserver.slice.
962[ 3.071007] systemd[1]: Created slice system-vncserver.slice.
963[ 3.073190] systemd[1]: Starting system-autologin.slice.
964[ 3.077464] systemd[1]: Created slice system-autologin.slice.
965[ 3.079589] systemd[1]: Starting Increase datagram queue length...
966[ 3.086311] systemd[1]: Starting Restore / save the current clock...
967[ 3.095101] systemd[1]: Mounted Huge Pages File System.
968[ 3.097580] systemd[1]: Starting Create list of required static device nodes for the current kernel...
969[ 3.116451] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=013c
970[ 3.118487] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
971[ 3.120532] usb 1-1.2: Product: USB PnP Sound Device
972[ 3.122513] usb 1-1.2: Manufacturer: C-Media Electronics Inc.
973[ 3.130189] input: C-Media Electronics Inc. USB PnP Sound Device as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.2/0003:0D8C:013C.0001/input/input0
974[ 3.146397] systemd[1]: Starting Load Kernel Modules...
975[ 3.180948] systemd[1]: Started Set Up Additional Binary Formats.
976[ 3.183896] systemd[1]: Mounting Debug File System...
977[ 3.190205] hid-generic 0003:0D8C:013C.0001: input,hidraw0: USB HID v1.00 Device [C-Media Electronics Inc. USB PnP Sound Device] on usb-3f980000.usb-1.2/input2
978[ 3.225089] fuse init (API version 7.23)
979[ 3.229802] systemd[1]: Starting udev Coldplug all Devices...
980[ 3.238545] systemd[1]: Mounting POSIX Message Queue File System...
981[ 3.246528] systemd[1]: Starting Slices.
982[ 3.252181] systemd[1]: Reached target Slices.
983[ 3.259801] systemd[1]: Mounted Debug File System.
984[ 3.265901] systemd[1]: Mounted POSIX Message Queue File System.
985[ 3.271551] systemd[1]: Started Increase datagram queue length.
986[ 3.284107] i2c /dev entries driver
987[ 3.301470] systemd[1]: Started Restore / save the current clock.
988[ 3.307640] systemd[1]: Started Create list of required static device nodes for the current kernel.
989[ 3.315312] systemd[1]: Started Load Kernel Modules.
990[ 3.375516] systemd[1]: Time has been changed
991[ 3.424010] systemd[1]: Started udev Coldplug all Devices.
992[ 3.440447] systemd[1]: Started File System Check on Root Device.
993[ 3.531277] systemd[1]: Mounting Configuration File System...
994[ 3.569635] systemd[1]: Starting Apply Kernel Variables...
995[ 3.576965] systemd[1]: Mounting FUSE Control File System...
996[ 3.584985] systemd[1]: Starting Create Static Device Nodes in /dev...
997[ 3.593277] systemd[1]: Starting Syslog Socket.
998[ 3.598583] systemd[1]: Listening on Syslog Socket.
999[ 3.598765] systemd[1]: Starting Journal Service...
1000[ 3.607111] systemd[1]: Started Journal Service.
1001[ 3.789088] systemd-udevd[137]: starting version 215
1002[ 4.160532] rpi-ft5406 rpi_ft5406: Probing device
1003[ 4.161077] input: FT5406 memory based driver as /devices/virtual/input/input1
1004[ 4.316294] usbcore: registered new interface driver snd-usb-audio
1005[ 4.342675] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
1006[ 4.370377] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
1007[ 4.522965] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
1008[ 4.590383] usbcore: registered new interface driver brcmfmac
1009[ 4.753356] random: nonblocking pool is initialized
1010[ 4.776441] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
1011[ 4.798760] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
1012[ 4.895842] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
1013[ 4.895856] cfg80211: World regulatory domain updated:
1014[ 4.895865] cfg80211: DFS Master region: unset
1015[ 4.895866] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
1016[ 4.895880] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
1017[ 4.895893] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
1018[ 4.895905] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
1019[ 4.895921] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
1020[ 4.895937] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
1021[ 4.895945] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
1022[ 4.895952] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
1023[ 4.895959] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
1024[ 5.305895] systemd-journald[135]: Received request to flush runtime journal from PID 1
1025[ 5.999574] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
1026[ 5.999600] brcmfmac: brcmf_add_if: ignore IF event
1027[ 6.004459] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
1028[ 6.004599] brcmfmac: power management disabled
1029[ 6.437996] cfg80211: Regulatory domain changed to country: SE
1030[ 6.438009] cfg80211: DFS Master region: ETSI
1031[ 6.438015] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
1032[ 6.438023] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
1033[ 6.438031] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
1034[ 6.438038] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
1035[ 6.438045] cfg80211: (5490000 KHz - 5710000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
1036[ 6.438051] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
1037[ 6.508086] uart-pl011 3f201000.uart: no DMA platform data
1038[ 6.848166] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SSFS
1039[ 7.381737] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
1040[ 7.382261] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
1041[ 7.725970] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
1042[ 7.748532] cfg80211: Regulatory domain changed to country: SE
1043[ 7.748548] cfg80211: DFS Master region: ETSI
1044[ 7.748554] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
1045[ 7.748561] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
1046[ 7.748569] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
1047[ 7.748576] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
1048[ 7.748583] cfg80211: (5490000 KHz - 5710000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
1049[ 7.748589] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
1050[ 11.119108] Bluetooth: Core ver 2.21
1051[ 11.119157] NET: Registered protocol family 31
1052[ 11.119163] Bluetooth: HCI device and connection manager initialized
1053[ 11.119177] Bluetooth: HCI socket layer initialized
1054[ 11.119187] Bluetooth: L2CAP socket layer initialized
1055[ 11.119208] Bluetooth: SCO socket layer initialized
1056[ 11.143316] Bluetooth: HCI UART driver ver 2.3
1057[ 11.143332] Bluetooth: HCI UART protocol H4 registered
1058[ 11.143337] Bluetooth: HCI UART protocol Three-wire (H5) registered
1059[ 11.143470] Bluetooth: HCI UART protocol BCM registered
1060[ 11.429642] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
1061[ 11.429657] Bluetooth: BNEP filters: protocol multicast
1062[ 11.429674] Bluetooth: BNEP socket layer initialized
1063pi@mv-pi3:~/.node-red/node_modules $ node-red status
1064
1065
1066Welcome to Node-RED
1067===================
1068
106922 Aug 18:28:12 - [info] Node-RED version: v0.13.4
107022 Aug 18:28:12 - [info] Node.js version: v0.10.29
107122 Aug 18:28:12 - [info] Linux 4.4.14-v7+ arm LE
107222 Aug 18:28:12 - [info] Loading palette nodes
107322 Aug 18:28:17 - [info] Settings file : /home/pi/.node-red/settings.js
107422 Aug 18:28:17 - [info] User directory : /home/pi/.node-red
107522 Aug 18:28:17 - [info] Flows file : /home/pi/.node-red/status
107622 Aug 18:28:17 - [info] Creating new flow file
107722 Aug 18:28:17 - [info] Starting flows
107822 Aug 18:28:17 - [info] Started flows
107922 Aug 18:28:17 - [warn] Communication server error: Error: listen EADDRINUSE
108022 Aug 18:28:17 - [error] Unable to listen on http://127.0.0.1:1880/
108122 Aug 18:28:17 - [error] Error: port in use
1082pi@mv-pi3:~/.node-red/node_modules $
1083pi@mv-pi3:~/.node-red/node_modules $
1084pi@mv-pi3:~/.node-red/node_modules $
1085pi@mv-pi3:~/.node-red/node_modules $
1086pi@mv-pi3:~/.node-red/node_modules $
1087pi@mv-pi3:~/.node-red/node_modules $ exit
1088logout
1089Connection to 10.0.1.125 closed.
1090mv-mbp:~ mv$ cd
1091mv-mbp:~ mv$ projects
1092-bash: projects: command not found
1093mv-mbp:~ mv$ cd projects/
1094mv-mbp:projects mv$ ls
1095SLA-test isbn pmvester
1096cc2650ibmiotf node pmvester.zip
1097cloudant pipo tmp
1098iphone pmv-coursera-iot workspace
1099mv-mbp:projects mv$ cd tmp
1100mv-mbp:tmp mv$ ls
1101main main.c
1102mv-mbp:tmp mv$ vi smart-display.js
1103mv-mbp:tmp mv$ node smart-display.js
1104/Users/mv/projects/tmp/smart-display.js:2
1105n digit(n, p) {
1106 ^^^^^
1107SyntaxError: Unexpected identifier
1108 at exports.runInThisContext (vm.js:73:16)
1109 at Module._compile (module.js:443:25)
1110 at Object.Module._extensions..js (module.js:478:10)
1111 at Module.load (module.js:355:32)
1112 at Function.Module._load (module.js:310:12)
1113 at Function.Module.runMain (module.js:501:10)
1114 at startup (node.js:129:16)
1115 at node.js:814:3
1116mv-mbp:tmp mv$ vi smart-display.js
1117mv-mbp:tmp mv$ ls
1118main main.c smart-display.js
1119mv-mbp:tmp mv$ node smart-display.js
1120,2,5,#C0C0C0,1,4,#C0C0C0,2,4,#C0C0C0,1,3,#C0C0C0,2,3,#C0C0C0,1,2,#C0C0C0,2,2,#C0C0C0,1,1,#C0C0C0,2,1,#C0C0C0
1121mv-mbp:tmp mv$ vi smart-display.js
1122mv-mbp:tmp mv$ node smart-display.js
1123/Users/mv/projects/tmp/smart-display.js:7
1124 s += ',' + (leds[n][0] + p) + ',' leds[n][1] + ',#C0C0C0';
1125 ^^^^
1126SyntaxError: Unexpected identifier
1127 at exports.runInThisContext (vm.js:73:16)
1128 at Module._compile (module.js:443:25)
1129 at Object.Module._extensions..js (module.js:478:10)
1130 at Module.load (module.js:355:32)
1131 at Function.Module._load (module.js:310:12)
1132 at Function.Module.runMain (module.js:501:10)
1133 at startup (node.js:129:16)
1134 at node.js:814:3
1135mv-mbp:tmp mv$ vi smart-display.js
1136mv-mbp:tmp mv$ node smart-display.js
1137,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0,2,5,#C0C0C0
1138mv-mbp:tmp mv$ vi smart-display.js
1139mv-mbp:tmp mv$ node smart-display.js
1140,2,5,#C0C0C0,1,4,#C0C0C0,2,4,#C0C0C0,1,3,#C0C0C0,2,3,#C0C0C0,1,2,#C0C0C0,2,2,#C0C0C0,1,1,#C0C0C0,2,1,#C0C0C0
1141mv-mbp:tmp mv$ node smart-display.js
1142,2,5,#C0C0C0,1,4,#C0C0C0,2,4,#C0C0C0,1,3,#C0C0C0,2,3,#C0C0C0,1,2,#C0C0C0,2,2,#C0C0C0,1,1,#C0C0C0,2,1,#C0C0C0
1143mv-mbp:tmp mv$ cat smart-display.js
1144var leds = [[0,0],[2,1],[1,1],[2,2],[1,2],[2,3],[1,3],[2,4],[1,4],[2,5]];
1145
1146function digit(n, p) {
1147 var s = '';
1148 p === undefined ? p = 0 : p = 4;
1149 for (i = n; i > 0; i--) {
1150 s += ',' + (leds[i][0] + p) + ',' + leds[i][1] + ',#C0C0C0';
1151 }
1152 return s;
1153}
1154
1155console.log(digit(9));
1156mv-mbp:tmp mv$ node smart-display.js
1157,2,5,#C0C0C0,1,4,#C0C0C0,2,4,#C0C0C0,1,3,#C0C0C0,2,3,#C0C0C0,1,2,#C0C0C0,2,2,#C0C0C0,1,1,#C0C0C0,2,1,#C0C0C0
1158mv-mbp:tmp mv$ vi smart-display.js
1159mv-mbp:tmp mv$ node smart-display.js
1160/Users/mv/projects/tmp/smart-display.js:13
1161console.log(digit(3,1);
1162 ^
1163SyntaxError: Unexpected token ;
1164 at exports.runInThisContext (vm.js:73:16)
1165 at Module._compile (module.js:443:25)
1166 at Object.Module._extensions..js (module.js:478:10)
1167 at Module.load (module.js:355:32)
1168 at Function.Module._load (module.js:310:12)
1169 at Function.Module.runMain (module.js:501:10)
1170 at startup (node.js:129:16)
1171 at node.js:814:3
1172mv-mbp:tmp mv$ vi smart-display.js
1173mv-mbp:tmp mv$ node smart-display.js
1174,2,5,#C0C0C0,1,4,#C0C0C0,2,4,#C0C0C0,1,3,#C0C0C0,2,3,#C0C0C0,1,2,#C0C0C0,2,2,#C0C0C0,1,1,#C0C0C0,2,1,#C0C0C0
1175,6,2,#C0C0C0,5,1,#C0C0C0,6,1,#C0C0C0
1176mv-mbp:tmp mv$
1177mv-mbp:tmp mv$
1178mv-mbp:tmp mv$
1179mv-mbp:tmp mv$
1180mv-mbp:tmp mv$
1181mv-mbp:tmp mv$
1182mv-mbp:tmp mv$
1183mv-mbp:tmp mv$ ls
1184main main.c smart-display.js
1185mv-mbp:tmp mv$ cd
1186mv-mbp:~ mv$ cd projects/
1187mv-mbp:projects mv$ ls
1188SLA-test isbn pmvester
1189cc2650ibmiotf node pmvester.zip
1190cloudant pipo tmp
1191iphone pmv-coursera-iot workspace
1192mv-mbp:projects mv$ ls
1193SLA-test isbn pmvester
1194cc2650ibmiotf node pmvester.zip
1195cloudant pipo tmp
1196iphone pmv-coursera-iot workspace
1197mv-mbp:projects mv$ cd pmv-coursera-iot/
1198mv-mbp:pmv-coursera-iot mv$ ls
1199app-dev-bluemix assignment3.txt bluemix-app-skeleton
1200assignment1.txt assignment5.txt pmv-coursera-week4
1201assignment2.txt assignment8.py
1202mv-mbp:pmv-coursera-iot mv$ view assignment8.py
1203
1204 plane.shape = (64,3)
1205 return plane.tolist()
1206
1207
1208client = None
1209
1210def myCommandCallback(cmd):
1211 if cmd.command == "display":
1212 command = cmd.data['screen']
1213 if command == "on":
1214 sense.set_pixels(getPixelMap("red", math.trunc(sense.get_temperature())))
1215 elif command == "off":
1216 sense.set_pixels(getPixelMap("green", math.trunc(sense.get_temperature())))
1217
1218try:
1219 gatewayOptions = {"org": "asey83", "type": "rpi3", "id": "pmvrpi3", "auth-method": "token", "auth-token": "1221080932"}
1220 gatewayCli = ibmiotf.gateway.Client(gatewayOptions)
1221
1222 gatewayCli.connect()
1223 gatewayCli.deviceCommandCallback = myCommandCallback
1224 gatewayCli.subscribeToDeviceCommands(deviceType='rpi3', deviceId='pmvrpi3', command='display',format='json',qos=2)
1225
1226 while True:
1227 temp = sense.get_temperature()
1228 myData = {'d':{'temperature':temp}}
1229 gatewayCli.publishDeviceEvent("rpish", "senpmvrpi3", "yourEventName", "json", myData, qos=1 )
1230 time.sleep(2)
1231
1232except ibmiotf.ConnectionException as e:
1233 print(e)