<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: iganari</title>
    <description>The latest articles on DEV Community by iganari (@iganari).</description>
    <link>https://dev.to/iganari</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F278437%2F81d0d12a-b1dc-4da2-85c1-8a1ac26b9f54.jpeg</url>
      <title>DEV Community: iganari</title>
      <link>https://dev.to/iganari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iganari"/>
    <language>en</language>
    <item>
      <title>Try push LINE Bot From Node-RED Part.1 </title>
      <dc:creator>iganari</dc:creator>
      <pubDate>Mon, 13 Jan 2020 12:27:03 +0000</pubDate>
      <link>https://dev.to/iganari/try-push-line-bot-from-node-red-part-1-52f6</link>
      <guid>https://dev.to/iganari/try-push-line-bot-from-node-red-part-1-52f6</guid>
      <description>&lt;h1&gt;
  
  
  Goal
&lt;/h1&gt;

&lt;p&gt;Refer to the following article, I try push LINE Bot From Node-RED.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspberry Pi やローカルPC で動かす Node-RED で Line Bot の Push メッセージを送るメモ

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.1ft-seabass.jp/memo/2020/01/03/local-node-red-linebot-push-message/"&gt;https://www.1ft-seabass.jp/memo/2020/01/03/local-node-red-linebot-push-message/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Split the article into several pieces, because the contents is long.&lt;/p&gt;

&lt;h1&gt;
  
  
  Set up Raspberry Pi
&lt;/h1&gt;

&lt;p&gt;I use raspberry Pi 3 Model B what was used in the past.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/iganari_/status/1211203592666804224"&gt;https://twitter.com/iganari_/status/1211203592666804224&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Refer to the following to initialize the microSD, Write Rasbian on microSD.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspberry Piに Raspbian をインストールする for Mac OSX

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://qiita.com/ttyokoyama/items/7afe6404fd8d3e910d09"&gt;https://qiita.com/ttyokoyama/items/7afe6404fd8d3e910d09&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choise Raspbian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspbian

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.raspberrypi.org/downloads/raspbian/"&gt;https://www.raspberrypi.org/downloads/raspbian/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Download on Hostmachine, Write Rasbian on microSD.&lt;/p&gt;

&lt;p&gt;Then My Work is running from macOS.&lt;/p&gt;

&lt;p&gt;After pyhical mount micoSD on hostmachine, Check from your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ df -h
Filesystem              Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1              112Gi  108Gi  3.7Gi    97% 1818468 4293148811    0%   /
devfs                   187Ki  187Ki    0Bi   100%     646          0  100%   /dev
/dev/disk2s1            14Gi  2.4Mi   14Gi     1%       0          0  100%   /Volumes/Untitled
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +120.1 GB   disk1
                                 Logical Volume on disk0s2

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk2
   1:                 DOS_FAT_32                         15.5 GB    disk2s1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/dev/disk2s1&lt;/code&gt; is microSD, therefore unmount from your terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo diskutil umount /dev/disk2s1
sudo diskutil unmountDisk /dev/disk2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Example

$ sudo diskutil umount /dev/disk2s1
Password:
Volume (null) on disk2s1 unmounted
$ sudo diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Check image of Raspbian Buster with desktop&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls ~/Desktop/2019-09-26-raspbian-buster.img
/Users/iganari/Desktop/2019-09-26-raspbian-buster.img
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Write Rasbian on microSD using dd command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dd bs=1m if=~/Desktop/2019-09-26-raspbian-buster.img of=/dev/disk2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Example

$ sudo dd bs=1m if=~/Desktop/2019-09-26-raspbian-buster.img of=/dev/disk2
3652+0 records in
3652+0 records out
3829399552 bytes transferred in 17100.346498 secs (223937 bytes/sec)
$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It took about 5 hours to complete...&lt;/p&gt;

