@rhizomatics/signalk-einklabel-plugin 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -2
- package/README.md +13 -8
- package/package.json +5 -4
- package/templates/tide.svg +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
# 0.6.1
|
|
2
|
+
- Corrected tide lunar phase path from `environment.moonPhase.name` to `environment.moon.phaseName`
|
|
1
3
|
# 0.6.0
|
|
2
|
-
- Added ability to select images for inclusion in SVG
|
|
4
|
+
- Added ability to select images for inclusion in SVG templates based on SignalK path value
|
|
5
|
+
- Pass a directory of assets, and it will pick the SVG file matching the SignalK value
|
|
6
|
+
- Matching will cope with "Waning Gibbous" -> `waning_gibbous.svg`
|
|
7
|
+
- If no match, image will be blank
|
|
3
8
|
- New image selection used to add lunar phase to tide clock example
|
|
4
|
-
- Requires a source for `environment.
|
|
9
|
+
- Requires a source for `environment.moon.phaseName`, for example the `dervived-data` plugin
|
|
10
|
+
- New `resources` directory for composable SVG assets
|
|
5
11
|
# 0.5.1
|
|
6
12
|
- Work around `resvg-wasm` font limitations by overriding generic font family with matching font name prior to rendering
|
|
7
13
|
# 0.5.0
|
package/README.md
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
# eInk Labels for SignalK
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
** Fully working but limited vendor/product support **
|
|
4
4
|
|
|
5
|
-
A SignalK plugin to display data from SignalK paths, APIs and plugins on Electronic Shelf Labels over a Bluetooth Low Energy (BLE) connection using simple SVG templates.
|
|
5
|
+
A SignalK plugin to display data from SignalK paths, APIs and plugins on Electronic Shelf Labels (ESL) over a Bluetooth Low Energy (BLE) connection using simple SVG templates.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## What is an ESL?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Electronic Shelf Labels are [eInk](https://en.wikipedia.org/wiki/E_Ink) devices that consume very little battery energy, presuming they are not constantly updated - the battery is used only when the display changes, and a periodic BLE check for incoming changes. Perfect for info that changes only once or twice a day, like tidal information.
|
|
10
|
+
|
|
11
|
+
Since they are designed to be used in large quantity in small shops, they are cheap and simple devices. Earlier models required dedicated controllers, or updates over Wifi or NFC, whereas many modern ones are standalone BLE devices that can be updated from a phone or server.
|
|
12
|
+
|
|
13
|
+
Being battery operated, they can be stuck on anywhere without wiring - the only constraints are bluetooth range, visibility (they need ambient light since the display is more like paper than a traditional lit-up electronic display) and out of the weather since the devices are intended for indoor use.
|
|
10
14
|
|
|
11
|
-
Unlike some eInk projects, this plugin doesn't require any physical modification to the labels, or loading any new firmware. It can send an image to a supported shelf label fresh out of the box.
|
|
12
15
|
|
|
13
16
|
## Pre-requisites
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
Unlike some eInk projects, this plugin doesn't require any physical modification to the labels, or loading any new firmware. It can send an image to a supported shelf label fresh out of the box.
|
|
19
|
+
|
|
20
|
+
Most of these requirements are about making SignalK work with Bluetooth Low Energy, which is good thing to have anyway, since vendors like Victron, Switchbot, Ruuvi and others have BLE enabled hardware that's useful to have on a boat. [Direct BLE support](https://github.com/SignalK/signalk-server/issues/2411) in SignalK is being planned in 2026.
|
|
16
21
|
|
|
17
22
|
1. A SignalK server, preferably running Linux (MacOS does weird things with bluetooth)
|
|
18
23
|
2. A Bluetooth adapter, that can handle BLE (Bluetooth Low Energy), which is Bluetooth v4.0 or higher
|
|
@@ -53,7 +58,7 @@ npm install @rhizomatics/signalk-einklabel-plugin
|
|
|
53
58
|
|
|
54
59
|
The tide clock needs the [signalk-tides](https://github.com/openwatersio/signalk-tides) plugin to be installed and publishing tides to the Resources API. The [tide.svg](https://github.com/rhizomatics/signalk-einklabel-plugin/blob/main/templates/tide.svg) can be customized to run with other APIs or take data only from SignalK data paths.
|
|
55
60
|
|
|
56
|
-
To show the lunar phase, the `environment.
|
|
61
|
+
To show the lunar phase, the `environment.moon.phaseName` path is required, which can
|
|
57
62
|
be easily achieved by installing and configuring the `derived-data` plugin.
|
|
58
63
|
|
|
59
64
|
## Templating
|
|
@@ -109,7 +114,7 @@ These can all be combined as in `source=resources,resource=tides,path=extremes[2
|
|
|
109
114
|
The same `<desc>` mechanism works on an `<image>` element instead of a `<text>` element, for a value that's better shown as a picture than as text - a moon phase icon, a wind direction arrow, a weather condition glyph, and so on. Rather than substituting text, the resolved value picks one of a directory of `.svg` files to embed, by an extra required `assets=` key naming that directory (resolved relative to the template file itself, so a bundled template and a user override both work the same way). For example, the tide clock's moon phase icon uses:
|
|
110
115
|
|
|
111
116
|
```
|
|
112
|
-
path=environment.
|
|
117
|
+
path=environment.moon.phaseName,assets=../resources/svg/lunar_phases
|
|
113
118
|
```
|
|
114
119
|
|
|
115
120
|
The resolved value (e.g. `"Waning Gibbous"`, as published by the [derived-data](https://www.npmjs.com/package/signalk-derived-data) plugin) is normalized to match a filename - lower-cased, punctuation and spaces collapsed to underscores - so `"Waning Gibbous"` picks `waning_gibbous.svg` out of that directory. If the underlying path has no value at all (e.g. the `derived-data` plugin isn't installed), or the value doesn't normalize to any file in the directory, the `<image>` element is simply omitted from that render - no broken image, no placeholder, nothing shown.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhizomatics/signalk-einklabel-plugin",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "Display SignalK data on eInk Electronic Shelf Labels",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build"
|
|
24
24
|
},
|
|
25
25
|
"signalk": {
|
|
26
|
-
"displayName": "eInk Label
|
|
26
|
+
"displayName": "eInk Label Displays",
|
|
27
27
|
"appIcon": "docs/assets/icons/icon_tmp.png",
|
|
28
28
|
"screenshots": [
|
|
29
29
|
"docs/assets/screenshots/example_tidal_clock.png"
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"esl",
|
|
39
39
|
"display",
|
|
40
40
|
"instrument",
|
|
41
|
-
"ble"
|
|
41
|
+
"ble",
|
|
42
|
+
"tides"
|
|
42
43
|
],
|
|
43
44
|
"engines": {
|
|
44
45
|
"node": ">=18"
|
package/templates/tide.svg
CHANGED
|
@@ -269,4 +269,4 @@
|
|
|
269
269
|
id="moon_phase"
|
|
270
270
|
x="340.3974"
|
|
271
271
|
y="90.153488"><desc
|
|
272
|
-
id="desc22">path=environment.
|
|
272
|
+
id="desc22">path=environment.moon.phaseName,assets=../resources/svg/lunar_phases</desc></image></svg>
|