1
00:00:00,630 --> 00:00:07,980
Currently I am running version 1.1.1 off node red on my Raspberry Pi.

2
00:00:08,400 --> 00:00:14,310
And in this lecture I'll show you how to upgrade to the current version 2.1.

3
00:00:15,240 --> 00:00:21,840
It doesn't really matter which version of note rate you are using in your instance of this project.

4
00:00:22,320 --> 00:00:29,820
The process is the same, so I'm using the instructions that you have already seen in the introductory

5
00:00:29,820 --> 00:00:37,050
part of this course where I showed you how to install note rate on your Raspberry Pi and turn the page

6
00:00:37,050 --> 00:00:39,570
that should be looking at a stock's getting started.

7
00:00:39,750 --> 00:00:40,650
Raspberry Pi.

8
00:00:41,010 --> 00:00:48,270
And back then we used this bash command to install a fresh instance of note read.

9
00:00:48,820 --> 00:00:53,310
We're going to use the exact same command now to install the upgrade.

10
00:00:54,000 --> 00:00:55,890
So I'm going to copy this command.

11
00:00:56,550 --> 00:01:05,070
And here in my terminal window, I've already logged on to my node red Raspberry Pi as user pi and just

12
00:01:05,400 --> 00:01:12,540
paste this command in here and hit enter and that will begin the process which can take about ten or

13
00:01:12,540 --> 00:01:17,880
15 minutes depending on the speed of your Raspberry Pi hour and your Internet connection.

14
00:01:17,890 --> 00:01:18,840
So let's go through it.

15
00:01:24,180 --> 00:01:31,800
So I'll say yes to this question or when to proceed and of course, install the PI specific nodes.

16
00:01:33,630 --> 00:01:38,640
And I'm just going to let it do its thing while I wait.

17
00:01:38,910 --> 00:01:41,280
And at this point, I'm going to fast forward to picking up.

18
00:02:14,580 --> 00:02:15,130
Okay.

19
00:02:15,150 --> 00:02:17,190
And that process is now complete.

20
00:02:17,550 --> 00:02:25,950
We've got this script that has upgraded note rate to version 2.10.5, as you can see here.

21
00:02:26,250 --> 00:02:32,160
He did not make any changes to Node.js that I already had because the current version is sufficient

22
00:02:32,340 --> 00:02:34,830
for Node 2.1.5.

23
00:02:35,130 --> 00:02:41,250
Although I could get the same script to also upgrade node to chase runtime.

24
00:02:41,760 --> 00:02:48,000
But before I do anything else, let's go over to my web browser and check to see what is happening with

25
00:02:48,000 --> 00:02:51,360
my node institution and to refresh this page.

26
00:02:52,170 --> 00:02:57,960
And of course, it's not running, so let's have a look at how to get it started again.

27
00:02:58,620 --> 00:03:03,540
So to start the node thread service, I'm going to use this command here.

28
00:03:03,870 --> 00:03:05,100
No direct to start.

29
00:03:05,190 --> 00:03:07,830
So copy that and paste it in here.

30
00:03:10,280 --> 00:03:14,060
And New Red is now starting.

31
00:03:15,760 --> 00:03:18,130
It's a system D service.

32
00:03:19,680 --> 00:03:20,950
Give it a few more moments.

33
00:03:29,560 --> 00:03:30,700
There's the finish loading up.

34
00:03:42,990 --> 00:03:45,600
And we're back up and running.

35
00:03:45,600 --> 00:03:55,350
So in my browser again, refresh the page and there is no trade 2.1 and I can hear the pump motor in

36
00:03:55,350 --> 00:03:55,920
the background.

37
00:03:55,920 --> 00:04:02,730
You may be able to hear that as well that it just started so you can follow the tour guide, which will

38
00:04:02,730 --> 00:04:07,890
take you through the new features on the user interface level.

39
00:04:09,650 --> 00:04:14,660
I'm just going through all those fairly quickly, and I'm going to spend more time exploring those new

40
00:04:14,660 --> 00:04:17,240
features in upcoming lectures in the section.

41
00:04:18,210 --> 00:04:18,630
All right.

42
00:04:18,630 --> 00:04:19,480
And close.

43
00:04:20,280 --> 00:04:25,560
And I've got my currently active running slow here in the tap.

44
00:04:27,190 --> 00:04:31,510
And let's have a look at the user interface or the dashboard, I should say.

45
00:04:31,810 --> 00:04:33,820
Just open it up in a new tab.

46
00:04:34,690 --> 00:04:38,200
So everything seems to be working fine.

47
00:04:38,230 --> 00:04:44,710
I'm just going to increase the threshold for the pump so that it doesn't start to motor.

48
00:04:46,020 --> 00:04:47,610
I'll put it up to 600.

49
00:04:48,620 --> 00:04:49,160
Like that.

50
00:04:51,800 --> 00:04:53,150
And that.

51
00:04:55,210 --> 00:05:02,410
That value here for the pump threshold ensures that the motor will not just start randomly and everything

52
00:05:02,410 --> 00:05:03,340
seems to be working there.

53
00:05:03,340 --> 00:05:09,790
Soil humidity, the air humidity, air temperature, the various widgets up and running.

54
00:05:11,260 --> 00:05:13,930
Emanuel Pump control is also working.

55
00:05:15,650 --> 00:05:18,440
And everything looks fine.

56
00:05:18,440 --> 00:05:22,880
And of course, the version of note rate that is now running is 2.1.5.

57
00:05:23,390 --> 00:05:25,490
So the upgrade is complete.

58
00:05:26,060 --> 00:05:32,670
Now, one last thing that I want to do here is to get rid of the start and boot.

59
00:05:32,700 --> 00:05:35,450
So I'm going to use this command for that.

