@rhizomatics/signalk-einklabel-plugin 0.9.1 → 0.10.0

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,3 +1,12 @@
1
+ # 0.10.1
2
+
3
+ ## Watch Schedule Example
4
+ - New template to show current and next crew watch, using `signalk-watch-schedule` plugin
5
+
6
+ ## CLI / Debugging
7
+ - `fields` command now reports where text field definitions can't be interpreted
8
+ - Epoch style timestamps now automatically handled as if proper date time for format options
9
+
1
10
  # 0.9.1
2
11
 
3
12
  - Fix for upstream EventEmitter leak in `@naugehyde/node-ble`
package/README.md CHANGED
@@ -94,6 +94,17 @@ The [tides](https://github.com/rhizomatics/signalk-einklabel-plugin/blob/main/te
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.
96
96
 
97
+ ### Watch Schedule
98
+
99
+ ![Watch Schedule](docs/assets/screenshots/example_watch_schedule.png)
100
+
101
+ Template available as 416x240-BWRY for 3.7" ESLs.
102
+
103
+ #### Pre-requisites
104
+
105
+ - Source of `watch.current` and `watch.next` values
106
+ - `signalk-watch-schedule` plugin
107
+
97
108
  ## Setting up a Label
98
109
 
99
110
  Enable the plugin, and use the large **+** sign to add a label, which open up these fields.
@@ -365,6 +376,10 @@ Try a BLE proxy device, ESP32 is popular for this.
365
376
 
366
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_.
367
378
 
379
+ ### Description is set in InkScape but doesn't render
380
+
381
+ Check if the text boxes are normal text or flowed text, and correct to normal text.
382
+
368
383
  ## Other ESL and General eInk Resources
369
384
 
370
385
  - [Open ePaper Link](https://openepaperlink.de) - Alternative open source firmware to flash onto eInk shelf labels, with Home Assistant integration.
package/dist/cli/index.js CHANGED
@@ -248,10 +248,12 @@ program
248
248
  const elements = doc.getElementsByTagName(tag);
249
249
  for (let i = 0; i < elements.length; i++) {
250
250
  const element = elements.item(i);
251
- const desc = element?.getElementsByTagName("desc").item(0);
252
- if (!element || !desc?.textContent)
251
+ if (!element)
253
252
  continue;
254
253
  const id = element.getAttribute("id") ?? `${tag}#${i}`;
254
+ const desc = element.getElementsByTagName("desc").item(0);
255
+ if (!desc?.textContent)
256
+ continue;
255
257
  try {
256
258
  rows.push({ id, tag, desc: desc.textContent, binding: (0, binding_1.parseBinding)(desc.textContent) });
257
259
  }
@@ -57,6 +57,8 @@ function parseTimestamp(value) {
57
57
  return luxon_1.DateTime.fromJSDate(value, { zone: "utc" });
58
58
  if (typeof value === "string")
59
59
  return luxon_1.DateTime.fromISO(value, { zone: "utc" });
60
+ if (typeof value === "number")
61
+ return luxon_1.DateTime.fromMillis(value, { zone: "utc" });
60
62
  return undefined;
61
63
  }
62
64
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhizomatics/signalk-einklabel-plugin",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Display SignalK data on eInk Electronic Shelf Labels",
5
5
  "keywords": [
6
6
  "ble",
@@ -8,6 +8,7 @@
8
8
  "eink",
9
9
  "esl",
10
10
  "instrument",
11
+ "watch-schedule",
11
12
  "signalk",
12
13
  "signalk-category-hardware",
13
14
  "signalk-category-instruments",
@@ -79,7 +80,9 @@
79
80
  "appIcon": "docs/assets/icons/icon_tmp.png",
80
81
  "screenshots": [
81
82
  "docs/assets/screenshots/example_tidal_clock.png",
82
- "docs/assets/screenshots/plugin_config.png"
83
+ "docs/assets/screenshots/example_watch_schedule.png",
84
+ "docs/assets/screenshots/plugin_config.png",
85
+ "docs/assets/screenshots/label_config.png"
83
86
  ]
84
87
  }
85
88
  }
@@ -0,0 +1,69 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="250"
4
+ height="128"
5
+ viewBox="0 0 250 128"
6
+ version="1.1"
7
+ id="svg1"
8
+ sodipodi:docname="250x128-BWRY.svg"
9
+ inkscape:version="1.3.2 (091e20e, 2023-11-25)"
10
+ xml:space="preserve"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlns:svg="http://www.w3.org/2000/svg"><defs
15
+ id="defs1" /><sodipodi:namedview
16
+ id="namedview1"
17
+ pagecolor="#ffffff"
18
+ bordercolor="#000000"
19
+ borderopacity="0.25"
20
+ inkscape:showpageshadow="2"
21
+ inkscape:pageopacity="0.0"
22
+ inkscape:pagecheckerboard="0"
23
+ inkscape:deskcolor="#d1d1d1"
24
+ inkscape:zoom="1.3906433"
25
+ inkscape:cx="69.751891"
26
+ inkscape:cy="106.78511"
27
+ inkscape:window-width="1488"
28
+ inkscape:window-height="674"
29
+ inkscape:window-x="24"
30
+ inkscape:window-y="33"
31
+ inkscape:window-maximized="0"
32
+ inkscape:current-layer="svg1"
33
+ showgrid="true"
34
+ showguides="true"><inkscape:grid
35
+ id="grid1"
36
+ units="px"
37
+ originx="0"
38
+ originy="0"
39
+ spacingx="1"
40
+ spacingy="1"
41
+ empcolor="#0099e5"
42
+ empopacity="0.30196078"
43
+ color="#0099e5"
44
+ opacity="0.14901961"
45
+ empspacing="5"
46
+ dotted="false"
47
+ gridanglex="30"
48
+ gridanglez="30"
49
+ visible="true" /></sodipodi:namedview><rect
50
+ x="1.0169492"
51
+ y="2.0798673e-08"
52
+ width="249.17073"
53
+ height="129.97897"
54
+ fill="#ffffff"
55
+ id="rect1"
56
+ style="stroke-width:0.569552" /><text
57
+ id="last_repaint"
58
+ x="221.55899"
59
+ y="104.94675"
60
+ font-size="18"
61
+ font-family="serif"
62
+ fill="black"
63
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:serif;-inkscape-font-specification:'serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffff00;stroke-width:1.19309"
64
+ transform="scale(0.85412559,1.170788)"><desc
65
+ id="desc12">source=einklabel,path=repainted,format=local_datetime_short</desc><tspan
66
+ sodipodi:role="line"
67
+ id="tspan3"
68
+ x="221.55899"
69
+ y="104.94675">27 Jun 26 18:05</tspan></text></svg>
@@ -0,0 +1,86 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="416"
4
+ height="240"
5
+ viewBox="0 0 416 240"
6
+ version="1.1"
7
+ id="svg1"
8
+ sodipodi:docname="416x240-BWRY.svg"
9
+ inkscape:version="1.3.2 (091e20e, 2023-11-25)"
10
+ xml:space="preserve"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlns:svg="http://www.w3.org/2000/svg"><defs
15
+ id="defs1" /><sodipodi:namedview
16
+ id="namedview1"
17
+ pagecolor="#ffffff"
18
+ bordercolor="#000000"
19
+ borderopacity="0.25"
20
+ inkscape:showpageshadow="2"
21
+ inkscape:pageopacity="0.0"
22
+ inkscape:pagecheckerboard="0"
23
+ inkscape:deskcolor="#d1d1d1"
24
+ inkscape:zoom="1.3906433"
25
+ inkscape:cx="155.3238"
26
+ inkscape:cy="187.32338"
27
+ inkscape:window-width="1488"
28
+ inkscape:window-height="674"
29
+ inkscape:window-x="24"
30
+ inkscape:window-y="33"
31
+ inkscape:window-maximized="0"
32
+ inkscape:current-layer="svg1"
33
+ showgrid="true"
34
+ showguides="true"><inkscape:grid
35
+ id="grid1"
36
+ units="px"
37
+ originx="0"
38
+ originy="0"
39
+ spacingx="1"
40
+ spacingy="1"
41
+ empcolor="#0099e5"
42
+ empopacity="0.30196078"
43
+ color="#0099e5"
44
+ opacity="0.14901961"
45
+ empspacing="5"
46
+ dotted="false"
47
+ gridanglex="30"
48
+ gridanglez="30"
49
+ visible="true" /></sodipodi:namedview><rect
50
+ x="1.0169492"
51
+ y="2.0798673e-08"
52
+ width="416"
53
+ height="240"
54
+ fill="#ffffff"
55
+ id="rect1" /><rect
56
+ style="fill:#ffff00;stroke:#000000;stroke-width:0.614045"
57
+ id="rect2"
58
+ width="416.94916"
59
+ height="18.410578"
60
+ x="-24.928873"
61
+ y="-242.40596"
62
+ transform="matrix(1,0,-0.1068988,-0.99426991,0,0)" /><text
63
+ id="last_repaint"
64
+ x="4.3477793"
65
+ y="201.9895"
66
+ font-size="18"
67
+ font-family="serif"
68
+ fill="black"
69
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:sans-serif;-inkscape-font-specification:'Roboto',sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.19309"
70
+ transform="scale(0.85412558,1.170788)"><desc
71
+ id="desc12">source=einklabel,path=repainted,format=local_datetime_short</desc><tspan
72
+ sodipodi:role="line"
73
+ id="tspan3">27 Jun 26 18:05</tspan></text><text
74
+ id="plugin_version"
75
+ x="194.07487"
76
+ y="204.51942"
77
+ font-size="10.373px"
78
+ font-family="sans-serif"
79
+ fill="#ffff00"
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:Roboto;-inkscape-font-specification:'Roboto, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;direction:rtl;fill:#000000;stroke-width:0.864419"
81
+ transform="scale(0.86441854,1.156847)"><desc
82
+ id="desc16">source=einklabel,path=plugin_version</desc><tspan
83
+ sodipodi:role="line"
84
+ id="tspan1"
85
+ x="194.07487"
86
+ y="204.51942">v0.0.1</tspan></text></svg>
@@ -0,0 +1,199 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="416"
4
+ height="240"
5
+ viewBox="0 0 416 240"
6
+ version="1.1"
7
+ id="svg1"
8
+ sodipodi:docname="416x240-BWRY.svg"
9
+ inkscape:version="1.3.2 (091e20e, 2023-11-25)"
10
+ xml:space="preserve"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlns:svg="http://www.w3.org/2000/svg"><defs
15
+ id="defs1"><rect
16
+ x="176.17746"
17
+ y="50.336416"
18
+ width="168.98654"
19
+ height="53.931875"
20
+ id="rect8" /><rect
21
+ x="53.931875"
22
+ y="29.482758"
23
+ width="134.47014"
24
+ height="40.988225"
25
+ id="rect4" /><rect
26
+ x="176.17746"
27
+ y="50.336414"
28
+ width="168.98654"
29
+ height="53.931873"
30
+ id="rect8-3" /><rect
31
+ x="176.17746"
32
+ y="50.336414"
33
+ width="168.98654"
34
+ height="53.931873"
35
+ id="rect8-3-5" /><rect
36
+ x="176.17746"
37
+ y="50.336414"
38
+ width="168.98654"
39
+ height="53.931873"
40
+ id="rect8-3-0" /><rect
41
+ x="176.17746"
42
+ y="50.336414"
43
+ width="168.98654"
44
+ height="53.931873"
45
+ id="rect8-3-5-4" /><rect
46
+ x="176.17746"
47
+ y="50.336414"
48
+ width="168.98654"
49
+ height="53.931873"
50
+ id="rect8-0" /><rect
51
+ x="53.931873"
52
+ y="29.482758"
53
+ width="134.47014"
54
+ height="40.988224"
55
+ id="rect4-3" /><rect
56
+ x="53.931873"
57
+ y="29.482758"
58
+ width="134.47014"
59
+ height="40.988224"
60
+ id="rect4-4" /><rect
61
+ x="176.17746"
62
+ y="50.336414"
63
+ width="168.98654"
64
+ height="53.931873"
65
+ id="rect8-0-4" /></defs><sodipodi:namedview
66
+ id="namedview1"
67
+ pagecolor="#ffffff"
68
+ bordercolor="#000000"
69
+ borderopacity="0.25"
70
+ inkscape:showpageshadow="2"
71
+ inkscape:pageopacity="0.0"
72
+ inkscape:pagecheckerboard="0"
73
+ inkscape:deskcolor="#d1d1d1"
74
+ inkscape:zoom="0.98333331"
75
+ inkscape:cx="210"
76
+ inkscape:cy="78.305087"
77
+ inkscape:window-width="1488"
78
+ inkscape:window-height="675"
79
+ inkscape:window-x="24"
80
+ inkscape:window-y="33"
81
+ inkscape:window-maximized="0"
82
+ inkscape:current-layer="svg1"
83
+ showgrid="true"
84
+ showguides="true"><inkscape:grid
85
+ id="grid1"
86
+ units="px"
87
+ originx="0"
88
+ originy="0"
89
+ spacingx="1"
90
+ spacingy="1"
91
+ empcolor="#0099e5"
92
+ empopacity="0.30196078"
93
+ color="#0099e5"
94
+ opacity="0.14901961"
95
+ empspacing="5"
96
+ dotted="false"
97
+ gridanglex="30"
98
+ gridanglez="30"
99
+ visible="true" /></sodipodi:namedview><rect
100
+ x="1.0169492"
101
+ y="2.0798673e-08"
102
+ width="416"
103
+ height="240"
104
+ fill="#ffffff"
105
+ id="rect1"
106
+ inkscape:label="label" /><rect
107
+ style="fill:#ffff00;stroke:#000000;stroke-width:0.614045"
108
+ id="rect2"
109
+ width="416.94916"
110
+ height="18.410578"
111
+ x="-24.928873"
112
+ y="-242.40596"
113
+ inkscape:label="bg_footer" /><text
114
+ id="last_repaint"
115
+ x="3.71355"
116
+ y="236.486883"
117
+ font-size="18"
118
+ font-family="serif"
119
+ fill="black"
120
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:sans-serif;-inkscape-font-specification:'Roboto',sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:1.19309"><desc
121
+ id="desc12">source=einklabel,path=repainted,format=local_datetime_short</desc>27 Jun 26 18:05</text><text
122
+ id="plugin_version"
123
+ x="167.761916"
124
+ y="236.597677"
125
+ font-size="10.373px"
126
+ font-family="sans-serif"
127
+ fill="#ffff00"
128
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:Roboto;-inkscape-font-specification:'Roboto, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;fill:#000000;stroke-width:0.864419"><desc
129
+ id="desc16">source=einklabel,path=plugin_version</desc>v0.0.1</text><text
130
+ id="watch_system"
131
+ x="321.466726"
132
+ y="236.116556"
133
+ font-size="10.373px"
134
+ font-family="sans-serif"
135
+ fill="#ffff00"
136
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:serif;-inkscape-font-specification:'serif, @wght=100';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variation-settings:'wght' 100;fill:#000000;stroke-width:0.864419"><desc
137
+ id="desc7">watch.system.name</desc>2-on / 2-off</text><text
138
+ id="text4-6"
139
+ x="8.407525"
140
+ y="31.738578"
141
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:32px;font-family:serif;-inkscape-font-specification:'serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;fill:#808080;stroke:none;stroke-width:0.612283;stroke-opacity:1"
142
+ inkscape:label="title">Watches</text><text
143
+ id="current_start"
144
+ x="7.3719606"
145
+ y="120.02129"
146
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.3333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#1a1a1a;stroke:#ffff00;stroke-width:0.56247"><desc
147
+ id="desc1">path=watch.current.startTime,format=local_time</desc>12:00</text><text
148
+ id="current_end"
149
+ x="117.756"
150
+ y="120.04606"
151
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.3333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#1a1a1a;stroke:#ffff00;stroke-width:0.612;stroke-dasharray:none"><desc
152
+ id="desc2">path=watch.current.endTime,format=local_time</desc>16:00</text><text
153
+ id="next_team"
154
+ x="219.44624"
155
+ y="205.76323"
156
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.3333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#1a1a1a;stroke:none;stroke-width:0.612283"><desc
157
+ id="desc5">watch.next.teamName</desc>Team 2</text><text
158
+ id="current_team"
159
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:32px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#1a1a1a;fill-opacity:1;stroke:#ffff00;stroke-width:0.73;stroke-dasharray:none;stroke-opacity:1"
160
+ x="221.56224"
161
+ y="121.52837"><desc
162
+ id="desc5-6">watch.current.teamName</desc>Team 1</text><text
163
+ id="next_start"
164
+ x="6.5166879"
165
+ y="205.07277"
166
+ 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;font-variant-east-asian:normal;fill:#1a1a1a;stroke:none;stroke-width:0.580975"
167
+ inkscape:label="next_start"><desc
168
+ id="desc4">path=watch.next.startTime,format=local_time</desc>16:00</text><text
169
+ id="next_end"
170
+ x="119.80927"
171
+ y="205.40628"
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
+ id="desc3">path=watch.next.endTime,format=local_time</desc>20:00</text>
174
+
175
+ <rect
176
+ style="fill:#ff0000;stroke:none;stroke-width:2.621;stroke-dasharray:none;stroke-opacity:1"
177
+ id="rect15"
178
+ width="397.62714"
179
+ height="35.59322"
180
+ x="9.1525431"
181
+ y="52.881355"
182
+ inkscape:label="bg_current" /><text
183
+ id="text4"
184
+ x="20.708879"
185
+ y="80.673174"
186
+ 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:#f9f9f9;stroke:#fefe54;stroke-width:0.612283"
187
+ inkscape:label="label_current">Current</text><rect
188
+ style="fill:#666666;stroke:none;stroke-width:2.6277;stroke-dasharray:none;stroke-opacity:1"
189
+ id="rect15-7"
190
+ width="399.66104"
191
+ height="35.59322"
192
+ x="8.5084782"
193
+ y="140.50848"
194
+ inkscape:label="bg_next" /><text
195
+ id="text4-7"
196
+ x="22.098717"
197
+ y="167.28336"
198
+ 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:#f9f9f9;stroke:#fefe54;stroke-width:0.612283"
199
+ inkscape:label="label_next">Next</text></svg>