You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Containers/Blynk_server.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
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*.
4
4
5
-
## References
5
+
## <aname="references"></a>References
6
6
7
7
-[Ubuntu base image](https://hub.docker.com/_/ubuntu) at DockerHub
8
8
-[Peter Knight Blynk-Server fork](https://github.com/Peterkn2001/blynk-server) at GitHub (includes documentation)
@@ -18,7 +18,7 @@ Acknowledgement:
18
18
19
19
- Original writeup from @877dev
20
20
21
-
## Significant directories and files
21
+
## <aname="significantFiles"></a>Significant directories and files
22
22
23
23
```
24
24
~/IOTstack
@@ -56,30 +56,30 @@ Everything in ❽:
56
56
* will be replaced if it is not present when the container starts; but
57
57
* will never be overwritten if altered by you.
58
58
59
-
## How Blynk Server gets built for IOTstack
59
+
## <aname="howBlynkServerIOTstackGetsBuilt"></a>How Blynk Server gets built for IOTstack
60
60
61
-
### GitHub Updates
61
+
### <aname="dockerHubImages"></a>GitHub Updates
62
62
63
63
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/).
64
64
65
-
### IOTstack menu
65
+
### <aname="iotstackMenu"></a>IOTstack menu
66
66
67
67
When you select Blynk Server in the IOTstack menu, the *template service definition* is copied into the *Compose* file.
68
68
69
69
> Under old menu, it is also copied to the *working service definition* and then not really used.
70
70
71
-
### IOTstack first run
71
+
### <aname="iotstackFirstRun"></a>IOTstack first run
72
72
73
73
On a first install of IOTstack, you run the menu, choose your containers, and are told to do this:
74
74
75
-
```bash
75
+
```console
76
76
$ cd~/IOTstack
77
77
$ docker-compose up -d
78
78
```
79
79
80
80
`docker-compose` reads the *Compose* file. When it arrives at the `blynk_server` fragment, it finds:
81
81
82
-
```
82
+
```yaml
83
83
blynk_server:
84
84
build:
85
85
context: ./.templates/blynk_server/.
@@ -99,7 +99,7 @@ The `BLYNK_SERVER_VERSION` argument is passed into the build process. This impli
99
99
100
100
The *Dockerfile* begins with:
101
101
102
-
```
102
+
```Dockerfile
103
103
FROM ubuntu
104
104
```
105
105
@@ -117,7 +117,7 @@ The ***local image*** is instantiated to become your running container.
117
117
118
118
When you run the `docker images` command after Blynk Server has been built, you *may* see two rows that are relevant:
119
119
120
-
```bash
120
+
```console
121
121
$ docker images
122
122
REPOSITORY TAG IMAGE ID CREATED SIZE
123
123
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**
131
131
132
132
> 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.
The first time you launch the `blynk_server` container, the following structure will be created in the persistent storage area:
145
145
@@ -153,16 +153,16 @@ The first time you launch the `blynk_server` container, the following structure
153
153
154
154
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:
155
155
156
-
```
156
+
```console
157
157
$ cd~/IOTstack
158
158
$ docker-compose restart blynk_server
159
159
```
160
160
161
-
## Getting a clean slate
161
+
## <aname="cleanSlate"></a>Getting a clean slate
162
162
163
163
Erasing Blynk Server's persistent storage area triggers self-healing and restores known defaults:
* 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:
## <aname="upgradingBlynkServer"></a>Upgrading Blynk Server
182
182
183
183
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.
184
184
185
185
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:
186
186
187
187
1. Edit your *Compose* file to change the version nuumber:
188
188
189
-
```
189
+
```yaml
190
190
blynk_server:
191
191
build:
192
192
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
202
202
203
203
- If you only want to reconstruct the **local** image:
204
204
205
-
```
205
+
```console
206
206
$ cd ~/IOTstack
207
207
$ docker-compose up --build -d blynk_server
208
208
$ docker system prune -f
209
209
```
210
210
211
211
- If you want to update the Ubuntu **base** image at the same time:
@@ -220,11 +220,11 @@ At the time of writing, version 0.41.16 was the most up-to-date. Suppose that ve
220
220
221
221
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.
222
222
223
-
## Using Blynk Server
223
+
## <aname="usingBlynkServer"></a>Using Blynk Server
224
224
225
225
See the [References](#references) for documentation links.
226
226
227
-
### Connecting to the administrative UI
227
+
### <aname="blynkAdmin"></a>Connecting to the administrative UI
228
228
229
229
To connect to the administrative interface, navigate to:
230
230
@@ -237,30 +237,30 @@ You may encounter browser security warnings which you will have to acknowledge i
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).
259
259
2. Press "New Project"
260
260
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.
261
261
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.
262
262
263
-
### Quick usage guide for app
263
+
### <aname="quickAppGuide"></a>Quick usage guide for app
264
264
265
265
1. Press on the empty page, the widgets will appear from the right.
266
266
2. Select your widget, let's say a button.
@@ -273,7 +273,7 @@ Optional step, useful for getting the auth token emailed to you.
273
273
274
274
Enter Node-Red.....
275
275
276
-
### Node-RED
276
+
### <aname="enterNodeRed"></a>Node-RED
277
277
278
278
1. Install `node-red-contrib-blynk-ws` from Manage Palette.
279
279
2. Drag a "write event" node into your flow, and connect to a debug node
0 commit comments