aboutsummaryrefslogtreecommitdiff
path: root/public/simple-iot-application.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/simple-iot-application.html')
-rwxr-xr-xpublic/simple-iot-application.html453
1 files changed, 453 insertions, 0 deletions
diff --git a/public/simple-iot-application.html b/public/simple-iot-application.html
new file mode 100755
index 0000000..a09ed0e
--- /dev/null
+++ b/public/simple-iot-application.html
@@ -0,0 +1,453 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Simple IOT application supported by real-time monitoring and data history</title><meta name=description content="Initial thoughtsI have been developing these kind of application for the better part of my last5 years and people keep asking me how to approach developing such applicationand I will give a try explaining it here."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:sans-serif;line-height:1.35rem;font-size:16px;margin:0 auto}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}h1{font-size:xx-large}footer{margin-block-start:2rem}cap{text-transform:capitalize}table{max-width:100%;width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}ul.list li{padding:.2em 0}ul{line-height:1.4em}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;padding:0 1em;border:1px solid #dcdcdc}code{padding:0 3px;font-size:14px;border:0}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace}figure{margin-inline-start:0;margin-inline-end:0}figcaption{text-align:center}figcaption p{margin:.3em 0 0}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}nav.main{flex-grow:1}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){body{padding:15px}header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main itemscope itemtype=http://schema.org/SiteNavigationElement role=toolbar><a href=/>Home</a>
2<a href=https://git.mitjafelicijan.com/ target=_blank>Git</a>
3<a href=https://files.mitjafelicijan.com/ target=_blank>Files</a>
4<a href=/radio.pls target=_blank>Radio</a>
5<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a>
6<a href=/curriculum-vitae.html>CV</a>
7<a href=/index.xml target=_blank>RSS</a></nav></header><main role=main><article itemtype=http://schema.org/Article><h1 itemtype=headline>Simple IOT application supported by real-time monitoring and data history</h1><p><cap>post</cap>, Aug 11, 2017 on <a href=https://mitjafelicijan.com>Mitja Felicijan's blog</a><div><h2 id=initial-thoughts>Initial thoughts</h2><p>I have been developing these kind of application for the better part of my last
85 years and people keep asking me how to approach developing such application
9and I will give a try explaining it here.<p>IOT applications are really no different than any other kind of applications.
10We have data that needs to be collected and visualized in some form of tables or
11charts. The main difference here is that most of the times these data is
12collected by some kind of device foreign to developer that mainly operates in
13web domain. But fear not, it's not that different than writing some JavaScript.<p>There are many devices able to transmit data via wireless or wired network by
14default but for the sake of example we will be using commonly known Arduino with
15wireless module already on the board → <a href=https://store.arduino.cc/arduino-mkr1000>Arduino
16MKR1000</a>.<p>In order to make this little project as accessible to others as possible I will
17try to make it as inexpensive as possible. And by this I mean that I will avoid
18using hosted virtual servers and will be using my own laptop as a server. But
19you must buy Arduino MKR1000 to follow steps below. But if you would want to
20deploy this software I would suggest using
21<a href=https://www.digitalocean.com>DigitalOcean</a> → smallest VPS is only per month
22making this one of the most affordable option out there. Please notice that this
23software will not run on stock web hosting that only supports LAMP (Linux,
24Apache, MySQL, and PHP).<p>But before we begin please take notice that this is strictly experimental code
25and not well optimized and there are much better ways in handling some aspects
26of the application but that requires much deeper knowledge of technology that is
27not needed for an example like this.<p><strong>Development steps</strong><ol><li>Simple Python API that will receive and store incoming data.<li>Prototype C++ code that will read "sensor data" and transmit it to API.<li>Data visualization with charts → extends Python web application.</ol><p>Step 1. and 3. will share the same web application. One route will be dedicated
28to API and another to serving HTML with chart.<p>Schema below represents what we will try to achieve and how different parts
29correlates to each other.<figure><img src=/posts/iot-application/simple-iot-application-overview.svg alt=Overview></figure><h2 id=simple-python-api>Simple Python API</h2><p>I have always been a fan of simplicity so we will be using <a href=https://bottlepy.org/docs/dev/>Bottle: Python Web
30Framework</a>. It is a single file web framework
31that seriously simplifies working with routes, templating and has built-in web
32server that satisfies our need in this case.<p>First we need to install bottle package. This can be done by downloading
33<code>bottle.py</code> and placing it in the root of your application or by using pip
34software <code>pip install bottle --user</code>.<p>If you are using Linux or MacOS then Python is already installed. If you will
35try to test this on Windows please install <a href=https://www.python.org/downloads/windows/>Python for
36Windows</a>. There may be some problems
37with path when you will try to launch <code>python webapp.py</code> so please take care
38of this before you continue.<h3 id=basic-web-application>Basic web application</h3><p>Most basic bottle application is quite simple. Paste code below in
39<code>webapp.py</code> file and save.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
40</span></span><span style=display:flex><span>
41</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
42</span></span><span style=display:flex><span>
43</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
44</span></span><span style=display:flex><span>app = bottle.Bottle()
45</span></span><span style=display:flex><span>
46</span></span><span style=display:flex><span><span style=color:green># triggered when / is accessed from browser</span>
47</span></span><span style=display:flex><span><span style=color:green># only accepts GET → no POST allowed</span>
48</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>])
49</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
50</span></span><span style=display:flex><span> <span style=color:#00f>return</span> <span style=color:#a31515>&#34;howdy from python&#34;</span>
51</span></span><span style=display:flex><span>
52</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
53</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
54</span></span><span style=display:flex><span> bottle.run(
55</span></span><span style=display:flex><span> app = app,
56</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
57</span></span><span style=display:flex><span> port = 5000,
58</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
59</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
60</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
61</span></span><span style=display:flex><span> )
62</span></span></code></pre><p>To run this simple application you should open command prompt or terminal on
63your machine and go to the folder containing your file and type <code>python webapp.py</code>. If everything goes ok then open your web browser and point it to
64<code>http://0.0.0.0:5000</code>.<p>If you would like change the port of your application (like port 80) and not use
65root to run your app this will present a problem. The TCP/IP port numbers below
661024 are privileged ports → this is a security feature. So in order of
67simplicity and security use a port number above 1024 like I have used port 5000.<p>If this fails at any time please fix it before you continue, because nothing
68below will work otherwise.<p>We use 0.0.0.0 as default host so that this app is available over your local
69network. If you find your local ip <code>ifconfig</code> and try accessing this site
70with your phone (if on same network/router as your machine) this should work as
71well (example of such ip <code>http://192.168.1.15:5000</code>). This is a must have
72because Arduino will be accessing this application to send it's data.<h3 id=web-application-security>Web application security</h3><p>There is a lot to be said about security and is a topic of many books. Of course
73all this can not be written here but to just establish some basic security → you
74should always use SSL with your application. Some fantastic free certificates
75are available by <a href=https://letsencrypt.org>Let's Encrypt - Free SSL/TLS
76Certificates</a>. With SSL certificate installed you
77should then make use of HTTP headers and send your "API key" via a header. If
78your key is send via header then this key is encrypted by SSL and send encrypted
79over the network. Never send your api keys by GET parameter like
80<code>http://example.com/?api_key=somekeyvalue</code>. The problem that this kind of
81sending presents is that this key is visible in logs and by network sniffers.<p>There is a fantastic article describing some aspects about security: <a href=https://www.keycdn.com/blog/web-application-security-best-practices/>11 Web
82Application Security Best
83Practices</a>. Please
84check it out.<h3 id=simple-api-for-writing-data-points>Simple API for writing data-points</h3><p>We will now be using boilerplate code from example above and extend it to be
85SQLite3 because it plays well with Python and can store quite large amount of
86able to write data received by API to local storage. For example use I will use
87data. I have been using it to collect gigabytes of data in a single database
88without any corruption or problems → your experience may vary.<p>To avoid learning SQLite I will be using <a href=https://dataset.readthedocs.io/en/latest/index.html>Dataset: databases for lazy
89people</a>. This package
90abstracts SQL and simplifies writing and reading data from database. You should
91install this package with pip software <code>pip install dataset --user</code>.<p>Because API will use POST method I will be testing if code works correctly by
92using <a href=https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm>Restlet Client for Google
93Chrome</a>.
94This software also allows you to set headers → for basic security with API_KEY.<p>To quickly generate passwords or API keys I usually use this nifty website
95<a href=https://randomkeygen.com/>RandomKeygen</a>.<p>Copy and paste code below over your previous code in file <code>webapp.py</code>.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
96</span></span><span style=display:flex><span>
97</span></span><span style=display:flex><span><span style=color:#00f>import</span> time
98</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
99</span></span><span style=display:flex><span><span style=color:#00f>import</span> random
100</span></span><span style=display:flex><span><span style=color:#00f>import</span> dataset
101</span></span><span style=display:flex><span>
102</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
103</span></span><span style=display:flex><span>app = bottle.Bottle()
104</span></span><span style=display:flex><span>
105</span></span><span style=display:flex><span><span style=color:green># connects to sqlite database</span>
106</span></span><span style=display:flex><span><span style=color:green># check_same_thread=False allows using it in multi-threaded mode</span>
107</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;dsn&#34;</span>] = dataset.connect(<span style=color:#a31515>&#34;sqlite:///data.db?check_same_thread=False&#34;</span>)
108</span></span><span style=display:flex><span>
109</span></span><span style=display:flex><span><span style=color:green># api key that will be used in Arduino code</span>
110</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>
111</span></span><span style=display:flex><span>
112</span></span><span style=display:flex><span><span style=color:green># triggered when /api is accessed from browser</span>
113</span></span><span style=display:flex><span><span style=color:green># only accepts POST → no GET allowed</span>
114</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/api&#34;</span>, method=[<span style=color:#a31515>&#34;POST&#34;</span>])
115</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
116</span></span><span style=display:flex><span> status = 400
117</span></span><span style=display:flex><span> ts = int(time.time()) <span style=color:green># current timestamp</span>
118</span></span><span style=display:flex><span> value = bottle.request.body.read() <span style=color:green># data from device</span>
119</span></span><span style=display:flex><span> api_key = bottle.request.get_header(<span style=color:#a31515>&#34;Api_Key&#34;</span>) <span style=color:green># api key from header</span>
120</span></span><span style=display:flex><span>
121</span></span><span style=display:flex><span> <span style=color:green># outputs to console received data for debug reason</span>
122</span></span><span style=display:flex><span> print <span style=color:#a31515>&#34;&gt;&gt;&gt; </span><span style=color:#a31515>{}</span><span style=color:#a31515> :: </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(value, api_key)
123</span></span><span style=display:flex><span>
124</span></span><span style=display:flex><span> <span style=color:green># if api_key is correct and value is present</span>
125</span></span><span style=display:flex><span> <span style=color:green># then writes attribute to point table</span>
126</span></span><span style=display:flex><span> <span style=color:#00f>if</span> api_key == app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] <span style=color:#00f>and</span> value:
127</span></span><span style=display:flex><span> app.config[<span style=color:#a31515>&#34;dsn&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].insert(dict(ts=ts, value=value))
128</span></span><span style=display:flex><span> status = 200
129</span></span><span style=display:flex><span>
130</span></span><span style=display:flex><span> <span style=color:green># we only need to return status</span>
131</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.HTTPResponse(status=status, body=<span style=color:#a31515>&#34;&#34;</span>)
132</span></span><span style=display:flex><span>
133</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
134</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
135</span></span><span style=display:flex><span> bottle.run(
136</span></span><span style=display:flex><span> app = app,
137</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
138</span></span><span style=display:flex><span> port = 5000,
139</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
140</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
141</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
142</span></span><span style=display:flex><span> )
143</span></span></code></pre><p>To run this simply go to folder containing python file and run <code>python webapp.py</code> from terminal. If everything goes ok you should have simple API
144available via POST method on /api route.<p>After testing the service with Restlet Client you should be able to view your
145data in a database file <code>data.db</code>.<figure><img src=/posts/iot-application/iot-rest-example.png alt="REST settings example"></figure><p>You can also check the contents of new database file by using desktop client
146for SQLite → <a href=http://sqlitebrowser.org/>DB Browser for SQLite</a>.<figure><img src=/posts/iot-application/iot-sqlite-db.png alt="SQLite database example"></figure><p>Table structure is as simple as it can be. We have ts (timestamp) and value
147(value from Arduino). As you can see timestamp is generated on API side. If you
148would happen to have atomic clock on Arduino it would be then better to generate
149and send timestamp with the value. This would be particularity useful if we
150would be collecting sensor data at a higher frequency and then sending this data
151in bulk to API.<p>If you will deploy this app with uWSGI and multi-threaded, use DSN (Data Source
152Name) url with <code>?check_same_thread=False</code>.<p>Ok, now that we have some sort of a working API with some basic security so
153unwanted people can not post data to your database can we proceed further and
154try to program Arduino to send data to API.<h2 id=sending-data-to-api-with-arduino-mkr1000>Sending data to API with Arduino MKR1000</h2><p>First of all you should have MKR1000 module and microUSB cable to proceed. If
155you have ever done any work with Arduino you should know that you also need
156<a href=https://www.arduino.cc/en/Main/Software>Arduino IDE</a>. On provided link you
157should be able to download and install IDE. Once that task is completed and you
158have successfully run blink example you should proceed to the next step.<p>In order to use wireless capabilities of MKR1000 you need to first install
159<a href=https://www.arduino.cc/en/Reference/WiFi101>WiFi101 library</a> in Arduino IDE.
160Please check before you install, you may already have it installed.<p>Code below is a working example that sends data to API. Before you try to test
161your code make sure you have run Python web application. Then change settings
162for wifi, api endpoint and api_key. If by some reason code bellow doesn't work
163for you please leave a comment and I'll try to help.<p>Once you have opened IDE and copied this code try to compile and upload it.
164Then open "Serial monitor" to see if any output is presented by Arduino.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>#include</span> <span style=color:#00f>&lt;WiFi101.h&gt;</span><span style=color:#00f>
165</span></span></span><span style=display:flex><span><span style=color:#00f></span>
166</span></span><span style=display:flex><span><span style=color:green>// wifi settings
167</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>char</span> ssid[] = <span style=color:#a31515>&#34;ssid-name&#34;</span>;
168</span></span><span style=display:flex><span><span style=color:#2b91af>char</span> pass[] = <span style=color:#a31515>&#34;ssid-password&#34;</span>;
169</span></span><span style=display:flex><span>
170</span></span><span style=display:flex><span><span style=color:green>// api server enpoint
171</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>char</span> server[] = <span style=color:#a31515>&#34;192.168.6.22&#34;</span>;
172</span></span><span style=display:flex><span><span style=color:#2b91af>int</span> port = 5000;
173</span></span><span style=display:flex><span>
174</span></span><span style=display:flex><span><span style=color:green>// api key that must be the same as the one in Python code
175</span></span></span><span style=display:flex><span><span style=color:green></span>String api_key = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>;
176</span></span><span style=display:flex><span>
177</span></span><span style=display:flex><span><span style=color:green>// frequency data is sent in ms - every 5 seconds
178</span></span></span><span style=display:flex><span><span style=color:green></span><span style=color:#2b91af>int</span> timeout = 1000 * 5;
179</span></span><span style=display:flex><span>
180</span></span><span style=display:flex><span><span style=color:#2b91af>int</span> status = WL_IDLE_STATUS;
181</span></span><span style=display:flex><span>
182</span></span><span style=display:flex><span><span style=color:#2b91af>void</span> setup() {
183</span></span><span style=display:flex><span>
184</span></span><span style=display:flex><span> <span style=color:green>// initialize serial and wait for port to open:
185</span></span></span><span style=display:flex><span><span style=color:green></span> Serial.begin(9600);
186</span></span><span style=display:flex><span> delay(1000);
187</span></span><span style=display:flex><span>
188</span></span><span style=display:flex><span> <span style=color:green>// check for the presence of the shield
189</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>if</span> (WiFi.status() == WL_NO_SHIELD) {
190</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;WiFi shield not present&#34;</span>);
191</span></span><span style=display:flex><span> <span style=color:#00f>while</span> (true);
192</span></span><span style=display:flex><span> }
193</span></span><span style=display:flex><span>
194</span></span><span style=display:flex><span> <span style=color:green>// attempt to connect to wifi network
195</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:#00f>while</span> (status != WL_CONNECTED) {
196</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;Attempting to connect to SSID: &#34;</span>);
197</span></span><span style=display:flex><span> Serial.println(ssid);
198</span></span><span style=display:flex><span> status = WiFi.begin(ssid, pass);
199</span></span><span style=display:flex><span> <span style=color:green>// wait 10 seconds for connection
200</span></span></span><span style=display:flex><span><span style=color:green></span> delay(10000);
201</span></span><span style=display:flex><span> }
202</span></span><span style=display:flex><span>
203</span></span><span style=display:flex><span> <span style=color:green>// output wifi status to serial monitor
204</span></span></span><span style=display:flex><span><span style=color:green></span> Serial.print(<span style=color:#a31515>&#34;SSID: &#34;</span>);
205</span></span><span style=display:flex><span> Serial.println(WiFi.SSID());
206</span></span><span style=display:flex><span>
207</span></span><span style=display:flex><span> IPAddress ip = WiFi.localIP();
208</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;IP Address: &#34;</span>);
209</span></span><span style=display:flex><span> Serial.println(ip);
210</span></span><span style=display:flex><span>
211</span></span><span style=display:flex><span> <span style=color:#2b91af>long</span> rssi = WiFi.RSSI();
212</span></span><span style=display:flex><span> Serial.print(<span style=color:#a31515>&#34;signal strength (RSSI):&#34;</span>);
213</span></span><span style=display:flex><span> Serial.print(rssi);
214</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34; dBm&#34;</span>);
215</span></span><span style=display:flex><span>}
216</span></span><span style=display:flex><span>
217</span></span><span style=display:flex><span><span style=color:#2b91af>void</span> loop() {
218</span></span><span style=display:flex><span> WiFiClient client;
219</span></span><span style=display:flex><span>
220</span></span><span style=display:flex><span> <span style=color:#00f>if</span> (client.connect(server, port)) {
221</span></span><span style=display:flex><span>
222</span></span><span style=display:flex><span> <span style=color:green>// I use random number generator for this example
223</span></span></span><span style=display:flex><span><span style=color:green></span> <span style=color:green>// but you can use analog or digital inputs from arduino
224</span></span></span><span style=display:flex><span><span style=color:green></span> String content = String(random(1000));
225</span></span><span style=display:flex><span>
226</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;POST /api HTTP/1.1&#34;</span>);
227</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Connection: close&#34;</span>);
228</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Api-Key: &#34;</span> + api_key);
229</span></span><span style=display:flex><span> client.println(<span style=color:#a31515>&#34;Content-Length: &#34;</span> + String(content.length()));
230</span></span><span style=display:flex><span> client.println();
231</span></span><span style=display:flex><span> client.println(content);
232</span></span><span style=display:flex><span>
233</span></span><span style=display:flex><span> delay(100);
234</span></span><span style=display:flex><span> client.stop();
235</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;Data sent successfully ...&#34;</span>);
236</span></span><span style=display:flex><span>
237</span></span><span style=display:flex><span> } <span style=color:#00f>else</span> {
238</span></span><span style=display:flex><span> Serial.println(<span style=color:#a31515>&#34;Problem sending data ...&#34;</span>);
239</span></span><span style=display:flex><span> }
240</span></span><span style=display:flex><span>
241</span></span><span style=display:flex><span> <span style=color:green>// waits for x seconds and continue looping
242</span></span></span><span style=display:flex><span><span style=color:green></span> delay(timeout);
243</span></span><span style=display:flex><span>}
244</span></span></code></pre><p>As seen from example you can notice that Arduino is generating random integer
245between [ 0 .. 1000 ]. You can easily replace this with a temperature sensor or
246any other kind of sensor.<p>Now that we have API under the hood and Arduino is sending demo data we can now
247focus on data visualization.<h2 id=data-visualization>Data visualization</h2><p>Before we continue we should examine our project folder structure. Currently we
248only have two files in our project:<p><em>simple-iot-app/</em><ul><li><em>webapp.py</em><li><em>data.db</em></ul><p>We will now add HTML template that will contain CSS and JavaScript code inline
249for the simplicity reason. And for the bottle framework to be able to scan root
250application folder for templates we will add <code>bottle.TEMPLATE_PATH.insert(0, "./")</code> in <code>webapp.py</code>. By default bottle framework uses <code>views/</code>
251subfolder to store templates. This is not the ideal situation and if you will
252use bottle to develop web applications you should use native behavior and store
253templates in it's predefined folder. But for the sake of example we will
254over-ride this. Be careful to fully replace your code with new code that is
255provided below. Avoid partially replacing code in file :) Also new code for
256reading data-points is provided in Python example below.<p>First we add new route to our web application. It should be trigger when browser
257hits root of application <code>http://0.0.0.0:5000/</code>. This route will do nothing
258more than render <code>frontend.html</code> template. This is done by <code>return bottle.template("frontend.html")</code>. Check code below to further examine how
259exactly this is done.<p>Now we will expand <code>/api</code> route and use different methods to write or read
260data-points. For writing data-point we will use POST method and for reading
261points we will use GET method. GET method will return JSON object with latest
262readings and historical data.<p>There is a fantastic JavaScript library for plotting time-series charts called
263<a href=https://www.metricsgraphicsjs.org>MetricsGraphics.js</a> that is based on
264<a href=https://d3js.org/>D3.js</a> library for visualizing data.<p>Data schema required by MetricsGraphics.js → to achieve this we need to
265transform data from database into this format:<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>[
266</span></span><span style=display:flex><span> {
267</span></span><span style=display:flex><span> &#34;date&#34;: <span style=color:#a31515>&#34;2017-08-11 01:07:20&#34;</span>,
268</span></span><span style=display:flex><span> &#34;value&#34;: 933
269</span></span><span style=display:flex><span> },
270</span></span><span style=display:flex><span> {
271</span></span><span style=display:flex><span> &#34;date&#34;: <span style=color:#a31515>&#34;2017-08-11 01:07:30&#34;</span>,
272</span></span><span style=display:flex><span> &#34;value&#34;: 743
273</span></span><span style=display:flex><span> }
274</span></span><span style=display:flex><span>]
275</span></span></code></pre><p>Web application is now complete and we only need <code>frontend.html</code> that we
276will develop now. If you would try to start web app now and go to root app this
277will return error because we don't have frontend.html yet.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># -*- coding: utf-8 -*-</span>
278</span></span><span style=display:flex><span>
279</span></span><span style=display:flex><span><span style=color:#00f>import</span> time
280</span></span><span style=display:flex><span><span style=color:#00f>import</span> bottle
281</span></span><span style=display:flex><span><span style=color:#00f>import</span> json
282</span></span><span style=display:flex><span><span style=color:#00f>import</span> datetime
283</span></span><span style=display:flex><span><span style=color:#00f>import</span> random
284</span></span><span style=display:flex><span><span style=color:#00f>import</span> dataset
285</span></span><span style=display:flex><span>
286</span></span><span style=display:flex><span><span style=color:green># initializing bottle app</span>
287</span></span><span style=display:flex><span>app = bottle.Bottle()
288</span></span><span style=display:flex><span>
289</span></span><span style=display:flex><span><span style=color:green># adds root directory as template folder</span>
290</span></span><span style=display:flex><span>bottle.TEMPLATE_PATH.insert(0, <span style=color:#a31515>&#34;./&#34;</span>)
291</span></span><span style=display:flex><span>
292</span></span><span style=display:flex><span><span style=color:green># connects to sqlite database</span>
293</span></span><span style=display:flex><span><span style=color:green># check_same_thread=False allows using it in multi-threaded mode</span>
294</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;db&#34;</span>] = dataset.connect(<span style=color:#a31515>&#34;sqlite:///data.db?check_same_thread=False&#34;</span>)
295</span></span><span style=display:flex><span>
296</span></span><span style=display:flex><span><span style=color:green># api key that will be used in Arduino code</span>
297</span></span><span style=display:flex><span>app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] = <span style=color:#a31515>&#34;JtF2aUE5SGHfVJBCG5SH&#34;</span>
298</span></span><span style=display:flex><span>
299</span></span><span style=display:flex><span><span style=color:green># triggered when / is accessed from browser</span>
300</span></span><span style=display:flex><span><span style=color:green># only accepts GET → no POST allowed</span>
301</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>])
302</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
303</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.template(<span style=color:#a31515>&#34;frontend.html&#34;</span>)
304</span></span><span style=display:flex><span>
305</span></span><span style=display:flex><span><span style=color:green># triggered when /api is accessed from browser</span>
306</span></span><span style=display:flex><span><span style=color:green># accepts POST and GET</span>
307</span></span><span style=display:flex><span>@app.route(<span style=color:#a31515>&#34;/api&#34;</span>, method=[<span style=color:#a31515>&#34;GET&#34;</span>, <span style=color:#a31515>&#34;POST&#34;</span>])
308</span></span><span style=display:flex><span><span style=color:#00f>def</span> route_default():
309</span></span><span style=display:flex><span>
310</span></span><span style=display:flex><span> <span style=color:green># if method is POST then we write datapoint</span>
311</span></span><span style=display:flex><span> <span style=color:#00f>if</span> bottle.request.method == <span style=color:#a31515>&#34;POST&#34;</span>:
312</span></span><span style=display:flex><span> status = 400
313</span></span><span style=display:flex><span> ts = int(time.time()) <span style=color:green># current timestamp</span>
314</span></span><span style=display:flex><span> value = bottle.request.body.read() <span style=color:green># data from device</span>
315</span></span><span style=display:flex><span> api_key = bottle.request.get_header(<span style=color:#a31515>&#34;Api-Key&#34;</span>) <span style=color:green># api key from header</span>
316</span></span><span style=display:flex><span>
317</span></span><span style=display:flex><span> <span style=color:green># outputs to console recieved data for debug reason</span>
318</span></span><span style=display:flex><span> print <span style=color:#a31515>&#34;&gt;&gt;&gt; </span><span style=color:#a31515>{}</span><span style=color:#a31515> :: </span><span style=color:#a31515>{}</span><span style=color:#a31515>&#34;</span>.format(value, api_key)
319</span></span><span style=display:flex><span>
320</span></span><span style=display:flex><span> <span style=color:green># if api_key is correct and value is present</span>
321</span></span><span style=display:flex><span> <span style=color:green># then writes attribute to point table</span>
322</span></span><span style=display:flex><span> <span style=color:#00f>if</span> api_key == app.config[<span style=color:#a31515>&#34;api_key&#34;</span>] <span style=color:#00f>and</span> value:
323</span></span><span style=display:flex><span> app.config[<span style=color:#a31515>&#34;db&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].insert(dict(ts=ts, value=value))
324</span></span><span style=display:flex><span> status = 200
325</span></span><span style=display:flex><span>
326</span></span><span style=display:flex><span> <span style=color:green># we only need to return status</span>
327</span></span><span style=display:flex><span> <span style=color:#00f>return</span> bottle.HTTPResponse(status=status, body=<span style=color:#a31515>&#34;&#34;</span>)
328</span></span><span style=display:flex><span>
329</span></span><span style=display:flex><span> <span style=color:green># if method is GET then we read datapoint</span>
330</span></span><span style=display:flex><span> <span style=color:#00f>else</span>:
331</span></span><span style=display:flex><span> response = []
332</span></span><span style=display:flex><span> datapoints = app.config[<span style=color:#a31515>&#34;db&#34;</span>][<span style=color:#a31515>&#34;point&#34;</span>].all()
333</span></span><span style=display:flex><span>
334</span></span><span style=display:flex><span> <span style=color:#00f>for</span> point <span style=color:#00f>in</span> datapoints:
335</span></span><span style=display:flex><span> response.append({
336</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;date&#34;</span>: datetime.datetime.fromtimestamp(int(point[<span style=color:#a31515>&#34;ts&#34;</span>])).strftime(<span style=color:#a31515>&#34;%Y-%m-</span><span style=color:#a31515>%d</span><span style=color:#a31515> %H:%M:%S&#34;</span>),
337</span></span><span style=display:flex><span> <span style=color:#a31515>&#34;value&#34;</span>: point[<span style=color:#a31515>&#34;value&#34;</span>]
338</span></span><span style=display:flex><span> })
339</span></span><span style=display:flex><span>
340</span></span><span style=display:flex><span> bottle.response.content_type = <span style=color:#a31515>&#34;application/json&#34;</span>
341</span></span><span style=display:flex><span> <span style=color:#00f>return</span> json.dumps(response)
342</span></span><span style=display:flex><span>
343</span></span><span style=display:flex><span><span style=color:green># starting server on http://0.0.0.0:5000</span>
344</span></span><span style=display:flex><span><span style=color:#00f>if</span> __name__ == <span style=color:#a31515>&#34;__main__&#34;</span>:
345</span></span><span style=display:flex><span> bottle.run(
346</span></span><span style=display:flex><span> app = app,
347</span></span><span style=display:flex><span> host = <span style=color:#a31515>&#34;0.0.0.0&#34;</span>,
348</span></span><span style=display:flex><span> port = 5000,
349</span></span><span style=display:flex><span> debug = <span style=color:#00f>True</span>,
350</span></span><span style=display:flex><span> reloader = <span style=color:#00f>True</span>,
351</span></span><span style=display:flex><span> catchall = <span style=color:#00f>True</span>,
352</span></span><span style=display:flex><span> )
353</span></span></code></pre><p>And now finally we can implement <code>frontend.html</code>. Create file with this name
354and copy code below. When you are done you can start web application. Steps for
355this part are listed below the code.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:#00f>&lt;!DOCTYPE html&gt;</span>
356</span></span><span style=display:flex><span>&lt;html&gt;
357</span></span><span style=display:flex><span>
358</span></span><span style=display:flex><span> &lt;head&gt;
359</span></span><span style=display:flex><span> &lt;meta charset=<span style=color:#a31515>&#34;utf-8&#34;</span>&gt;
360</span></span><span style=display:flex><span> &lt;title&gt;Simple IOT application&lt;/title&gt;
361</span></span><span style=display:flex><span> &lt;/head&gt;
362</span></span><span style=display:flex><span>
363</span></span><span style=display:flex><span> &lt;body&gt;
364</span></span><span style=display:flex><span>
365</span></span><span style=display:flex><span> &lt;h1&gt;Simple IOT application&lt;/h1&gt;
366</span></span><span style=display:flex><span>
367</span></span><span style=display:flex><span> &lt;div class=<span style=color:#a31515>&#34;chart-placeholder&#34;</span>&gt;
368</span></span><span style=display:flex><span> &lt;div id=<span style=color:#a31515>&#34;chart&#34;</span>&gt;&lt;/div&gt;
369</span></span><span style=display:flex><span> &lt;/div&gt;
370</span></span><span style=display:flex><span>
371</span></span><span style=display:flex><span> <span style=color:green>&lt;!-- application main script --&gt;</span>
372</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js&#34;</span>&gt;&lt;/script&gt;
373</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.0/d3.min.js&#34;</span>&gt;&lt;/script&gt;
374</span></span><span style=display:flex><span> &lt;script src=<span style=color:#a31515>&#34;https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.11.0/metricsgraphics.min.js&#34;</span>&gt;&lt;/script&gt;
375</span></span><span style=display:flex><span> &lt;script&gt;
376</span></span><span style=display:flex><span> <span style=color:#00f>function</span> fetch_and_render() {
377</span></span><span style=display:flex><span> d3.json(<span style=color:#a31515>&#34;/api&#34;</span>, <span style=color:#00f>function</span>(data) {
378</span></span><span style=display:flex><span> data = MG.convert.date(data, <span style=color:#a31515>&#34;date&#34;</span>, <span style=color:#a31515>&#34;%Y-%m-%d %H:%M:%S&#34;</span>);
379</span></span><span style=display:flex><span> MG.data_graphic({
380</span></span><span style=display:flex><span> data: data,
381</span></span><span style=display:flex><span> chart_type: <span style=color:#a31515>&#34;line&#34;</span>,
382</span></span><span style=display:flex><span> full_width: <span style=color:#00f>true</span>,
383</span></span><span style=display:flex><span> height: 270,
384</span></span><span style=display:flex><span> target: document.getElementById(<span style=color:#a31515>&#34;chart&#34;</span>),
385</span></span><span style=display:flex><span> x_accessor: <span style=color:#a31515>&#34;date&#34;</span>,
386</span></span><span style=display:flex><span> y_accessor: <span style=color:#a31515>&#34;value&#34;</span>
387</span></span><span style=display:flex><span> });
388</span></span><span style=display:flex><span> });
389</span></span><span style=display:flex><span> }
390</span></span><span style=display:flex><span> window.onload = <span style=color:#00f>function</span>() {
391</span></span><span style=display:flex><span> <span style=color:green>// initial call for rendering
392</span></span></span><span style=display:flex><span><span style=color:green></span> fetch_and_render();
393</span></span><span style=display:flex><span>
394</span></span><span style=display:flex><span> <span style=color:green>// updates chart every 5 seconds
395</span></span></span><span style=display:flex><span><span style=color:green></span> setInterval(<span style=color:#00f>function</span>() {
396</span></span><span style=display:flex><span> fetch_and_render();
397</span></span><span style=display:flex><span> }, 5000);
398</span></span><span style=display:flex><span> }
399</span></span><span style=display:flex><span> &lt;/script&gt;
400</span></span><span style=display:flex><span>
401</span></span><span style=display:flex><span> <span style=color:green>&lt;!-- application styles --&gt;</span>
402</span></span><span style=display:flex><span> &lt;style&gt;
403</span></span><span style=display:flex><span> body {
404</span></span><span style=display:flex><span> <span style=color:#00f>font</span>: 13<span style=color:#2b91af>px</span> <span style=color:#00f>sans-serif</span>;
405</span></span><span style=display:flex><span> <span style=color:#00f>padding</span>: 20<span style=color:#2b91af>px</span> 50<span style=color:#2b91af>px</span>;
406</span></span><span style=display:flex><span> }
407</span></span><span style=display:flex><span> .<span style=color:#2b91af>chart-placeholder</span> {
408</span></span><span style=display:flex><span> <span style=color:#00f>border</span>: 2<span style=color:#2b91af>px</span> <span style=color:#00f>solid</span> #ccc;
409</span></span><span style=display:flex><span> <span style=color:#00f>width</span>: 100<span style=color:#2b91af>%</span>;
410</span></span><span style=display:flex><span> <span style=color:#00f>user-select</span>: <span style=color:#00f>none</span>;
411</span></span><span style=display:flex><span> }
412</span></span><span style=display:flex><span> <span style=color:green>/* chart styles */</span>
413</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-line1-color</span> {
414</span></span><span style=display:flex><span> stroke: <span style=color:#00f>red</span>;
415</span></span><span style=display:flex><span> stroke-width: 2;
416</span></span><span style=display:flex><span> }
417</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-main-area</span>, .<span style=color:#2b91af>mg-main-line</span> {
418</span></span><span style=display:flex><span> fill: #fff;
419</span></span><span style=display:flex><span> }
420</span></span><span style=display:flex><span> .<span style=color:#2b91af>mg-x-axis</span> line, .<span style=color:#2b91af>mg-y-axis</span> line {
421</span></span><span style=display:flex><span> stroke: #b3b2b2;
422</span></span><span style=display:flex><span> stroke-width: 1<span style=color:#2b91af>px</span>;
423</span></span><span style=display:flex><span> }
424</span></span><span style=display:flex><span> &lt;/style&gt;
425</span></span><span style=display:flex><span>
426</span></span><span style=display:flex><span> &lt;/body&gt;
427</span></span><span style=display:flex><span>
428</span></span><span style=display:flex><span>&lt;/html&gt;
429</span></span></code></pre><p>Now the folder structure should look like:<p><em>simple-iot-app/</em><ul><li><em>webapp.py</em><li><em>data.db</em><li><em>frontend.html</em></ul><p>Ok, lets now start application and start feeding it data.<ol><li><code>python webapp.py</code><li>connect Arduino MKR1000 to power source<li>open browser and go to <code>http://0.0.0.0:5000</code></ol><p>If everything goes well you should be seeing new data-points rendered on chart
430every 5 seconds.<p>If you navigate to <code>http://0.0.0.0:5000</code> you should see rendered chart as
431shown on picture below.<figure><img src=/posts/iot-application/iot-app-output.png alt="Application output"></figure><p>Complete application with all the code is available for
432<a href=/posts/iot-application/simple-iot-application.zip>download</a>.<h2 id=conclusion>Conclusion</h2><p>I hope this clarifies some aspects of IOT application development. Of course
433this is a minimal example and is far from what can be done in real life with
434some further dive into other technologies.<p>If you would like to continue exploring IOT world here are some interesting
435resources for you to examine:<ul><li><a href=https://www.allaboutcircuits.com/projects/reading-sensors-with-an-arduino/>Reading Sensors with an Arduino</a><li><a href=http://www.hivemq.com/blog/how-to-get-started-with-mqtt>MQTT 101 – How to Get Started with the lightweight IoT Protocol</a><li><a href=https://www.html5rocks.com/en/tutorials/eventsource/basics/>Stream Updates with Server-Sent Events</a><li><a href=http://www.tutorialspoint.com/internet_of_things/>Internet of Things (IoT) Tutorials</a></ul><p>Any comment or additional ideas are welcomed in comments below.</div></article></main><section><hr><h2>Posts from blogs I follow around the net</h2><ul><li><a href=https://chotrin.org/writing/2023-10-20.html target=_blank rel=noopener>OpenBSD upgrade and fall things.</a><div>Been AFK for a bit. It's autumn and I upgraded this server to OpenBSD 7.4! — <a href=https://chotrin.org>chötrin's wiki.</a><li><a href=https://mirzapandzo.com/next-image-url-parameter-is-valid-but-upstream-response-is-invalid target=_blank rel=noopener>Next/Image "url" parameter is valid but upstream response is invalid</a><div>Getting "url" parameter is valid but upstream response is invalid error with Next/Image on WSL2 — <a href=https://mirzapandzo.com/>Mirza Pandzo's Blog</a><li><a href=https://drewdevault.com/2023/10/13/Going-off-script.html target=_blank rel=noopener>Going off-script</a><div>There is a phenomenon in society which I find quite bizarre. Upon our entry to
436this mortal coil, we are endowed with self-awareness, agency, and free will.
437Each of th… — <a href=https://drewdevault.com>Drew DeVault's blog</a><li><a href=https://solar.lowtechmagazine.com/2023/10/workshop-in-rotterdam-how-to-build-a-bike-generator/ target=_blank rel=noopener>Workshop in Rotterdam: How to Build a Bike Generator</a><div>Afbeelding: Low-tech Magazine workshop in Rotterdam, the Netherlands. Poster: Marie Verdeil. Image: Sara Vercauteren
438The workshop takes place on behalf of the “Hou… — <a href=https://solar.lowtechmagazine.com/posts/>LOW←TECH MAGAZINE English</a><li><a href="http://offbeatpursuit.com:80/blog/?id=24" target=_blank rel=noopener>Printf debugging</a><div>tags:
439plan9
440There’s no shame in that. Yes, there is documentation, code to be
441read, and debuggers to be used. But sometimes you just need to “see”
442what is happening.
443So… — <a href=http://offbeatpursuit.com:80/blog/>WLOG - blog</a><li><a href=https://neil.computer/notes/chart-of-accounts-for-startups-and-saas-companies/ target=_blank rel=noopener>Chart of Accounts for Startups and SaaS Companies</a><div>Accounting is fundamental to starting a business. You need to have a basic understanding of accounting principles and essential bookkeeping. I had to learn it. Ther… — <a href=https://neil.computer/>Neil Panchal</a><li><a href=https://journal.valeriansaliou.name/deploy-a-nomad-cluster-on-alpine-linux-with-vultr/ target=_blank rel=noopener>Deploy a Nomad Cluster on Alpine Linux with Vultr</a><div>After spending countless hours trying to understand how to deploy my apps on Kubernetes for the first time to host Mirage, an AI API service that I run, I ended up … — <a href=https://journal.valeriansaliou.name/>Valerian Saliou</a><li><a href=https://jcs.org/2023/10/17/wikipedia target=_blank rel=noopener>Wikipedia Reader 1.0 Released</a><div>Wikipedia Reader
4441.0 has been released:
445wikipedia-1.0.sit
446(StuffIt 3 archive, includes
447source code
448and THINK C 5 project file)
449SHA256: 360e12d064f6579695f1e627ce34cb2f0… — <a href=https://jcs.org/>joshua stein</a></ul><p><a href=https://git.sr.ht/~sircmpwn/openring>Generated with openring.</a></section><footer><hr><p><big><strong>Want to comment or have something to add?</strong></big><p>You can write me an email
450at <a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or
451catch up with me <a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.<hr><p>This website does not track you. Content is made available under
452the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified
453otherwise. Blog is also available as <a href=/index.xml target=_blank>RSS feed</a>.</footer> \ No newline at end of file