&lt;p&gt;Physically remove and insert microSD for remount.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +120.1 GB   disk1
                                 Logical Volume on disk0s2

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk2
   1:             Windows_FAT_32 boot                    268.4 MB   disk2s1
   2:                      Linux                         3.6 GB     disk2s2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can see that &lt;code&gt;Linux&lt;/code&gt; has been added to &lt;code&gt;/ dev / disk2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next, you insert this microSD in Raspberry Pi, and Power on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/iganari_/status/1213207593591554048"&gt;https://twitter.com/iganari_/status/1213207593591554048&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Success!!&lt;/p&gt;

&lt;h1&gt;
  
  
  Set up Raspbian Buster with desktop
&lt;/h1&gt;

&lt;p&gt;First, let's set up Wifi.&lt;/p&gt;

&lt;p&gt;This time, Set up IEEE802.11b only.&lt;/p&gt;

&lt;p&gt;Because Raspberry Pi 3 Model B can only set IEEE802.11b/g/n.&lt;/p&gt;

&lt;p&gt;If Raspberry Pi 3 Model B+, I can set IEEE802.11a.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspberry Pi 3 Model B

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.iodata.jp/product/pc/raspberrypi/ud-rp3/spec.htm"&gt;https://www.iodata.jp/product/pc/raspberrypi/ud-rp3/spec.htm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Raspberry Pi 3 Model B+

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.iodata.jp/product/pc/raspberrypi/ud-rp3bp/spec.htm"&gt;https://www.iodata.jp/product/pc/raspberrypi/ud-rp3bp/spec.htm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I shoud have checked spec...    &lt;/p&gt;

&lt;p&gt;I pulled myself together and Setting Raspbian.&lt;/p&gt;

&lt;h2&gt;
  
  
  Updating packages
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Updating packages using apt command.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
sudo apt-get upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Set up SSH login
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install openssh-server
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install openssh-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Set the automatic startup of the ssh daemon.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl start ssh
sudo systemctl enable ssh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;reboot for checking.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo shutdown -r now
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After restarting, if you can SSH login to this Raspberry Pi from another PC, the setting is completed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Changing the standard editor
&lt;/h2&gt;

&lt;p&gt;Raspbian's standard editor is nano. However, it may be confusing for users who do not normally use nano.&lt;/p&gt;

&lt;p&gt;In such a case, change the standard editor. Here is how to change the standard editor to Vim.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install Vim package using apt command.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install vim
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Check that the installation has been completed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt list --installed | grep vim
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Example

$ sudo apt list --installed | grep vim

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

vim-common/stable,now 2:8.1.0875-5 all [installed]
vim-runtime/stable,now 2:8.1.0875-5 all [installed,automatic]
vim-tiny/stable,now 2:8.1.0875-5 armhf [installed]
vim/stable,now 2:8.1.0875-5 armhf [installed]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Check the existing standard editor.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -la /etc/alternatives/editor
lrwxrwxrwx 1 root root 9 Sep 26 09:08 /etc/alternatives/editor -&amp;gt; /bin/nano
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Replace the existing standard editor.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo unlink /etc/alternatives/editor
sudo ln -s /usr/bin/vim.basic /etc/alternatives/editor
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Recheck the standard editor.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -la /etc/alternatives/editor
lrwxrwxrwx 1 root root 18 Jan  4 14:00 /etc/alternatives/editor -&amp;gt; /usr/bin/vim.basic
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Uninstall nano.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt remove --purge nano
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://qiita.com/iganari/items/612a4b6f59a528c2f15a"&gt;https://qiita.com/iganari/items/612a4b6f59a528c2f15a&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://qiita.com/iganari/items/587c330a62e52023679d"&gt;https://qiita.com/iganari/items/587c330a62e52023679d&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;For now, I was able to replace the Raspberry Pi. That's it for today's work.&lt;/p&gt;

&lt;p&gt;I will install Node-RED in the next article.&lt;/p&gt;

&lt;p&gt;Thanks for reading this article :)&lt;/p&gt;

</description>
      <category>raspberrypi3modelb</category>
      <category>raspbian</category>
    </item>
  </channel>
</rss>
