Skip to content

Commit 30dff8a

Browse files
authored
Merge pull request SensorsIot#527 from Paraphraser/20220327-blynkserver-doco-master
20220327 Blynk Server documentation
2 parents 3c19fe2 + 0c23525 commit 30dff8a

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

docs/Containers/Blynk_server.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This document discusses an IOTstack-specific version of Blynk-Server. It is built on top of an [Ubuntu](https://hub.docker.com/_/ubuntu) base image using a *Dockerfile*.
44

5-
## References
5+
## <a name="references"></a>References
66

77
- [Ubuntu base image](https://hub.docker.com/_/ubuntu) at DockerHub
88
- [Peter Knight Blynk-Server fork](https://github.com/Peterkn2001/blynk-server) at GitHub (includes documentation)
@@ -18,7 +18,7 @@ Acknowledgement:
1818

1919
- Original writeup from @877dev
2020

21-
## Significant directories and files
21+
## <a name="significantFiles"></a>Significant directories and files
2222

2323
```
2424
~/IOTstack
@@ -56,30 +56,30 @@ Everything in ❽:
5656
* will be replaced if it is not present when the container starts; but
5757
* will never be overwritten if altered by you.
5858

59-
## How Blynk Server gets built for IOTstack
59+
## <a name="howBlynkServerIOTstackGetsBuilt"></a>How Blynk Server gets built for IOTstack
6060

61-
### GitHub Updates
61+
### <a name="dockerHubImages"></a>GitHub Updates
6262

6363
Periodically, the source code is updated and a new version is released. You can check for the latest version at the [releases page](https://github.com/Peterkn2001/blynk-server/releases/).
6464

65-
### IOTstack menu
65+
### <a name="iotstackMenu"></a>IOTstack menu
6666

6767
When you select Blynk Server in the IOTstack menu, the *template service definition* is copied into the *Compose* file.
6868

6969
> Under old menu, it is also copied to the *working service definition* and then not really used.
7070
71-
### IOTstack first run
71+
### <a name="iotstackFirstRun"></a>IOTstack first run
7272

7373
On a first install of IOTstack, you run the menu, choose your containers, and are told to do this:
7474

75-
```bash
75+
```console
7676
$ cd ~/IOTstack
7777
$ docker-compose up -d
7878
```
7979

8080
`docker-compose` reads the *Compose* file. When it arrives at the `blynk_server` fragment, it finds:
8181

82-
```
82+
```yaml
8383
blynk_server:
8484
build:
8585
context: ./.templates/blynk_server/.
@@ -99,7 +99,7 @@ The `BLYNK_SERVER_VERSION` argument is passed into the build process. This impli
9999
100100
The *Dockerfile* begins with:
101101
102-
```
102+
```Dockerfile
103103
FROM ubuntu
104104
```
105105

@@ -117,7 +117,7 @@ The ***local image*** is instantiated to become your running container.
117117

118118
When you run the `docker images` command after Blynk Server has been built, you *may* see two rows that are relevant:
119119

120-
```bash
120+
```console
121121
$ docker images
122122
REPOSITORY TAG IMAGE ID CREATED SIZE
123123
iotstack_blynk_server latest 3cd6445f8a7e 3 hours ago 652MB
@@ -131,15 +131,15 @@ You *may* see the same pattern in *Portainer*, which reports the ***base image**
131131

132132
> Whether you see one or two rows depends on the version of `docker-compose` you are using and how your version of `docker-compose` builds local images.
133133
134-
## Logging
134+
## <a name="logging"></a>Logging
135135

136136
You can inspect Blynk Server's log by:
137137

138-
```
138+
```console
139139
$ docker logs blynk_server
140140
```
141141

142-
## Changing Blynk Server's configuration
142+
## <a name="editConfiguration"></a>Changing Blynk Server's configuration
143143

144144
The first time you launch the `blynk_server` container, the following structure will be created in the persistent storage area:
145145

@@ -153,16 +153,16 @@ The first time you launch the `blynk_server` container, the following structure
153153

154154
The two `.properties` files can be used to alter Blynk Server's configuration. When you make change to these files, you activate then by restarting the container:
155155

156-
```
156+
```console
157157
$ cd ~/IOTstack
158158
$ docker-compose restart blynk_server
159159
```
160160

161-
## Getting a clean slate
161+
## <a name="cleanSlate"></a>Getting a clean slate
162162

163163
Erasing Blynk Server's persistent storage area triggers self-healing and restores known defaults:
164164

165-
```
165+
```console
166166
$ cd ~/IOTstack
167167
$ docker-compose rm --force --stop -v blynk_server
168168
$ sudo rm -rf ./volumes/blynk_server
@@ -172,21 +172,21 @@ Note:
172172

173173
* You can also remove individual configuration files and then trigger self-healing. For example, if you decide to edit `server.properties` and make a mess, you can restore the original default version like this:
174174

175-
```
175+
```console
176176
$ cd ~/IOTstack
177177
$ rm volumes/blynk_server/config/server.properties
178178
$ docker-compose restart blynk_server
179179
```
180180

181-
## Upgrading Blynk Server
181+
## <a name="upgradingBlynkServer"></a>Upgrading Blynk Server
182182

183183
To find out when a new version has been released, you need to visit the [Blynk-Server releases](https://github.com/Peterkn2001/blynk-server/releases/) page at GitHub.
184184

185185
At the time of writing, version 0.41.16 was the most up-to-date. Suppose that version 0.41.17 has been released and that you decide to upgrade:
186186

187187
1. Edit your *Compose* file to change the version nuumber:
188188

189-
```
189+
```yaml
190190
blynk_server:
191191
build:
192192
context: ./.templates/blynk_server/.
@@ -202,15 +202,15 @@ At the time of writing, version 0.41.16 was the most up-to-date. Suppose that ve
202202

203203
- If you only want to reconstruct the **local** image:
204204

205-
```
205+
```console
206206
$ cd ~/IOTstack
207207
$ docker-compose up --build -d blynk_server
208208
$ docker system prune -f
209209
```
210210

211211
- If you want to update the Ubuntu **base** image at the same time:
212212

213-
```
213+
```console
214214
$ cd ~/IOTstack
215215
$ docker-compose build --no-cache --pull blynk_server
216216
$ docker-compose up -d blynk_server
@@ -220,11 +220,11 @@ At the time of writing, version 0.41.16 was the most up-to-date. Suppose that ve
220220

221221
The second `prune` will only be needed if there is an old *base image* and that, in turn, depends on the version of `docker-compose` you are using and how your version of `docker-compose` builds local images.
222222

223-
## Using Blynk Server
223+
## <a name="usingBlynkServer"></a>Using Blynk Server
224224

225225
See the [References](#references) for documentation links.
226226

227-
### Connecting to the administrative UI
227+
### <a name="blynkAdmin"></a>Connecting to the administrative UI
228228

229229
To connect to the administrative interface, navigate to:
230230

@@ -237,30 +237,30 @@ You may encounter browser security warnings which you will have to acknowledge i
237237
- username = `[email protected]`
238238
- password = `admin`
239239

240-
### Change username and password
240+
### <a name="changePassword"></a>Change username and password
241241

242242
1. Click on Users > "email address" and edit email, name and password.
243243
2. Save changes.
244244
3. Restart the container using either Portainer or the command line:
245245

246-
```
246+
```console
247247
$ cd ~/IOTstack
248248
$ docker-compose restart blynk_server
249249
```
250250

251-
### Setup gmail
251+
### <a name="gmailSetup"></a>Setup gmail
252252

253253
Optional step, useful for getting the auth token emailed to you.
254254
(To be added once confirmed working....)
255255

256-
### iOS/Android app setup
256+
### <a name="mobileSetup"></a>iOS/Android app setup
257257

258258
1. When setting up the application on your mobile be sure to select "custom" setup [see](https://github.com/Peterkn2001/blynk-server#app-and-sketch-changes).
259259
2. Press "New Project"
260260
3. Give it a name, choose device "Raspberry Pi 3 B" so you have plenty of [virtual pins](http://help.blynk.cc/en/articles/512061-what-is-virtual-pins) available, and lastly select WiFi.
261261
4. Create project and the [auth token](https://docs.blynk.cc/#getting-started-getting-started-with-the-blynk-app-4-auth-token) will be emailed to you (if emails configured). You can also find the token in app under the phone app settings, or in the admin web interface by clicking Users>"email address" and scroll down to token.
262262

263-
### Quick usage guide for app
263+
### <a name="quickAppGuide"></a>Quick usage guide for app
264264

265265
1. Press on the empty page, the widgets will appear from the right.
266266
2. Select your widget, let's say a button.
@@ -273,7 +273,7 @@ Optional step, useful for getting the auth token emailed to you.
273273

274274
Enter Node-Red.....
275275

276-
### Node-RED
276+
### <a name="enterNodeRed"></a>Node-RED
277277

278278
1. Install `node-red-contrib-blynk-ws` from Manage Palette.
279279
2. Drag a "write event" node into your flow, and connect to a debug node

0 commit comments

Comments
 (0)