kiosko-plugin-flights 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/NOTICE +36 -0
- package/README.md +141 -2
- package/dist/index.js +1783 -0
- package/docs/closest-small.png +0 -0
- package/docs/closest.png +0 -0
- package/docs/list-small.png +0 -0
- package/docs/list.png +0 -0
- package/docs/radar-small.png +0 -0
- package/docs/radar.png +0 -0
- package/docs/sky.png +0 -0
- package/kiosko-manifest.json +1246 -0
- package/package.json +82 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Loksly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
kiosko-plugin-flights
|
|
2
|
+
Copyright (c) 2026 Loksly. MIT licence (see LICENSE).
|
|
3
|
+
|
|
4
|
+
Data
|
|
5
|
+
----
|
|
6
|
+
The planes this plugin shows come from:
|
|
7
|
+
|
|
8
|
+
- adsb.lol (https://adsb.lol), an open community network of ADS-B
|
|
9
|
+
receivers, through its API (https://api.adsb.lol). Its data is made
|
|
10
|
+
available under the Open Database License (ODbL) 1.0
|
|
11
|
+
(https://opendatacommons.org/licenses/odbl/1-0/), as its API states. The
|
|
12
|
+
widgets credit it as "ADS-B: adsb.lol (ODbL)" ("adsb.lol" on a small tile).
|
|
13
|
+
The plugin shows it and keeps it only while it is shown (minutes); it
|
|
14
|
+
builds no database of its own from it.
|
|
15
|
+
|
|
16
|
+
- The user's own ADS-B receiver, if they give its address: their data.
|
|
17
|
+
|
|
18
|
+
Where each flight comes from and goes to, and the airlines' names, come from
|
|
19
|
+
the Virtual Radar Server standing data
|
|
20
|
+
(https://github.com/vradarserver/standing-data), dedicated to the public
|
|
21
|
+
domain under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/),
|
|
22
|
+
as served by adsb.lol (https://vrs-standing-data.adsb.lol). src/tables.ts
|
|
23
|
+
holds the names of 125 airlines taken from it (scripts/tables.ts), a few
|
|
24
|
+
shortened by hand.
|
|
25
|
+
|
|
26
|
+
The aircraft model names in src/tables.ts (151 ICAO type designators) and
|
|
27
|
+
the towns' names in Spanish, German and Chinese in src/cities.ts (the usual
|
|
28
|
+
exonyms of about 120 towns) were written for this plugin.
|
|
29
|
+
|
|
30
|
+
Recorded answers
|
|
31
|
+
----------------
|
|
32
|
+
src/fixtures/adsblol-*.json are adsb.lol's answers around Molina de Segura
|
|
33
|
+
(Murcia) on 6 December 2026 (ODbL 1.0, as above); receiver-aircraft.json is
|
|
34
|
+
made from one of them in a receiver's format; route-*.json are standing-data
|
|
35
|
+
files (CC0). The sample sky of the gallery and docs/ (src/demo.ts) is made
|
|
36
|
+
up: real airlines and airports, invented flights and positions.
|
package/README.md
CHANGED
|
@@ -1,3 +1,142 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kiosko-plugin-flights
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The planes passing over your place, live, on the panel: a radar with their heading, altitude and trail; the one closest to you in big letters, with its airline, model, altitude and where it comes from and goes to; a list of the nearest; and an alert to look out of the window when one passes low and close. From [adsb.lol](https://adsb.lol)'s open ADS-B network, with no key, and from your own receiver if you have one.
|
|
4
|
+
|
|
5
|
+
A plugin for [Kiosko](https://github.com/kiosko-lcd/kiosko), the widget mosaic for small USB LCD panels.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
In Kiosko, **Plugins → Install from npm** → `kiosko-plugin-flights`, then restart Kiosko. Or from a terminal:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --prefix ~/.config/kiosko/plugins kiosko-plugin-flights
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
(macOS: `~/Library/Application Support/Kiosko/plugins`, Windows: `%APPDATA%\Kiosko\plugins`.)
|
|
18
|
+
|
|
19
|
+
Then **New page → Sky** puts the three widgets together. It needs Kiosko 0.2.17 or later (derived sources).
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
Your place in **Settings** (or a place of its own in the source's options). Around it, in **Settings → Data sources → Planes around you**: how far (40 km by default, up to 150).
|
|
24
|
+
|
|
25
|
+
- **Nothing to sign up for.** adsb.lol answers 500 questions a day per IP address without a key; the plugin spreads them over the day (see *Data source*) and moves the planes on by their speed and heading in between.
|
|
26
|
+
- **Optional: an adsb.lol key**, free at [adsb.lol](https://adsb.lol): 1,000 questions a day on request, 7,200 if you feed the network with a receiver. More questions, fresher planes. In the source's **adsb.lol key** field.
|
|
27
|
+
- **Optional: your own receiver.** The address of the `aircraft.json` of a readsb, dump1090-fa or tar1090 receiver (an RTL-SDR stick and an antenna are enough), in **Your own receiver**: read at every update (every 10 s) and combined with adsb.lol, each plane with its most recent position. With it you can turn **Planes from adsb.lol** off and ask nothing outside your network.
|
|
28
|
+
|
|
29
|
+
## What it does on your machine
|
|
30
|
+
|
|
31
|
+
- **Internet**: `api.adsb.lol` (the planes around you) and `vrs-standing-data.adsb.lol` (where each flight comes from and goes to: static files, one per callsign). And your receiver's address, only if you type one. Nothing else.
|
|
32
|
+
- **Your place** is never sent as it is: adsb.lol is asked around it **rounded to about a kilometre** (0.01°), with the circle widened to match and a margin, and the plugin cuts the planes to your circle itself. Its name is never sent. The route files are asked by callsign only (`/routes/RY/RYR8SN.json`): the same for anyone.
|
|
33
|
+
- **Files**: only in its cache folder (in RAM on Linux: no wear on the disk, empty after a reboot), nothing in its data folder, since all of it can be had again: the routes it has looked up (`routes.json`, 12 hours each, 6 for a callsign with no known route), how much of adsb.lol's quota is left (`adsblol-quota.json`, so restarting Kiosko doesn't ask more than the day allows) and which planes have already alerted (`alerted.json`). Kept in memory and written at most once a minute each. The planes themselves are never written.
|
|
34
|
+
- **Your adsb.lol key** is a secret field: masked in the editor, never logged, never in an error, and the quota file keeps it apart only by a hash of it.
|
|
35
|
+
- **Nothing runs when nothing shows it**: the source is read only while a widget of the plugin can come on an enabled screen, once for all of them. The alerts with no widget shown are off until you turn them on (below).
|
|
36
|
+
|
|
37
|
+
## Your window
|
|
38
|
+
|
|
39
|
+
If you watch the sky from a window, tell the source where it faces: **Settings → Data sources → Planes around you → Your window faces** (north, northeast… or *Other* in degrees, which a compass app held flat against the glass gives you), and **how wide** a piece of sky it shows (100° by default). Then the planes **you can actually see from it** are picked out everywhere:
|
|
40
|
+
|
|
41
|
+
- the radar draws the window's sector as a soft wedge and dims the planes outside it;
|
|
42
|
+
- *Overhead now* shows the closest plane **seen through the window** first, and says so ("4 km al NE · por tu ventana"); with none in it, the closest of all, as without a window;
|
|
43
|
+
- the list marks them with a bar in the accent colour;
|
|
44
|
+
- the alerts are only for them (**Only those seen from your window**, on by default) and say where to look from it: "por tu ventana, a la izquierda (NE)", or "justo enfrente de tu ventana".
|
|
45
|
+
|
|
46
|
+
*Seen* means the bearing from your place falls in the sector **and** the plane stands high enough over the horizon: at least **5°** by default (an advanced option), counting the curve of the Earth. An airliner cruising at 11,000 m is 30° up at 19 km, 8° at 80 km and right on 5° at 120 km; a light plane at 1,000 m drops under it 12 km away. Lower than that, buildings and haze hide them. The altitude is the plane's over the sea; your own height isn't counted.
|
|
47
|
+
|
|
48
|
+
Without a window (the default) nothing changes.
|
|
49
|
+
|
|
50
|
+
## Widgets
|
|
51
|
+
|
|
52
|
+
### Radar — `flights/radar`
|
|
53
|
+
|
|
54
|
+
North up, your place in the middle, up to four rings at a round step (5, 10, 20, 50 km…, or miles by the units), and each plane as a small silhouette pointing where it flies (a helicopter as a rotor), with its trail of the last minutes and, room allowing, its callsign and altitude. With a window, its sector is a soft wedge and the planes outside it step back. The colour says how high it is, from the theme: the accent at 1,500 m and below, fading to the ink colour by 7,500 m, dimmer above. The planes move smoothly between answers by their speed and heading (dead reckoning along the great circle), and glide to their real place when a new one comes. On a touch screen, **a tap on a plane** shows its callsign, airline, model, route and altitude at the foot for a minute. *Clear skies* when there is none.
|
|
55
|
+
|
|
56
|
+
**Movement**: *Smooth* (twice a second, the default), *Calm* (every two seconds: fewer frames for a slow panel) or *Still* (only when new positions come). And **Show callsign and altitude**, **Show trails**, **Units**.
|
|
57
|
+
|
|
58
|
+
 
|
|
59
|
+
|
|
60
|
+
### Overhead now — `flights/closest`
|
|
61
|
+
|
|
62
|
+
The plane closest to you, big: airline and callsign, model, altitude (in metres and feet, or as the units say) with an arrow when it climbs or descends, speed, **where it comes from and goes to** ("Barcelona → Madrid", in your language: "Roma", "Rom", "罗马"; on a narrow tile the airports' codes), and **where to look** ("6 km al NE"). Closest means nearest in a straight line, altitude counted: a plane low and a few kilometres away comes before one right above at 11,000 m. On a touch screen, **a tap brings the next one**.
|
|
63
|
+
|
|
64
|
+
 
|
|
65
|
+
|
|
66
|
+
### Planes nearby — `flights/list`
|
|
67
|
+
|
|
68
|
+
The nearest planes, one a line: what (airline and flight, or the registration), altitude with its arrow, and how far and which way. **Detailed** adds the model and the route on a second line. Rows as many as fit.
|
|
69
|
+
|
|
70
|
+
 
|
|
71
|
+
|
|
72
|
+
When a source fails, each widget says so discreetly at the foot, with how old its planes are ("planes from 4 min ago") or that the day's quota is used, and goes on with what it has.
|
|
73
|
+
|
|
74
|
+
## Alerts
|
|
75
|
+
|
|
76
|
+
From **Planes overhead (alerts)**, a source of its own made from the planes the widgets show:
|
|
77
|
+
|
|
78
|
+
- **Look out of the window: one at 3,000 m** ("Mira por la ventana: pasa uno a 3000 m") (info, with a chime): a plane **closer than** 6 km on the map and **lower than** 4,000 m, with its airline, model, which way to look and its route. Once per plane, and not again for an hour (**Once per plane every**). Not during **quiet hours** if you set them (*Quiet from* / *Quiet until*). Never one on the ground.
|
|
79
|
+
- **Emergencies** (warn, with a siren icon): a plane anywhere in your circle squawking **7700** (emergency), **7600** (radio failure) or **7500** (unlawful interference). They come in the same answer as the rest, so they cost nothing; quiet hours don't silence them; **Also emergencies** turns them off.
|
|
80
|
+
|
|
81
|
+
**The alerts are off until you turn them on**: in **Settings → Data sources → Planes overhead (alerts)**, turn on **Watch for alerts without a widget**. Then the planes are watched even with no widget shown, at the same pace and with the same single question as the widgets (both read the one `flights/sky`). Without it nothing alerts, so that a plugin installed only for its radar never asks adsb.lol from a page nobody sees.
|
|
82
|
+
|
|
83
|
+
## Data source
|
|
84
|
+
|
|
85
|
+
`flights/sky` (**Planes around you**), read every 10 seconds; the receiver at every read, **adsb.lol only when its quota allows**:
|
|
86
|
+
|
|
87
|
+
- Each answer says how many questions are left (`x-ratelimit-remaining`) and when the 24-hour window starts again (`x-ratelimit-reset`). The plugin spreads what is left (minus ten kept back) over what is left of the window, never more often than every 10 s. **Shown all day without a key, that is one question every three minutes or so (0.34 a minute)**; shown only part of the day, more often (with 487 left and four hours to go, one every 30 s); with a feeder's key, one every 12 s. Before the first answer, one a minute.
|
|
88
|
+
- **One question per read at most**, however many screens and widgets show it, and none while nothing does.
|
|
89
|
+
- A refusal (429) waits for the time it gives (`Retry-After`) and says the day's quota is used at the foot; a failure waits 30 s, then twice as long each time, up to 10 minutes, showing the last planes meanwhile (moved on for up to 6 minutes, then dropped).
|
|
90
|
+
- **Routes**: once per new callsign (up to six a read), from adsb.lol's copy of the [Virtual Radar Server standing data](https://github.com/vradarserver/standing-data): static files, not counted in the quota. Callsigns are reused, so a route is shown only if the plane is where that route would have it: near the line between the two airports (within 12 % of its length, 60 to 250 km), between them, and heading to the destination (or within 40 km of either airport). adsb.lol's own route lookup (`/api/0/routeset`) answers empty these days, so it isn't used.
|
|
91
|
+
- Airline names and aircraft models: the airlines from the standing data, the models (151 types: airliners, business jets, light aircraft, helicopters) written for the plugin.
|
|
92
|
+
|
|
93
|
+
| Option | |
|
|
94
|
+
|---|---|
|
|
95
|
+
| How far around your place | 40 km; 5 to 150. |
|
|
96
|
+
| Planes from adsb.lol | On. Off: only your receiver. |
|
|
97
|
+
| adsb.lol key | Optional, secret. |
|
|
98
|
+
| Your own receiver | Optional: the URL of its `aircraft.json`. |
|
|
99
|
+
| Place | Kiosko's, or one of its own. |
|
|
100
|
+
| Your window faces, how wide, lowest over the horizon | None; 100°; 5° (advanced). See *Your window*. |
|
|
101
|
+
|
|
102
|
+
## Tested against
|
|
103
|
+
|
|
104
|
+
- **adsb.lol's real API** on 6 December 2026 around Molina de Segura (Murcia): three answers 20 s apart, 60 NM around (`scripts/capture.ts`, three requests), recorded in `src/fixtures` with the route files of their callsigns. The tests read them: parsing, the cut to your circle, dead reckoning checked against the next real answer, the quota headers, the routes accepted and refused (5 of 9 plausible), the alerts.
|
|
105
|
+
- **A Kiosko 0.2.29 sandbox** with live data around Molina de Segura: see *End to end* below.
|
|
106
|
+
- **A receiver: not a real one.** Its tests read an `aircraft.json` in readsb's format made from the third adsb.lol answer (`aircraft`, `now` in seconds), and the merge of both feeds; there was no receiver to record one from. The first time it runs with yours, check that the planes it alone sees show up.
|
|
107
|
+
|
|
108
|
+
### End to end
|
|
109
|
+
|
|
110
|
+
`scripts/e2e-sandbox.sh`, on 6 December 2026 at 21:00 around Molina de Segura: the plugin linked into a Kiosko 0.2.29 sandbox, a virtual 1280×480 screen with the three widgets, a 120 km circle, and the alerts' source on with wide thresholds (50 km, 15,000 m) so that a real plane would raise one. Live from adsb.lol, with no key:
|
|
111
|
+
|
|
112
|
+
- Eight or nine planes at a time (Wizz Air, Ryanair, easyJet, a Phenom 300…), their routes from the route files where plausible ("Rome → Málaga", "Tenerife → Bergamo") and none where not; the radar moving them between answers and gliding them to each new one; planes leaving Alicante climbing, with their arrows.
|
|
113
|
+
- Three *Look out of the window* alerts raised from the background source, each once.
|
|
114
|
+
- With 487 questions left in the window and four hours to go, it asked every 30 s, as planned; one question per read, whatever the three widgets.
|
|
115
|
+
- **CPU, the whole Kiosko process (painting the 1280×480 page, encoding its frames, the plugin's own process)**: 12.9 % of one core with the radar on *Smooth* (twice a second), 2.5 % on *Still*, each over four minutes. Kiosko's own measure, with the sample data: 28 MB settled for the three widgets, 0.1 % of a core to paint them.
|
|
116
|
+
|
|
117
|
+
With a window (0.1.1, the same evening): facing east, nothing to the east stood 5° over the horizon (the arrivals to Alicante 45 km off at 1,250 m are under 2°), so everything stepped back and *Overhead now* showed the closest of all; facing northwest, the two airliners cruising 66 and 72 km off (8°) were picked out on the radar, first in *Overhead now* ("66 km al NO · por tu ventana") and marked in the list.
|
|
118
|
+
|
|
119
|
+
Only near Molina, and only one evening: a busy sky (a few hundred planes in 150 km) wasn't tried live.
|
|
120
|
+
|
|
121
|
+
## Credits and licences
|
|
122
|
+
|
|
123
|
+
- **ADS-B data**: [adsb.lol](https://adsb.lol), under the [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/). The widgets credit it as "ADS-B: adsb.lol (ODbL)" ("adsb.lol" on a small tile).
|
|
124
|
+
- **Routes and airline names**: the [Virtual Radar Server standing data](https://github.com/vradarserver/standing-data), [CC0](https://creativecommons.org/publicdomain/zero/1.0/), served by adsb.lol.
|
|
125
|
+
- **Aircraft model names**, and **towns in each language** (the route data names them in English only; a table of the usual ones in Spanish, German and Chinese, the rest keep the route data's name): written for the plugin.
|
|
126
|
+
|
|
127
|
+
See NOTICE.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
npm test # the tests, on the recorded answers
|
|
133
|
+
npm run check # types
|
|
134
|
+
node --conditions=source scripts/screenshots.ts # docs/*.png from the sample data (made-up flights over Madrid)
|
|
135
|
+
node --conditions=source scripts/capture.ts # record adsb.lol's answers again (three requests and the routes; don't loop it)
|
|
136
|
+
node --conditions=source scripts/tables.ts <standing-data checkout> # src/tables.ts
|
|
137
|
+
scripts/e2e-sandbox.sh <kiosko checkout> <port> <lat> <lon> [minutes] # live, in a Kiosko sandbox
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT. The recorded answers in `src/fixtures` are adsb.lol's data, ODbL (see NOTICE).
|