UNIVERSITAS BINA NUSANTARA
Jurusan Teknik Informatika Skripsi Sarjana Komputer Semester Genap tahun 2008/2009
ANALISIS DAN PERANCANGAN SISTEM KONFIGURASI DAN MONITORING JARAK JAUH BERBASIS HTTP PADA MESIN INDUSTRI
Syaiful Rahmadita
0900794712
Aulia Artahayu
0900800406
Beni Purwanto
0900830390
Abstrak TUJUAN PENELITIAN ialah menganalisa dan merancang suatu sistem yang dapat memonitoring dan mengkonfigurasi mesin - mesin industri dari jarak jauh dengan biaya infrastruktur yang relatif murah berbasiskan pada protokol HTTP yang dilengkapi dengan proses otentikasi dan enkripsi pada pengiriman datanya. METODOLOGI PENELITIAN yang digunakan dalam penulisan ini terdiri dari analisa sistem yang sedang berjalan, melakukan wawancara, menemukan masalah yang ada, melakukan pemilihan dari alternatif solusi dan melakukan perancangan sistem, serta melakukan percobaan untuk menguji kehandalan sistem. HASIL YANG DICAPAI adalah suatu rancangan sistem untuk memonitor dan mengkonfigurasi mesin – mesin industri dari jarak jauh yang memungkinkan teknisi dari perusahaan pembuat mesin, dapat melakukan konfigurasi dan monitoring pada mesin dari tempat teknisi berada dengan hanya mengakses internet. SIMPULAN yang didapat pada penelitian ini ialah sistem konfigurasi dan monitoring jarak jauh berbasis HTTP ini dapat menjadi salah satu solusi untuk memonitor dan mengkonfigurasi mesin – mesin industri. Sistem ini menggunakan jaringan internet dalam pengiriman datanya dengan menambahkan mekanisme enkripsi dan otentikasi. Kata Kunci : otentikasi, enkripsi, HTTP, Konfigurasi, Monitoring v
PRAKATA
Puji Syukur kepada Tuhan Yang Maha Esa atas kasih, berkat, dan karunia-Nya yang telah diberikan kepada penulis sehingga dapat menyusun dan menyelesaikan skripsi yang berjudul “ANALISIS DAN PERANCANGAN SISTEM KONFIGURASI DAN MONITORING JARAK JAUH BERBASIS HTTP PADA MESIN INDUSTRI”. Tujuan dari penulisan skripsi ini adalah sebagai salah satu syarat yang harus dipenuhi untuk memperoleh gelar kesarjanaan pada jurusan Teknik Informatika jenjang pendidikan strata-1 pada Universitas Bina Nusantara. Pada kesempatan ini, penulis ingin menyampaikan terima kasih pada semua pihak yang telah membimbing, membantu, menyediakan waktu dan tenaga serta memberikan dorongan kepada penulis sehingga penulis dapat menyelesaikan skripsi ini, terutama kepada : 1. Tuhan Yang Maha Esa yang selalu melimpahkan segala berkat dan karunia-Nya kepada penulis sehingga dapat menyelesaikan skripsi ini dengan baik. 2. Seluruh anggota keluarga dan orang tua yang telah memberikan dorongan dan yang selalu mendukung dalam doa serta atas saran-sarannya. 3. Bapak Prof. Dr. Gerardus Polla, M.App.Sc., selaku Rektor Universitas Bina Nusantara. 4. Bapak , Ir. Sablin Yusuf, M.Sc., M.Comp.Sc., selaku Dekan Fakultas Ilmu Komputer Universitas Bina Nusantara. 5. Bapak Freddy Purnomo, S.Komp, M.Kom., selaku Ketua Jurusan Teknik Informatika Universitas Bina Nusantara.
vi
6. Bapak I Made Astawa, Ir, M.Kom., selaku dosen pembimbing atas dukungan, bimbingan, perhatian, kesabaran, dan kerja sama yang telah diberikan selama penyusunan skripsi ini. 7. Seluruh staff dan dosen jurusan Teknik Informatika yang telah memberikan ilmu di Universitas Bina Nusantara. 8. Teman – teman angkatan 2005 Universitas Bina Nusantara atas kebersamaan, pendapat, bantuan, dan kerjasamanya selama ini. 9. Seluruh pihak – pihak yang telah membantu penulis secara langsung maupun tidak langsung dan namanya tidak dapat penulis cantumkan satu – persatu. Penulis menyadari akan keterbatasan kemampuan dan pengetahuan yang dimiliki, dan bahwa skripsi ini masih banyak kekurangan. Oleh karena itu penulis mengharapkan kritik dan saran yang membangun demi perbaikan dan penyempurnaan skripsi ini. Akhirnya dengan segala kerendahan hati penulis mempersembahkan skripsi ini kepada semua pihak yang berkenan membaca dan semoga dapat memberikan manfaat kepada semua pihak yang membutuhkannya.
Jakarta, Juni 2009
Penulis
vii
DAFTAR ISI
Halaman Judul.............................................................................................................. i Halaman Judul Dalam .................................................................................................. ii Halaman Persetujuan Hard Cover ............................................................................... iii Halaman Pernyataan Dewan Penguji ........................................................................... iv Abstrak ......................................................................................................................... v Prakata.......................................................................................................................... vi Daftar Isi ...................................................................................................................... vii Daftar Tabel ................................................................................................................. xiii Daftar Gambar.............................................................................................................. xv Daftar Lampiran ........................................................................................................... xxi
BAB 1
PENDAHULUAN..................................................................................... 1
1.1
Latar Belakang ........................................................................................... 1
1.2
Ruang Lingkup........................................................................................... 3
1.3
Tujuan dan Manfaat ................................................................................... 4
1.4
Metodologi ................................................................................................. 5
1.5
Sistematika Penulisan ................................................................................ 5
BAB 2
LANDASAN TEORI................................................................................ 7
2.1
Teori Umum ............................................................................................... 7
2.1.1
Jaringan Komputer ............................................................................... 7
viii
2.1.2
Internet ................................................................................................. 10
2.1.3
TCP/IP.................................................................................................. 12
2.1.4
Web Server........................................................................................... 17
2.1.5
HTTP.................................................................................................... 19
2.1.6
HTTPS ................................................................................................. 21
2.1.7
PHP ...................................................................................................... 21
2.1.8
MySQL................................................................................................. 23
2.1.9
Bahasa C .............................................................................................. 24
2.1.10 Thread .................................................................................................. 25 2.1.11 IPC (Inter-Process Communication) .................................................... 28 2.1.12 Embedded System................................................................................ 43 2.1.13 Enkripsi ................................................................................................ 46 2.1.14 RC-4 ..................................................................................................... 49 2.1.15 Use Case Diagram................................................................................ 50 2.1.16 Sequence Diagram ............................................................................... 51 2.1.17 Entity Relationship Diagram................................................................ 52 2.1.18 State Transition Diagram ..................................................................... 53 2.1.19 Flowchart ............................................................................................. 54 2.1.20 Online Processing ................................................................................ 55 2.1.21 Batch Processing .................................................................................. 56 2.2
Teori Khusus .............................................................................................. 56
2.2.1
Telemetri .............................................................................................. 56
2.2.2
Telecommand....................................................................................... 57
ix
BAB 3
ANALISIS DAN PERANCANGAN....................................................... 59
3.1
Analisis Sistem Berjalan ............................................................................ 59
3.1.1
Permasalahan Yang Dihadapi .............................................................. 61
3.1.2
Alternatif Pemecahan Masalah ............................................................ 62
3.1.2.1 Alternatif Topologi Fisik ............................................................... 64 3.1.2.1.1
Menggunakan Private WAN ........................................... 64
3.1.2.1.2
Menggunakan Public WAN (Internet) ............................ 68
3.1.2.2 Alternatif Desain Sistem ................................................................ 70 3.1.2.2.1
Sistem Berbasis Non HTTP ............................................ 71
3.1.2.2.2
Sistem Berbasis HTTP .................................................... 76
3.1.3
Usulan Pemecahan Masalah................................................................. 80
3.1.4
Batasan Sistem ..................................................................................... 81
3.2
Perancangan ............................................................................................... 83
3.2.1
Perancangan Model Sistem .................................................................. 83
3.2.2
Usecase................................................................................................. 85
3.2.3
Perancangan Komunikasi Server Dengan Mesin................................. 87
3.2.3.1 Flowchart ....................................................................................... 90 3.2.3.1.1
Flowchart Client Pada Embedded System ...................... 90
3.2.3.1.2
Flowchart Server Konfigurasi dan Monitoring ............... 100
3.2.3.2 Sequence Diagram ......................................................................... 106 3.2.4
Perancangan Standar Format Interface Antar Proses........................... 111
3.2.4.1 Perancangan Format Pesan ............................................................ 111 3.2.4.2 Perancangan Struktur Data Pada Sharememory ............................ 114 3.2.4.3 Perancangan Kode Error Dan Sukses ............................................ 115 x
3.2.5
Perancangan Database.......................................................................... 116
3.2.6
Struktur Menu ...................................................................................... 124
3.2.7
State Transition Diagram ..................................................................... 124
3.2.8
Perancangan Layar ............................................................................... 131
BAB 4
IMPLEMENTASI DAN EVALUASI..................................................... 150
4.1
Implementasi .............................................................................................. 150
4.1.1
Spesifikasi Sistem ................................................................................ 150
4.1.2
Prosedur Operasional ........................................................................... 154
4.1.2.1 Konfigurasi Awal Sistem ............................................................... 154 4.1.2.1.1 Konfigurasi Awal Web Server ........................................... 154 4.1.2.1.2 Konfigurasi Port Forwarding pada Router ........................ 165 4.1.2.1.3 Konfigurasi Awal Mesin .................................................... 166 4.1.2.2 Pengaturan Data Mesin .................................................................. 175 4.1.2.3 Pengkonfigurasian Mesin............................................................... 176 4.1.2.4 Simulasi Konfigurasi Mesin........................................................... 178 4.1.2.5 Pemonitoringan Mesin ................................................................... 181 4.1.2.6 Simulasi Monitoring Mesin ........................................................... 182 4.1.2.7 Pengaturan Teknisi......................................................................... 184 4.1.2.8 Pengaturan Model .......................................................................... 186 4.2
Evaluasi ...................................................................................................... 188
4.2.1
Uji Kinerja Pengiriman Data................................................................ 188
4.2.1.1 Uji Akurasi Data Monitoring ......................................................... 189 4.2.1.2 Uji Akurasi Pengiriman Data Konfigurasi..................................... 192 xi
4.2.1.3 Uji Validasi Data Monitoring......................................................... 196 4.2.1.4 Uji Validasi Input Konfigurasi....................................................... 197 4.2.2
Uji Waktu Rata – Rata Yang Dibutuhkan Sekali Pengiriman Data..... 199
4.2.3
Hasil Pembuktian Enkripsi Pada Komunikasi Antara Server Dan Client ............................................................................................ 202
4.2.4
Pengujian Sistem Jika Client Mengalami Down Pada Komputer Client Dan Koneksi Internet ................................................................ 206
4.2.5
BAB 5
Perbandigan Biaya. .............................................................................. 208
SIMPULAN DAN SARAN ...................................................................... 212
5.1
Simpulan ................................................................................................... 212
5.2
Saran........................................................................................................... 213
DAFTAR PUSTAKA ................................................................................................. 214 RIWAYAT HIDUP .................................................................................................... 215 LAMPIRAN................................................................................................................ L1 SURAT SURVEI ........................................................................................................
xii
DAFTAR TABEL
Table 2.1
Tabel Flowchart ...................................................................................... 54
Tabel 3.1
Tabel Mesin............................................................................................. 118
Tabel 3.2
Tabel Teknisi........................................................................................... 118
Tabel 3.3
Tabel Otentikasi ...................................................................................... 119
Tabel 3.4
Tabel Model ............................................................................................ 119
Tabel 3.5
Tabel Detilmodel..................................................................................... 120
Tabel 3.6
Tabel Satuan............................................................................................ 120
Tabel 3.7
Tabel Konfigurasi ................................................................................... 121
Tabel 3.8
Tabel Detilkonfigurasi ............................................................................ 121
Tabel 3.9
Tabel Monitor ......................................................................................... 122
Tabel 3.10 Tabel Detilmonitor .................................................................................. 122 Tabel 3.11 Tabel Privilege ........................................................................................ 123 Tabel 3.12 Tabel Jenis............................................................................................... 123 Tabel 4.1
Hasil Uji akurasi data monitoring ........................................................... 191
Tabel 4.2
Percobaan pengiriman data konfigurasi .................................................. 195
Tabel 4.3
Percobaan validasi data monitoring ....................................................... 196
Tabel 4.4
Validasi pengiriman ............................................................................... 198
Tabel 4.5
Percobaan waktu yang dibutuhkan untuk sekali pengiriman melalui LAN ........................................................................................................ 200
Tabel 4.6
Percobaan waktu yang dibutuhkan untuk sekali pengiriman melalui
xiii
Internet .................................................................................................... 201 Tabel 4.7
Biaya perbulan sistem berbasis internet dengan IP dinamis dan HTTP ...................................................................................................... 209
Tabel 4.8
Biaya perbulan sistem berbasis internet dengan IP statis dan HTTP ..... 209
Tabel 4.9
Biaya perbulan sistem berbasis Private WAN dan non-HTTP............... 210
Tabel 4.10
Biaya peralatan sistem berbasis Private WAN dan non-HTTP .............. 210
Tabel 4.11
Perbandingan biaya................................................................................. 210
xiv
DAFTAR GAMBAR
Gambar 2.1
Perbandingan Arsitektur OSI Dan TCP/IP .......................................... 14
Gambar 2.2
Proses Enkapsulasi Data Pada Protocol TCP/IP .................................. 17
Gambar 2.3
Interface Socket Dalam Berkomunikasi Data ...................................... 30
Gambar 2.4
Komunikasi Antar Sepasang Socket .................................................... 31
Gambar 2.5
Client – Server Socket.......................................................................... 32
Gambar 2.6
Cara Kerja Message Passing ................................................................ 38
Gambar 2.7
Enkripsi Asimetrik ............................................................................... 47
Gambar 2.8
Enkripsi Simetrik ................................................................................. 48
Gambar 2.9
Use Case Diagram................................................................................ 51
Gambar 2.10 Sequence Diagram ............................................................................... 52 Gambar 2.11 State Transition Diagram ..................................................................... 54 Gambar 2.12 Sistem Telemetri .................................................................................. 57 Gambar 3.1
Block Diagram Garis Besar Sistem ..................................................... 63
Gambar 3.2
Topologi Fisik ...................................................................................... 64
Gambar 3.3
Topologi Logis ..................................................................................... 65
Gambar 3.4
Topologi Fisik Sekaligus Topologi Logis............................................ 68
Gambar 3.5
Block Diagram Desain Aplikasi .......................................................... 70
Gambar 3.6
Block Diagram Desain Sistem Berbasis Non HTTP............................ 72
Gambar 3.7
Block Diagram Sistem Berbasis HTTP................................................ 77
Gambar 3.8
Batasan Sistem ..................................................................................... 82
xv
Gambar 3.9
Block Diagram Model Sistem.............................................................. 83
Gambar 3.10 Usecase Teknisi, Admin Dan Mesin.................................................... 85 Gambar 3.11 Block Diagram Komunikasi Antara Client Embedded System Dan Server dengan online processing .................................................. 87 Gambar 3.12 Block Diagram Komunikasi Antara Client Embedded System Dan Server dengan batch processing ................................................... 88 Gambar 3.13 Flowchart Inisialisasi Client................................................................. 90 Gambar 3.14 Flowchart Thread Monitoring .............................................................. 93 Gambar 3.15 Flowchart Thread Konfigurasi ............................................................. 96 Gambar 3.16 Flowchart Thread Online ..................................................................... 98 Gambar 3.17 Flowchart Halaman Otentikasi............................................................. 100 Gambar 3.18 Flowchart Halaman Monitoring........................................................... 102 Gambar 3.19 Flowchart Halaman Konfigurasi .......................................................... 104 Gambar 3.20 Sequence Diagram Pengiriman Konfigurasi Dengan Otentikasi ......... 106 Gambar 3.21 Sequence Diagram Pengiriman Monitoring Dengan Otentikasi.......... 108 Gambar 3.22 Sequence diagram pengiriman konfigurasi secara online.................... 110 Gambar 3.23 ERD Sistem Konfigurasi Dan Monitoring........................................... 117 Gambar 3.24 Struktur Menu ...................................................................................... 124 Gambar 3.25 STD Login............................................................................................ 124 Gambar 3.26 STD Menu Utama ................................................................................ 125 Gambar 3.27 STD Mesin ........................................................................................... 126 Gambar 3.28 STD Model........................................................................................... 127 Gambar 3.29 STD Monitor ........................................................................................ 128 Gambar 3.30 STD Konfigurasi .................................................................................. 129 xvi
Gambar 3.31 STD Teknisi ......................................................................................... 130 Gambar 3.32 Halaman Mesin .................................................................................... 131 Gambar 3.33 Halaman Status Mesin ......................................................................... 132 Gambar 3.34 Halaman Tambah Data Mesin.............................................................. 133 Gambar 3.35 Halaman Ubah Data Mesin .................................................................. 134 Gambar 3.36 Halaman Histori Monitoring ................................................................ 135 Gambar 3.37 Halaman Histori Monitoring Mesin ..................................................... 136 Gambar 3.38 Halaman Histori Konfigurasi ............................................................... 137 Gambar 3.39 Halaman Histori Konfigurasi Mesin .................................................... 138 Gambar 3.40 Halaman Detil Konfigurasi Mesin ....................................................... 139 Gambar 3.41 Halaman Ubah Konfigurasi Mesin....................................................... 140 Gambar 3.42 Halaman Teknisi .................................................................................. 141 Gambar 3.43 Halaman Ubah Teknisi......................................................................... 142 Gambar 3.44 Halaman Tambah Teknisi .................................................................... 143 Gambar 3.45 Halaman Daftar Model Mesin.............................................................. 144 Gambar 3.46 Halaman Tambah Model Mesin........................................................... 145 Gambar 3.47 Halaman Ubah Model Mesin ............................................................... 146 Gambar 3.48 Halaman Daftar Satuan ........................................................................ 147 Gambar 3.49 Halaman Tambah Satuan ..................................................................... 148 Gambar 3.50 Halaman Ubah Satuan.......................................................................... 149 Gambar 4.1
Topologi Jaringan yang digunakan dalam simulasi ............................. 151
Gambar 4.2
Folder Setelah Dicopy Kedalam Htdocs .............................................. 155
Gambar 4.3
Membuat Sertifikat SSL....................................................................... 156
Gambar 4.4
Input Dan Verfikasi password private key........................................... 156 xvii
Gambar 4.5
Input Kode Negara ............................................................................... 156
Gambar 4.6
Input Propinsi ....................................................................................... 157
Gambar 4.7
Input Kota ............................................................................................ 157
Gambar 4.8
Input Nama Perusahaan ....................................................................... 158
Gambar 4.9
Input Nama Bagian .............................................................................. 158
Gambar 4.10 Input Nama Domain............................................................................. 159 Gambar 4.11 Input Alamat Email .............................................................................. 159 Gambar 4.12 Input Password Private Key ................................................................. 160 Gambar 4.13 Input Nama Perusahaan ....................................................................... 160 Gambar 4.14 Input Password Private Key ................................................................. 161 Gambar 4.15 Sertifikat SSL dan Private Key ............................................................ 161 Gambar 4.16 Kode Untuk Request SSL Pada Folder Telemonitoring ...................... 162 Gambar 4.17 Kode Untuk Mendirect HTTP menjadi HTTPS .................................. 162 Gambar 4.18 Program XAMPP ................................................................................. 163 Gambar 4.19 Phpmyadmin ........................................................................................ 164 Gambar 4.20 Import Database ................................................................................... 164 Gambar 4.21 Status router.......................................................................................... 165 Gambar 4.22 Status router ......................................................................................... 166 Gambar 4.23 Compile Source Code .......................................................................... 167 Gambar 4.24 Program Read dan Read PLC .............................................................. 167 Gambar 4.25 Input IP Address atau Domain Name .................................................. 167 Gambar 4.26 Input halaman Konfigurasi................................................................... 168 Gambar 4.27 Input halaman monitoring .................................................................... 168 Gambar 4.28 Input halaman otentikasi ...................................................................... 168 xviii
Gambar 4.29 Input Idmesin ....................................................................................... 168 Gambar 4.30 Input Key enkripsi................................................................................ 169 Gambar 4.31 Input alamat sharememory................................................................... 169 Gambar 4.32 Input timer konfigurasi......................................................................... 169 Gambar 4.33 Input pesan error .................................................................................. 170 Gambar 4.34 Halaman Login..................................................................................... 171 Gambar 4.35 Halaman Home..................................................................................... 171 Gambar 4.36 Daftar Model ........................................................................................ 172 Gambar 4.37 Menambah model................................................................................. 173 Gambar 4.38 Daftar Mesin ........................................................................................ 173 Gambar 4.39 Tambah Mesin...................................................................................... 174 Gambar 4.40 Pesan Kesalahan................................................................................... 174 Gambar 4.41 Status mesin ......................................................................................... 175 Gambar 4.42 History Konfigurasi.............................................................................. 176 Gambar 4.43 History konfigurasi mesin .................................................................... 177 Gambar 4.44 Ubah konfigurasi ................................................................................ 177 Gambar 4.45 Aliran data dari teknisi menuju Client Embedded System secara online processing .................................................................................. 178 Gambar 4.46 Aliran data dari teknisi menuju Client Embedded System secara batch processing ................................................................................... 179 Gambar 4.47 Pengkonfigurasian mesin melalui web interface.................................. 180 Gambar 4.48 Output Client Embedded System dan proses Read-Write PLC ........... 181 Gambar 4.49 History montoring ................................................................................ 181 Gambar 4.50 History monitoring mesin .................................................................... 182 xix
Gambar 4.51 Aliran data Client Embedded System .................................................. 183 Gambar 4.52 Output pada Client Embedded System dan Read-Write PLC.............. 183 Gambar 4.53 Daftar Teknisi ...................................................................................... 185 Gambar 4.54 Tambah teknisi ..................................................................................... 185 Gambar 4.55 Daftar model ........................................................................................ 186 Gambar 4.56 Tambah Model ..................................................................................... 187 Gambar 4.57 Daftar Satuan........................................................................................ 187 Gambar 4.58 Tambah Satuan..................................................................................... 188 Gambar 4.59 Pengiriman data monitoring................................................................. 189 Gambar 4.60 Pengiriman monitoring pada Client Embedded System ...................... 190 Gambar 4.61 History montoring pada web server .................................................... 191 Gambar 4.62 Pengiriman data konfigurasi ............................................................... 193 Gambar 4.63 Konfigurasi mesin pada webserver ...................................................... 193 Gambar 4.64 Output data parameter konfigurasi pada Client Embedded System..... 194 Gambar 4.65 Hasil percobaan pengiriman data monitoring diatas LAN................... 199 Gambar 4.66 Hasil Percobaan pengiriman data monitoring diatas Internet .............. 201 Gambar 4.67 Topologi untuk sniffing packet data..................................................... 203 Gambar 4.68 Wireshark ............................................................................................. 204 Gambar 4.69 Hasil decoding URL............................................................................. 205 Gambar 4.70 Percobaan pemutusan koneksi server................................................... 206 Gambar 4.71 Percobaan pe-restart-an Client Embedded System .............................. 207 Gambar 4.72 Isi File konfigurasi ............................................................................... 208
xx
DAFTAR LAMPIRAN
Hasil Wawancara Penulis Dengan Pihak BPPT .......................................................... L1 Normalisasi Database................................................................................................... L4
xxi