-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexercises-day-3.html
387 lines (345 loc) · 28.9 KB
/
exercises-day-3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>12 Exercises Day 3 | Hands on—Programming own Bots and Systems for Smart Homes and Gardens</title>
<meta name="description" content="12 Exercises Day 3 | Hands on—Programming own Bots and Systems for Smart Homes and Gardens" />
<meta name="generator" content="bookdown 0.23 and GitBook 2.6.7" />
<meta property="og:title" content="12 Exercises Day 3 | Hands on—Programming own Bots and Systems for Smart Homes and Gardens" />
<meta property="og:type" content="book" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="12 Exercises Day 3 | Hands on—Programming own Bots and Systems for Smart Homes and Gardens" />
<meta name="author" content="Diren Senger" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="grafana.html"/>
<link rel="next" href="more-raspberry-pi-lifehacks.html"/>
<script src="book_assets/header-attrs-2.9/header-attrs.js"></script>
<script src="book_assets/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<link href="book_assets/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="book_assets/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<link href="book_assets/anchor-sections-1.0.1/anchor-sections.css" rel="stylesheet" />
<script src="book_assets/anchor-sections-1.0.1/anchor-sections.js"></script>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li class="chapter" data-level="1" data-path="teaser.html"><a href="teaser.html"><i class="fa fa-check"></i><b>1</b> Teaser</a></li>
<li class="chapter" data-level="2" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>2</b> Introduction</a></li>
<li class="chapter" data-level="3" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html"><i class="fa fa-check"></i><b>3</b> Working with the Raspberry Pi</a>
<ul>
<li class="chapter" data-level="3.1" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#getting-started"><i class="fa fa-check"></i><b>3.1</b> Getting started</a></li>
<li class="chapter" data-level="3.2" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#the-operating-system"><i class="fa fa-check"></i><b>3.2</b> The operating system</a></li>
<li class="chapter" data-level="3.3" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#using-the-raspberry-pi-as-a-desktop-computer"><i class="fa fa-check"></i><b>3.3</b> Using the Raspberry Pi as a desktop computer</a></li>
<li class="chapter" data-level="3.4" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#the-raspberry-pi-and-ssh"><i class="fa fa-check"></i><b>3.4</b> The Raspberry-Pi and SSH</a></li>
<li class="chapter" data-level="3.5" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#establishing-a-wifi-connection"><i class="fa fa-check"></i><b>3.5</b> Establishing a Wifi connection</a>
<ul>
<li class="chapter" data-level="3.5.1" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#option-1-use-keyboard-mouse-and-monitor"><i class="fa fa-check"></i><b>3.5.1</b> Option 1: Use keyboard, mouse and monitor</a></li>
<li class="chapter" data-level="3.5.2" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#option-2-ethernet-cable"><i class="fa fa-check"></i><b>3.5.2</b> Option 2: Ethernet Cable</a></li>
<li class="chapter" data-level="3.5.3" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#option-3-edit-a-config-file-on-the-sd-card"><i class="fa fa-check"></i><b>3.5.3</b> Option 3: Edit a config file on the SD-card</a></li>
<li class="chapter" data-level="3.5.4" data-path="working-with-the-raspberry-pi.html"><a href="working-with-the-raspberry-pi.html#option-4-make-a-hotspot-with-your-mobile-phone"><i class="fa fa-check"></i><b>3.5.4</b> Option 4: Make a hotspot with your mobile phone</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="4" data-path="find-the-ip-address-of-your-raspberry-pi.html"><a href="find-the-ip-address-of-your-raspberry-pi.html"><i class="fa fa-check"></i><b>4</b> Find the IP-address of your Raspberry Pi</a>
<ul>
<li class="chapter" data-level="4.1" data-path="find-the-ip-address-of-your-raspberry-pi.html"><a href="find-the-ip-address-of-your-raspberry-pi.html#if-you-connected-mouse-keyboard-and-monitor"><i class="fa fa-check"></i><b>4.1</b> If you connected mouse, keyboard and monitor</a></li>
<li class="chapter" data-level="4.2" data-path="find-the-ip-address-of-your-raspberry-pi.html"><a href="find-the-ip-address-of-your-raspberry-pi.html#angryip-software"><i class="fa fa-check"></i><b>4.2</b> Angryip software</a></li>
<li class="chapter" data-level="4.3" data-path="find-the-ip-address-of-your-raspberry-pi.html"><a href="find-the-ip-address-of-your-raspberry-pi.html#command-line"><i class="fa fa-check"></i><b>4.3</b> Command line</a></li>
<li class="chapter" data-level="4.4" data-path="find-the-ip-address-of-your-raspberry-pi.html"><a href="find-the-ip-address-of-your-raspberry-pi.html#using-your-routers-administration-page"><i class="fa fa-check"></i><b>4.4</b> Using your router’s administration page</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html"><i class="fa fa-check"></i><b>5</b> Using SSH and the command line</a>
<ul>
<li class="chapter" data-level="5.1" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#the-basics"><i class="fa fa-check"></i><b>5.1</b> The basics</a>
<ul>
<li class="chapter" data-level="5.1.1" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#finding-your-ip"><i class="fa fa-check"></i><b>5.1.1</b> Finding your IP</a></li>
<li class="chapter" data-level="5.1.2" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#connect"><i class="fa fa-check"></i><b>5.1.2</b> Connect!</a></li>
</ul></li>
<li class="chapter" data-level="5.2" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#if-some-thing-is-not-working---installing-and-enabling-ssh"><i class="fa fa-check"></i><b>5.2</b> If some thing is not working - Installing and Enabling SSH</a>
<ul>
<li class="chapter" data-level="5.2.1" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#installation-on-linux"><i class="fa fa-check"></i><b>5.2.1</b> Installation on Linux</a></li>
<li class="chapter" data-level="5.2.2" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#on-windows"><i class="fa fa-check"></i><b>5.2.2</b> On Windows</a></li>
<li class="chapter" data-level="5.2.3" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#on-mac"><i class="fa fa-check"></i><b>5.2.3</b> On Mac</a></li>
</ul></li>
<li class="chapter" data-level="5.3" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#using-the-command-line"><i class="fa fa-check"></i><b>5.3</b> Using the command line</a>
<ul>
<li class="chapter" data-level="5.3.1" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#list-files"><i class="fa fa-check"></i><b>5.3.1</b> List files</a></li>
<li class="chapter" data-level="5.3.2" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#change-the-current-directory"><i class="fa fa-check"></i><b>5.3.2</b> Change the current directory</a></li>
<li class="chapter" data-level="5.3.3" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#show-file"><i class="fa fa-check"></i><b>5.3.3</b> show file</a></li>
<li class="chapter" data-level="5.3.4" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#edit-file"><i class="fa fa-check"></i><b>5.3.4</b> edit file</a></li>
<li class="chapter" data-level="5.3.5" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#run-a-python-script"><i class="fa fa-check"></i><b>5.3.5</b> run a python script</a></li>
</ul></li>
<li class="chapter" data-level="5.4" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#copying-a-file"><i class="fa fa-check"></i><b>5.4</b> copying a file</a></li>
<li class="chapter" data-level="5.5" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#copying-single-files-using-ssh"><i class="fa fa-check"></i><b>5.5</b> Copying single files using ssh</a>
<ul>
<li class="chapter" data-level="5.5.1" data-path="using-ssh-and-the-command-line.html"><a href="using-ssh-and-the-command-line.html#synchronising-directories-using-scp"><i class="fa fa-check"></i><b>5.5.1</b> Synchronising directories using scp</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="6" data-path="hardware.html"><a href="hardware.html"><i class="fa fa-check"></i><b>6</b> Hardware</a>
<ul>
<li class="chapter" data-level="6.1" data-path="hardware.html"><a href="hardware.html#pinout"><i class="fa fa-check"></i><b>6.1</b> Pinout</a></li>
<li class="chapter" data-level="6.2" data-path="hardware.html"><a href="hardware.html#cables"><i class="fa fa-check"></i><b>6.2</b> Cables</a></li>
<li class="chapter" data-level="6.3" data-path="hardware.html"><a href="hardware.html#resistors"><i class="fa fa-check"></i><b>6.3</b> Resistors</a></li>
<li class="chapter" data-level="6.4" data-path="hardware.html"><a href="hardware.html#relay"><i class="fa fa-check"></i><b>6.4</b> Relay</a></li>
</ul></li>
<li class="chapter" data-level="7" data-path="exercises-day-1.html"><a href="exercises-day-1.html"><i class="fa fa-check"></i><b>7</b> Exercises Day 1</a>
<ul>
<li class="chapter" data-level="7.1" data-path="exercises-day-1.html"><a href="exercises-day-1.html#change-password"><i class="fa fa-check"></i><b>7.1</b> Change password</a></li>
<li class="chapter" data-level="7.2" data-path="exercises-day-1.html"><a href="exercises-day-1.html#reboot"><i class="fa fa-check"></i><b>7.2</b> Reboot</a></li>
<li class="chapter" data-level="7.3" data-path="exercises-day-1.html"><a href="exercises-day-1.html#list-files-1"><i class="fa fa-check"></i><b>7.3</b> List files</a></li>
<li class="chapter" data-level="7.4" data-path="exercises-day-1.html"><a href="exercises-day-1.html#make-a-readme-file-take-some-notes"><i class="fa fa-check"></i><b>7.4</b> make a Readme file/ take some notes</a></li>
<li class="chapter" data-level="7.5" data-path="exercises-day-1.html"><a href="exercises-day-1.html#copy-a-file"><i class="fa fa-check"></i><b>7.5</b> copy a file</a></li>
<li class="chapter" data-level="7.6" data-path="exercises-day-1.html"><a href="exercises-day-1.html#python---hello-world"><i class="fa fa-check"></i><b>7.6</b> Python - Hello World</a></li>
<li class="chapter" data-level="7.7" data-path="exercises-day-1.html"><a href="exercises-day-1.html#bme280"><i class="fa fa-check"></i><b>7.7</b> BME280</a></li>
<li class="chapter" data-level="7.8" data-path="exercises-day-1.html"><a href="exercises-day-1.html#your-own-project"><i class="fa fa-check"></i><b>7.8</b> Your own project</a>
<ul>
<li class="chapter" data-level="7.8.1" data-path="exercises-day-1.html"><a href="exercises-day-1.html#ideas"><i class="fa fa-check"></i><b>7.8.1</b> Ideas</a></li>
<li class="chapter" data-level="7.8.2" data-path="exercises-day-1.html"><a href="exercises-day-1.html#collect-the-material-you-need"><i class="fa fa-check"></i><b>7.8.2</b> Collect the material you need</a></li>
<li class="chapter" data-level="7.8.3" data-path="exercises-day-1.html"><a href="exercises-day-1.html#make-a-plan"><i class="fa fa-check"></i><b>7.8.3</b> Make a plan</a></li>
<li class="chapter" data-level="7.8.4" data-path="exercises-day-1.html"><a href="exercises-day-1.html#connect-and-test"><i class="fa fa-check"></i><b>7.8.4</b> Connect and test</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="8" data-path="telegram.html"><a href="telegram.html"><i class="fa fa-check"></i><b>8</b> Telegram</a>
<ul>
<li class="chapter" data-level="8.1" data-path="telegram.html"><a href="telegram.html#security"><i class="fa fa-check"></i><b>8.1</b> Security</a></li>
<li class="chapter" data-level="8.2" data-path="telegram.html"><a href="telegram.html#security-tipps"><i class="fa fa-check"></i><b>8.2</b> Security tipps</a></li>
<li class="chapter" data-level="8.3" data-path="telegram.html"><a href="telegram.html#creating-a-telegram-bot"><i class="fa fa-check"></i><b>8.3</b> Creating a telegram bot</a></li>
<li class="chapter" data-level="8.4" data-path="telegram.html"><a href="telegram.html#adding-a-command"><i class="fa fa-check"></i><b>8.4</b> Adding a command</a></li>
<li class="chapter" data-level="8.5" data-path="telegram.html"><a href="telegram.html#reading-and-responding-to-messages"><i class="fa fa-check"></i><b>8.5</b> Reading and responding to messages</a></li>
<li class="chapter" data-level="8.6" data-path="telegram.html"><a href="telegram.html#using-the-job-queue"><i class="fa fa-check"></i><b>8.6</b> Using the job queue</a>
<ul>
<li class="chapter" data-level="8.6.1" data-path="telegram.html"><a href="telegram.html#job-queue-example"><i class="fa fa-check"></i><b>8.6.1</b> job queue example</a></li>
<li class="chapter" data-level="8.6.2" data-path="telegram.html"><a href="telegram.html#job-queue-functions"><i class="fa fa-check"></i><b>8.6.2</b> job queue functions</a></li>
<li class="chapter" data-level="8.6.3" data-path="telegram.html"><a href="telegram.html#daily-example"><i class="fa fa-check"></i><b>8.6.3</b> daily example</a></li>
</ul></li>
<li class="chapter" data-level="8.7" data-path="telegram.html"><a href="telegram.html#simple-conversation"><i class="fa fa-check"></i><b>8.7</b> Simple conversation</a></li>
<li class="chapter" data-level="8.8" data-path="telegram.html"><a href="telegram.html#inline-bots"><i class="fa fa-check"></i><b>8.8</b> Inline Bots</a></li>
<li class="chapter" data-level="8.9" data-path="telegram.html"><a href="telegram.html#more-resources"><i class="fa fa-check"></i><b>8.9</b> More resources</a></li>
</ul></li>
<li class="chapter" data-level="9" data-path="exercises-day-2.html"><a href="exercises-day-2.html"><i class="fa fa-check"></i><b>9</b> Exercises Day 2</a>
<ul>
<li class="chapter" data-level="9.1" data-path="exercises-day-2.html"><a href="exercises-day-2.html#your-first-bot"><i class="fa fa-check"></i><b>9.1</b> Your first bot</a></li>
<li class="chapter" data-level="9.2" data-path="exercises-day-2.html"><a href="exercises-day-2.html#sense"><i class="fa fa-check"></i><b>9.2</b> /sense</a></li>
<li class="chapter" data-level="9.3" data-path="exercises-day-2.html"><a href="exercises-day-2.html#add-your-own-command"><i class="fa fa-check"></i><b>9.3</b> add your own command</a></li>
<li class="chapter" data-level="9.4" data-path="exercises-day-2.html"><a href="exercises-day-2.html#embed-your-own-hardware"><i class="fa fa-check"></i><b>9.4</b> embed your own hardware</a></li>
<li class="chapter" data-level="9.5" data-path="exercises-day-2.html"><a href="exercises-day-2.html#implement-your-own-timer"><i class="fa fa-check"></i><b>9.5</b> Implement your own timer</a></li>
<li class="chapter" data-level="9.6" data-path="exercises-day-2.html"><a href="exercises-day-2.html#implement-your-own-conversation"><i class="fa fa-check"></i><b>9.6</b> Implement your own conversation</a></li>
<li class="chapter" data-level="9.7" data-path="exercises-day-2.html"><a href="exercises-day-2.html#check-out-other-examples"><i class="fa fa-check"></i><b>9.7</b> Check out other examples</a></li>
</ul></li>
<li class="chapter" data-level="10" data-path="raspap.html"><a href="raspap.html"><i class="fa fa-check"></i><b>10</b> RaspAP</a>
<ul>
<li class="chapter" data-level="10.1" data-path="raspap.html"><a href="raspap.html#enable-access-point"><i class="fa fa-check"></i><b>10.1</b> Enable access point</a></li>
<li class="chapter" data-level="10.2" data-path="raspap.html"><a href="raspap.html#disable-access-point"><i class="fa fa-check"></i><b>10.2</b> Disable access point:</a></li>
<li class="chapter" data-level="10.3" data-path="raspap.html"><a href="raspap.html#how-to-see-which-services-are-running"><i class="fa fa-check"></i><b>10.3</b> How to see which services are running</a></li>
<li class="chapter" data-level="10.4" data-path="raspap.html"><a href="raspap.html#login"><i class="fa fa-check"></i><b>10.4</b> Login</a></li>
<li class="chapter" data-level="10.5" data-path="raspap.html"><a href="raspap.html#access-point-administration-page"><i class="fa fa-check"></i><b>10.5</b> Access Point administration page</a></li>
<li class="chapter" data-level="10.6" data-path="raspap.html"><a href="raspap.html#using-the-access-point-and-ssh"><i class="fa fa-check"></i><b>10.6</b> Using the access point and ssh</a></li>
</ul></li>
<li class="chapter" data-level="11" data-path="grafana.html"><a href="grafana.html"><i class="fa fa-check"></i><b>11</b> Grafana</a>
<ul>
<li class="chapter" data-level="11.1" data-path="grafana.html"><a href="grafana.html#the-setup"><i class="fa fa-check"></i><b>11.1</b> The setup</a></li>
<li class="chapter" data-level="11.2" data-path="grafana.html"><a href="grafana.html#collect-some-data"><i class="fa fa-check"></i><b>11.2</b> Collect some data</a></li>
<li class="chapter" data-level="11.3" data-path="grafana.html"><a href="grafana.html#use-grafana"><i class="fa fa-check"></i><b>11.3</b> Use grafana</a></li>
</ul></li>
<li class="chapter" data-level="12" data-path="exercises-day-3.html"><a href="exercises-day-3.html"><i class="fa fa-check"></i><b>12</b> Exercises Day 3</a>
<ul>
<li class="chapter" data-level="12.1" data-path="exercises-day-3.html"><a href="exercises-day-3.html#add-more-panel-for-bme280"><i class="fa fa-check"></i><b>12.1</b> Add more panel for BME280</a></li>
<li class="chapter" data-level="12.2" data-path="exercises-day-3.html"><a href="exercises-day-3.html#add-a-panel-for-your-own-data"><i class="fa fa-check"></i><b>12.2</b> Add a panel for your own data</a></li>
<li class="chapter" data-level="12.3" data-path="exercises-day-3.html"><a href="exercises-day-3.html#here-are-some-other-ideas"><i class="fa fa-check"></i><b>12.3</b> Here are some other ideas</a>
<ul>
<li class="chapter" data-level="12.3.1" data-path="exercises-day-3.html"><a href="exercises-day-3.html#grafana-alerts-for-telegram"><i class="fa fa-check"></i><b>12.3.1</b> Grafana alerts for telegram</a></li>
<li class="chapter" data-level="12.3.2" data-path="exercises-day-3.html"><a href="exercises-day-3.html#embed-a-grafana-plot-in-telegram"><i class="fa fa-check"></i><b>12.3.2</b> Embed a Grafana plot in telegram</a></li>
<li class="chapter" data-level="12.3.3" data-path="exercises-day-3.html"><a href="exercises-day-3.html#telegram-and-influx"><i class="fa fa-check"></i><b>12.3.3</b> Telegram and Influx</a></li>
</ul></li>
<li class="chapter" data-level="12.4" data-path="exercises-day-3.html"><a href="exercises-day-3.html#work-on-your-own-project"><i class="fa fa-check"></i><b>12.4</b> Work on your own project :)</a></li>
</ul></li>
<li class="chapter" data-level="13" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html"><i class="fa fa-check"></i><b>13</b> More Raspberry Pi lifehacks</a>
<ul>
<li class="chapter" data-level="13.1" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#run-a-script-on-startup"><i class="fa fa-check"></i><b>13.1</b> Run a script on startup</a></li>
<li class="chapter" data-level="13.2" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#install-an-image"><i class="fa fa-check"></i><b>13.2</b> Install an image</a></li>
<li class="chapter" data-level="13.3" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#make-your-own-image"><i class="fa fa-check"></i><b>13.3</b> Make your own image</a>
<ul>
<li class="chapter" data-level="13.3.1" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#windows"><i class="fa fa-check"></i><b>13.3.1</b> Windows</a></li>
<li class="chapter" data-level="13.3.2" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#mac"><i class="fa fa-check"></i><b>13.3.2</b> Mac</a></li>
<li class="chapter" data-level="13.3.3" data-path="more-raspberry-pi-lifehacks.html"><a href="more-raspberry-pi-lifehacks.html#linux"><i class="fa fa-check"></i><b>13.3.3</b> Linux</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="14" data-path="exercises-day-4.html"><a href="exercises-day-4.html"><i class="fa fa-check"></i><b>14</b> Exercises Day 4</a>
<ul>
<li class="chapter" data-level="14.1" data-path="exercises-day-4.html"><a href="exercises-day-4.html#have-your-script-run-on-startup"><i class="fa fa-check"></i><b>14.1</b> Have your script run on startup</a></li>
<li class="chapter" data-level="14.2" data-path="exercises-day-4.html"><a href="exercises-day-4.html#burn-your-image"><i class="fa fa-check"></i><b>14.2</b> Burn your image</a></li>
</ul></li>
<li class="chapter" data-level="15" data-path="image-sources.html"><a href="image-sources.html"><i class="fa fa-check"></i><b>15</b> Image Sources</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Hands on—Programming own Bots and Systems for Smart Homes and Gardens</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="exercises-day-3" class="section level1" number="12">
<h1><span class="header-section-number">12</span> Exercises Day 3</h1>
<div id="add-more-panel-for-bme280" class="section level2" number="12.1">
<h2><span class="header-section-number">12.1</span> Add more panel for BME280</h2>
<p>Add a panel for humidity and another panel for pressure.</p>
</div>
<div id="add-a-panel-for-your-own-data" class="section level2" number="12.2">
<h2><span class="header-section-number">12.2</span> Add a panel for your own data</h2>
<p>Add a new dashboard or add extra panel for your own sensors.</p>
</div>
<div id="here-are-some-other-ideas" class="section level2" number="12.3">
<h2><span class="header-section-number">12.3</span> Here are some other ideas</h2>
<p>But to be honest I have not tried all of this myself. But it is possible.</p>
<div id="grafana-alerts-for-telegram" class="section level3" number="12.3.1">
<h3><span class="header-section-number">12.3.1</span> Grafana alerts for telegram</h3>
<p>Enable alerts from Grafana for your telegram bot: <a href="https://gist.github.com/dl6nm/c312acbc6fddf1a56d749e045f040ca3">https://gist.github.com/dl6nm/c312acbc6fddf1a56d749e045f040ca3</a></p>
</div>
<div id="embed-a-grafana-plot-in-telegram" class="section level3" number="12.3.2">
<h3><span class="header-section-number">12.3.2</span> Embed a Grafana plot in telegram</h3>
<p><a href="https://community.hiveeyes.org/t/hiveeyes-data-in-telegram-bot/861">https://community.hiveeyes.org/t/hiveeyes-data-in-telegram-bot/861</a></p>
</div>
<div id="telegram-and-influx" class="section level3" number="12.3.3">
<h3><span class="header-section-number">12.3.3</span> Telegram and Influx</h3>
<p>Find out how to access the influxDB from python to obtain time series data of a specific range. Using python, create a plot and send it to the telegram chat.</p>
</div>
</div>
<div id="work-on-your-own-project" class="section level2" number="12.4">
<h2><span class="header-section-number">12.4</span> Work on your own project :)</h2>
</div>
</div>
</section>
</div>
</div>
</div>
<a href="grafana.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="more-raspberry-pi-lifehacks.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="book_assets/gitbook-2.6.7/js/app.min.js"></script>
<script src="book_assets/gitbook-2.6.7/js/lunr.js"></script>
<script src="book_assets/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="book_assets/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="book_assets/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="book_assets/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="book_assets/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="book_assets/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="book_assets/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"whatsapp": false,
"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": null,
"search": false,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>