60
00:05:36,950 --> 00:05:42,620
I'm just going to hit control C to get back to the command line and paste.

61
00:05:44,720 --> 00:05:48,380
Jimmy Garoppolo so you can see it and pace the system.

62
00:05:48,380 --> 00:05:50,060
City l command enable.

63
00:05:51,030 --> 00:06:00,810
And now the no trip instance will begin when the Raspberry Pi starts its double check that my note read

64
00:06:00,810 --> 00:06:05,610
instance is still working even though I hit control C because it's running as a service, you can see

65
00:06:05,610 --> 00:06:13,890
that it is working the Wichita operating properly and getting updates from the ESP three to.

66
00:06:15,520 --> 00:06:15,880
All right.

67
00:06:16,120 --> 00:06:22,220
She'd say also that I haven't made any changes at all in the sketch that is running on the ECP 32.

68
00:06:22,240 --> 00:06:29,050
The only changes that are made there are what you have just seen, namely to upgrade the instance of

69
00:06:29,050 --> 00:06:31,690
note rate to version 2.1.5.

70
00:06:33,830 --> 00:06:34,610
While we are.

71
00:06:34,610 --> 00:06:39,680
Edward Pettit wanted to show you one more thing that you can do here with the installation or upgrade

72
00:06:39,680 --> 00:06:41,180
script right here.

73
00:06:41,570 --> 00:06:49,100
You noticed that when I ran the barebones version of this command line, the bash command line, the

74
00:06:49,370 --> 00:06:57,290
script maintained my current version of the Node.js runtime because it's sufficient for the version

75
00:06:57,290 --> 00:07:00,560
of Node Red that I'm upgrading to.

76
00:07:01,490 --> 00:07:07,610
However, I do have the option to upgrade to Node JS 14 or 16.

77
00:07:07,940 --> 00:07:10,940
Now to do that, it's actually quite easy.

78
00:07:10,970 --> 00:07:11,750
Let's have a look.

79
00:07:11,840 --> 00:07:16,910
I'm just going to clean up here, paste the same command part instead of running it.

80
00:07:16,910 --> 00:07:17,550
Bare bones.

81
00:07:17,570 --> 00:07:22,340
I'm just going to use the help switch just to see what the options are.

82
00:07:22,820 --> 00:07:32,750
So if I don't have a node version, then as you can see here, the script is going to install Node.js

83
00:07:32,750 --> 00:07:39,970
14 by default unless there is an existing compatible version of no teacher.

84
00:07:39,980 --> 00:07:47,030
Yes, in which case it's going to leave the current installation, the current version of Node.js intact.

85
00:07:47,570 --> 00:07:51,650
In my case, I'd like to actually upgrade to Node 16.

86
00:07:52,010 --> 00:08:01,700
So to do that, just replace the help switch with Node 16 and run the same command again.

87
00:08:02,800 --> 00:08:08,470
And yes, I want to proceed the same questions asked.

88
00:08:09,640 --> 00:08:19,150
Go for the PI specific notes and then the script will now upgrade the version of note to read and then

89
00:08:19,150 --> 00:08:22,110
install Node.js version 16.

90
00:08:22,930 --> 00:08:26,360
So again, I'm going to fast forward this bit and then continue.

91
00:08:26,380 --> 00:08:27,580
Once the installation is.

92
00:09:18,380 --> 00:09:20,030
Okay, that's complete.

93
00:09:20,270 --> 00:09:27,610
So the script removes the old version of Node Red and the old version of note to use and then installed.

94
00:09:27,810 --> 00:09:33,950
She has 16 LTE s and no direct code 2.1.5.

95
00:09:35,240 --> 00:09:36,290
Let's test it out.

96
00:09:36,500 --> 00:09:41,210
First thing to do would be to restart node red as a service.

97
00:09:50,290 --> 00:09:52,450
Give it a few moments to spin up.

98
00:10:22,600 --> 00:10:29,350
And so we'll look at close this down and just have a look at my web browser.

99
00:10:30,010 --> 00:10:33,430
So I know Dredd has restarted.

100
00:10:33,640 --> 00:10:41,290
And again, 2.1.5 and I'm going to go to the dashboard.

101
00:10:43,770 --> 00:10:49,230
And increase that threshold to 600 so that the pump motor doesn't start.

102
00:10:49,380 --> 00:10:49,830
All right.

103
00:10:49,830 --> 00:10:51,090
So everything is back to normal.

104
00:10:51,870 --> 00:10:52,140
All right.

105
00:10:52,140 --> 00:10:54,170
Can do control.

106
00:10:54,180 --> 00:10:56,880
See, to get back to the command line.

107
00:10:57,620 --> 00:10:58,000
I know.

108
00:10:58,050 --> 00:10:59,760
Trade still running in the background.

109
00:11:02,360 --> 00:11:09,770
And if you haven't done so already, then you can set the service to start on boot.

110
00:11:10,700 --> 00:11:13,670
I should be okay because I've already done it.

111
00:11:13,670 --> 00:11:14,540
In my case.

112
00:11:15,380 --> 00:11:16,730
It doesn't hurt to do it again though.

113
00:11:17,120 --> 00:11:18,920
So be careful just in case.

114
00:11:20,700 --> 00:11:22,820
So let's wrap it up for this lecture.

115
00:11:22,830 --> 00:11:32,460
I have now upgraded Node Red to version 2.1.5 and I have confirmed that my existing terrarium controller

116
00:11:32,460 --> 00:11:33,930
flows still work.

117
00:11:34,400 --> 00:11:42,450
So in the next few lectures in this section, I'm going to walk through some of the most important or

118
00:11:42,450 --> 00:11:48,360
interesting features of Node Red Version two and show you how they work.
