@rhizomatics/signalk-einklabel-plugin 0.10.0 → 0.10.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 CHANGED
@@ -1,9 +1,17 @@
1
1
  # 0.10.1
2
2
 
3
+ - Test fixes
4
+ - Moved blank templates to `.blank` directory and suppressed from drop down selection
5
+ - Added recommendations for `signalk-tides` and `signalk-watch-schedule` plugins
6
+
7
+ # 0.10.0
8
+
3
9
  ## Watch Schedule Example
10
+
4
11
  - New template to show current and next crew watch, using `signalk-watch-schedule` plugin
5
12
 
6
13
  ## CLI / Debugging
14
+
7
15
  - `fields` command now reports where text field definitions can't be interpreted
8
16
  - Epoch style timestamps now automatically handled as if proper date time for format options
9
17
 
@@ -21,8 +29,7 @@
21
29
 
22
30
  ## Fixes
23
31
 
24
- - Fix configuration JSON holding older versions of itself as subentries
25
- and data changes
32
+ - Fix configuration JSON holding older versions of itself as subentries and data changes
26
33
  - Fix most cases of scanned devices not appearing in device dropdown choice
27
34
 
28
35
  ## Improvements
package/README.md CHANGED
@@ -7,10 +7,10 @@
7
7
  [![code style: oxfmt](https://img.shields.io/badge/code_style-oxfmt-blue.svg)](https://github.com)
8
8
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/rhizomatics/signalk-einklabel-plugin/blob/main/LICENSE)
9
9
 
10
- Fully working but limited vendor/product support and requires Linux for device access.
11
-
12
10
  A SignalK plugin to display data from SignalK paths, Resource APIs and plugins on Electronic Shelf Labels (ESL) over a Bluetooth Low Energy (BLE) connection using simple SVG templates.
13
11
 
12
+ ![Companionway Tidal Clock](docs/assets/images/real_tidal_clock.jpg)
13
+
14
14
  ## What is an ESL?
15
15
 
16
16
  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 (which can take 5-10 seconds) and a periodic BLE check for incoming changes. Perfect for info that changes only once or twice a day, like tidal information.
@@ -27,13 +27,13 @@ Most of requirements below are to make SignalK work with Bluetooth Low Energy, w
27
27
 
28
28
  1. A SignalK server, **running Linux**
29
29
 
30
- - MacOS and Windows aren't supported by the [BLE interface layer](https://www.npmjs.com/package/@naugehyde/node-ble), however can be used for template development and
30
+ - MacOS and Windows aren't supported by the [BLE interface layer](https://www.npmjs.com/package/@naugehyde/node-ble), however they can be used for template development and
31
31
  debugging (everything except `scan` and `paint`)
32
32
 
33
33
  2. A Bluetooth adapter, that can handle BLE (Bluetooth Low Energy).
34
34
 
35
35
  - Bluetooth adapters for Linux can be tricky, TP-Link UB400 and Asus USB-BT500 are two well-known and available ones
36
- - Some Raspberry Pi models come with suitable Bluetooth it built-in
36
+ - Some Raspberry Pi models come with suitable Bluetooth built in
37
37
  - Don't worry about the very latest Bluetooth versions, 4.0 is minimum for BLE, 5.0 is nice
38
38
  - Home Assistant is massively more popular than SignalK, and often also run on Raspberry Pi and similar, so good source of advice
39
39
 
@@ -44,14 +44,14 @@ Most of requirements below are to make SignalK work with Bluetooth Low Energy, w
44
44
 
45
45
  4. One or more supported Electronic Shelf Labels
46
46
 
47
- - The label used for testing this is the [ZhunyCo 3.7" BRWY](https://www.aliexpress.com/item/1005010050104435.html)
47
+ - The label used for testing this is the [Zhsunyco 3.7" BWRY](https://www.aliexpress.com/item/1005010050104435.html)
48
48
 
49
49
  5. Correct time zone set on server if local time is to be shown on display
50
50
 
51
51
  - See [FAQ](#faq-timezone)
52
52
  - If not set, everything will work, but you may see the wrong zone or not have daylight savings applied
53
53
 
54
- Once you have all of that, it may be worth also installing [signalk-victron-ble](https://github.com/stefanor/signalk-victron-ble),[signalk-ruuvitag-plugin](https://github.com/vokkim/signalk-ruuvitag-plugin) or [bt-sensors-plugin](https://github.com/naugehyde/bt-sensors-plugin-sk) to pull in data from other sensors and equipment.
54
+ Once you have all of that, it may be worth also installing [signalk-victron-ble](https://github.com/stefanor/signalk-victron-ble), [signalk-ruuvitag-plugin](https://github.com/vokkim/signalk-ruuvitag-plugin) or [bt-sensors-plugin](https://github.com/naugehyde/bt-sensors-plugin-sk) to pull in data from other sensors and equipment.
55
55
 
56
56
  ## Installation
57
57
 
@@ -89,7 +89,7 @@ A _tides_ provider plugin for the Resources API installed and enabled, currently
89
89
 
90
90
  The [tides](https://github.com/rhizomatics/signalk-einklabel-plugin/blob/main/templates/tides/) templates can be customized to run with any tide provider, a specific one, or switch to other APIs or SignalK data paths.
91
91
 
92
- - In the template it uses a SVG description like `source=resources,resource=tides,provider=tides,path=extremes[0].time,format=local_time` to get the first tide time, ensures its the preferred `signalk-tides` provider and makes it a simple local time rather than a UTC date time.
92
+ - In the template it uses a SVG description like `source=resources,resource=tides,provider=tides,path=extremes[0].time,format=local_time` to get the first tide time, ensures it's the preferred `signalk-tides` provider and makes it a simple local time rather than a UTC date-time.
93
93
 
94
94
  To show the lunar phase, the `environment.moon.phaseName` path is required, which can
95
95
  be easily achieved by installing and configuring the `derived-data` plugin.
@@ -107,29 +107,29 @@ Template available as 416x240-BWRY for 3.7" ESLs.
107
107
 
108
108
  ## Setting up a Label
109
109
 
110
- Enable the plugin, and use the large **+** sign to add a label, which open up these fields.
110
+ Enable the plugin, and use the large **+** sign to add a label, which opens up these fields.
111
111
 
112
112
  ![Label Config](docs/assets/screenshots/label_config.png)
113
113
 
114
114
  - _Friendly Name_ - Give the label any name (word or phrase) you like, for example 'Tide Clock'
115
- - _Device_ - Unless you have multiple labels, don't bother with pre-scanning or selecting a specifig device, instead pick **"All discovered devices"** and it will paint any compatible labels it finds. If you want to pick a specific device, you'll need to wait for a device scan to complete.
115
+ - _Device_ - Unless you have multiple labels, don't bother with pre-scanning or selecting a specific device, instead pick **"All discovered devices"** and it will paint any compatible labels it finds. If you want to pick a specific device, you'll need to wait for a device scan to complete.
116
116
  - _Template_ - Choose a built in template, or one you've added to the local templates directory
117
117
  - _Repaint Trigger_- Do you want this to repaint every few hours (at a chosen minutes past hour), or when a SignalK path changes?
118
- - If its a SignalK path, enter it next, for example `environment.tide.state`
119
- - If its time based, enter how many hours between repaints, for example 00:00/08:00/16:00 for an 8h schedule, and if you want a specific number of minutes after the hour.
118
+ - If it's a SignalK path, enter it next, for example `environment.tide.state`
119
+ - If it's time based, enter how many hours between repaints, for example 00:00/08:00/16:00 for an 8h schedule, and if you want a specific number of minutes after the hour.
120
120
 
121
121
  There are also two more advanced options, which can usually be ignored.
122
122
 
123
123
  - _BLE AES key_ - Only needed if the default key doesn't work and you have a better alternative, otherwise ignore
124
124
  - _Force Repaint_ - Next time the label is due to be painted, update even if the data or template hasn't changed (this flag will automatically be cleared after this.)
125
125
 
126
- When the plugin starts, it will automatically re-paint the label if its new, or the last timed slot was missed and the data has changed.
126
+ When the plugin starts, it will automatically re-paint the label if it's new, or the last timed slot was missed and the data has changed.
127
127
 
128
128
  ### Scanning for Devices
129
129
 
130
130
  Since these are ultra-low power devices, they don't respond instantly to either identify themselves or accept a new image. By default, both scanning and painting have time-outs to wait for a response, which can be altered in the plugin configuration or CLI argument.
131
131
 
132
- One other quirk is that some devices respond with a different name at different times, for example the genric `WOESL` sometimes and model specific `WL17500C74` other times. However, the MAC address, e.g. `66:66:17:50:0D:2B` is constant, and this is what's tracked by the plugin.
132
+ One other quirk is that some devices respond with a different name at different times, for example the generic `WOESL` sometimes and model specific `WL17500C74` other times. However, the MAC address, e.g. `66:66:17:50:0D:2B` is constant, and this is what's tracked by the plugin.
133
133
 
134
134
  The plugin can optionally re-scan whenever it starts up (off by default), although this isn't essential once a label has been configured. Devices found by any scan are remembered across restarts - see the FAQ below.
135
135
 
@@ -257,7 +257,7 @@ See also the commands useful for debugging under [Developing Templates]
257
257
  - `render` - transform an SVG template and data into a PNG
258
258
  - `paint` - render an SVG template and data to a selected ESL
259
259
 
260
- The width, height, vertical offset and colour palette for the device is taken from the internal register of devices, however can be overridden on the command line. This could be used to help you choose what size of label to buy, or to get an unsupported label working.
260
+ The width, height, vertical offset and colour palette for the device are taken from the internal register of devices, however can be overridden on the command line. This could be used to help you choose what size of label to buy, or to get an unsupported label working.
261
261
 
262
262
  ( The CLI can also be run from a checked out module, or by opening a terminal shell at `~/.signalk/node_modules/@rhizomatics/signalk-einklabel-plugin`, as `npx esl-cli command --args` )
263
263
 
@@ -351,7 +351,7 @@ For example, `npx esl-cli fields -t templates/tide.svg -e examples` will show al
351
351
 
352
352
  ### I can't see my device as a choice on the drop-down list after scan
353
353
 
354
- SignalK plugins lack ability to self-update after something like a scan, so first time round you may have to close the config and reload it to see this. Subsequently the plugin will remember all scanned devices, and only drop previously seen ones if it goes 24 hours without a positive scan or with failed paint attempts.
354
+ SignalK plugins lack the ability to self-update after something like a scan, so first time round you may have to close the config and reload it to see this. Subsequently the plugin will remember all scanned devices, and only drop previously seen ones if it goes 24 hours without a positive scan or with failed paint attempts.
355
355
 
356
356
  Easiest way to solve this is to choose 'All Discovered Devices' in the device configuration, and it will paint any compatible devices it finds on future scans.
357
357
 
@@ -359,12 +359,12 @@ Easiest way to solve this is to choose 'All Discovered Devices' in the device co
359
359
 
360
360
  If the plugin repaints a display at server startup, then the plugin that provides the data may not have started ( or in the case of `derived-data` the plugin that the plugin depends on! ) and unlike Home Assistant, there's no good way of sequencing the start of plugins.
361
361
 
362
- Use the _settle_ time, to impose a minimum wait between the eInk Label plugin being initialized, and it attempting to paint any displays, and increase this value if its still missing data.
362
+ Use the _settle_ time, to impose a minimum wait between the eInk Label plugin being initialized, and it attempting to paint any displays, and increase this value if it's still missing data.
363
363
 
364
364
  ### Times are showing incorrectly {#faq-timezone}
365
365
 
366
366
  If times are in the wrong timezone, or don't have daylight savings applied correctly,
367
- then check that the server itself (at the Linux level, not SignalK, which doesn't know)is configured for your timezone, assuming of course that you're a coastal sailor. Use `raspi-config` on a Raspberry Pi, or `timedatectl` on a Linux server.
367
+ then check that the server itself (at the Linux level, not SignalK, which doesn't know) is configured for your timezone, assuming of course that you're a coastal sailor. Use `raspi-config` on a Raspberry Pi, or `timedatectl` on a Linux server.
368
368
 
369
369
  If you're a global cruiser, then use something like [signalk-set-gps-timezone](https://github.com/hoeken/signalk-set-gps-timezone) to set the value in the operating system.
370
370
 
@@ -374,7 +374,7 @@ Try a BLE proxy device, ESP32 is popular for this.
374
374
 
375
375
  ### Can't edit the text contents of SVG template in VSCode
376
376
 
377
- If you have an SVG viewer extension, this wll show the image rather than allowing editing of text. To solve, right click on the file in VSCode _Explorer_ view and choose to edit with _Text Editor_.
377
+ If you have an SVG viewer extension, this will show the image rather than allowing editing of text. To solve, right click on the file in VSCode _Explorer_ view and choose to edit with _Text Editor_.
378
378
 
379
379
  ### Description is set in InkScape but doesn't render
380
380
 
@@ -383,7 +383,7 @@ Check if the text boxes are normal text or flowed text, and correct to normal te
383
383
  ## Other ESL and General eInk Resources
384
384
 
385
385
  - [Open ePaper Link](https://openepaperlink.de) - Alternative open source firmware to flash onto eInk shelf labels, with Home Assistant integration.
386
- - [zhsynyco-esl](https://github.com/roxburghm/zhsunyco-esl) - Python interface
386
+ - [zhsunyco-esl](https://github.com/roxburghm/zhsunyco-esl) - Python interface
387
387
  - [WoLink](https://github.com/NickWaterton/Wolink) - Python interface and protocol analysis
388
388
  - [e-ink dashboard for Signal K](https://github.com/meri-imperiumi/dashboard) - Waveshare display based multi instrument display.
389
389
  - [eInk Dashboard Modern SK](https://github.com/VladimirKalachikhin/e-inkDashboardModernSK) - SignalK dashboard for non-ESL eInk display.
package/dist/config.js CHANGED
@@ -200,7 +200,13 @@ function listTemplateVariants(dir) {
200
200
  .map(parseTemplateVariant)
201
201
  .filter((variant) => variant !== undefined);
202
202
  }
203
- /** A directory only counts as a template-family option if it actually has at least one parseable variant file in it - otherwise it's something else entirely, e.g. `.assets`. */
203
+ /**
204
+ * A directory only counts as a template-family option if it actually has at least one parseable
205
+ * variant file in it - otherwise it's something else entirely, e.g. `.assets`. Dot-prefixed
206
+ * directories (e.g. `.assets`, `.blank`) are always excluded, even if they happen to contain
207
+ * parseable variant files, since they're reserved for non-template-option use (asset bundles,
208
+ * work-in-progress templates not ready to appear in the dropdown, etc).
209
+ */
204
210
  function listTemplateFamilies(dir) {
205
211
  let entries;
206
212
  try {
@@ -210,7 +216,7 @@ function listTemplateFamilies(dir) {
210
216
  return [];
211
217
  }
212
218
  return entries
213
- .filter((entry) => entry.isDirectory() && listTemplateVariants((0, path_1.join)(dir, entry.name)).length > 0)
219
+ .filter((entry) => entry.isDirectory() && !entry.name.startsWith(".") && listTemplateVariants((0, path_1.join)(dir, entry.name)).length > 0)
214
220
  .map((entry) => entry.name);
215
221
  }
216
222
  /** Local templates (files or template-family directories) take priority over a same-named bundled one; both show up as options. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhizomatics/signalk-einklabel-plugin",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Display SignalK data on eInk Electronic Shelf Labels",
5
5
  "keywords": [
6
6
  "ble",
@@ -8,12 +8,12 @@
8
8
  "eink",
9
9
  "esl",
10
10
  "instrument",
11
- "watch-schedule",
12
11
  "signalk",
13
12
  "signalk-category-hardware",
14
13
  "signalk-category-instruments",
15
14
  "signalk-node-server-plugin",
16
- "tides"
15
+ "tides",
16
+ "watch-schedule"
17
17
  ],
18
18
  "homepage": "https://github.com/rhizomatics/signalk-einklabel-plugin#readme",
19
19
  "bugs": {
@@ -83,6 +83,10 @@
83
83
  "docs/assets/screenshots/example_watch_schedule.png",
84
84
  "docs/assets/screenshots/plugin_config.png",
85
85
  "docs/assets/screenshots/label_config.png"
86
+ ],
87
+ "recommends": [
88
+ "signalk-watch-schedule",
89
+ "signalk-tides"
86
90
  ]
87
91
  }
88
92
  }
@@ -171,7 +171,7 @@
171
171
  y="205.40628"
172
172
  style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:26.6667px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;fill:#1a1a1a;stroke:none;stroke-width:0.612283"><desc
173
173
  id="desc3">path=watch.next.endTime,format=local_time</desc>20:00</text>
174
-
174
+
175
175
  <rect
176
176
  style="fill:#ff0000;stroke:none;stroke-width:2.621;stroke-dasharray:none;stroke-opacity:1"
177
177
  id="rect15"
File without changes
File without changes