@tomorrowos/sdk 0.9.69 → 0.9.71

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/PLAYER_INSTALL.md CHANGED
@@ -1,211 +1,269 @@
1
1
  # Player Installation — Getting TomorrowOS on your screens
2
2
 
3
- Your CMS is running. Now you need to get a TomorrowOS player onto your physical screen so the two can talk.
4
-
5
- This document covers:
6
-
7
- 1. How to build a player for your platform
8
- 2. How to install it on a screen
9
- 3. How to pair the screen with your CMS
10
- 4. Troubleshooting
3
+ This guide covers the full path from a verified player package to a paired screen.
4
+
5
+ | Step | What this doc answers |
6
+ | --- | --- |
7
+ | 1 | Where the verified player package comes from |
8
+ | 2 | How the player receives the CMS endpoint |
9
+ | 3 | Exact device installation steps |
10
+ | 4 | Six-character pairing |
11
+ | 5 | Tested firmware and model limitations |
12
+ | 6 | Safe unpair / re-pair |
13
+ | 7 | Known failure states |
11
14
 
12
15
  ---
13
16
 
14
17
  ## Prerequisites
15
18
 
16
- - You have a running TomorrowOS CMS (either locally, on Replit, Vercel, Railway, or self-hosted)
17
- - The CMS has a publicly reachable URL (or tunneled via ngrok for local testing)
18
- - `brand.json` at the project root is configured with your target platforms
19
+ - A running TomorrowOS CMS (Replit, Vercel, Railway, or self-hosted)
20
+ - A CMS URL the **panel** can reach (public HTTPS in production, or a tunnel / LAN IP for lab tests)
21
+ - A supported panel: **Samsung Tizen 6.5 and 7.0** or **BrightSign Series 3-6**
19
22
 
20
23
  ---
21
24
 
22
- ## Samsung Tizen
25
+ ## 1. Where the verified player package comes from
23
26
 
24
- ### Build the player
27
+ | Platform | Installation |
28
+ | --- | --- |
29
+ | **Samsung** | Install on a Samsung Tizen player via **App URL** (`https://tmr.sh/tizen`), or download the player from the CMS and install it via USB. |
30
+ | **BrightSign** | Download the ZIP package from the CMS with `config.js` configured so that `cmsEndpoint` points to your CMS origin and install it via SD card. |
25
31
 
26
- From your project root:
32
+ ### Samsung (recommended path)
27
33
 
28
- npx tomorrowos build --platform tizen
34
+ **Preferred:** on the display, open **App Management** and install with **App URL**:
29
35
 
30
- This reads `brand.json`, applies your branding to the activation screen, and outputs:
36
+ ```txt
37
+ https://tmr.sh/tizen
38
+ ```
31
39
 
32
- dist/player-tizen.wgt
40
+ **Alternative:** Control Panel → **Download Players → Samsung**, download the player package, then install the `.wgt` and `.html` via USB.
33
41
 
34
- The `.wgt` is a signed Tizen web package ready to install on any compatible Samsung commercial display.
42
+ After install, enter your CMS URL on the on-device setup screen.
35
43
 
36
- ### Install on the screen
44
+ ### BrightSign
37
45
 
38
- You have three options, depending on your setup:
46
+ **Option A — distribution ZIP**
39
47
 
40
- **Option A — URL Launcher (easiest for testing)**
48
+ 1. Download `https://tmr.sh/app/brightsign/brightsign_package.zip`.
49
+ 2. Unzip and set `config.js` `cmsEndpoint` to your CMS origin (and set `orientation`).
50
+ 3. Copy files to the SD card root.
41
51
 
42
- 1. On the Samsung display, press the remote's menu button
43
- 2. Go to `Menu → System → Ext. Device Manager → URL Launcher Settings`
44
- 3. Enter the URL where your `.wgt` is hosted (your CMS serves this at `/player/tizen.wgt` once built)
45
- 4. Save and exit
46
- 5. The display reboots and launches TomorrowOS on boot
52
+ **Option B — from your CMS (auto-fills CMS URL)**
47
53
 
48
- **Option B — Tizen Studio Device Manager (for bulk deployment)**
54
+ 1. Control Panel → **Download Players → BrightSign** (`GET /players/brightsign.zip`).
55
+ 2. That zip already has `cmsEndpoint` pointed at **this** CMS origin — usually you only confirm `orientation`.
49
56
 
50
- 1. Install Tizen Studio from samsung.com
51
- 2. Put the display into Developer Mode (Menu → Support → Developer Mode → enter your PC's IP address)
52
- 3. In Tizen Studio, open Device Manager
53
- 4. Connect to your display by IP
54
- 5. Right-click → Install App → select `dist/player-tizen.wgt`
55
- 6. App installs and auto-launches
57
+ Caption in the Control Panel today: **Tizen 6.5 and 7.0**, **BrightSign Series 3-6**.
56
58
 
57
- **Option C — USB Sideload (no network needed)**
58
-
59
- 1. Copy `dist/player-tizen.wgt` to a USB stick
60
- 2. Insert USB into display
61
- 3. On the remote, open Home → Apps → USB Sideload
62
- 4. Select the `.wgt` file and install
59
+ ---
63
60
 
64
- ### Supported Tizen versions
61
+ ## 2. How the player receives the CMS endpoint
65
62
 
66
- V1 supports:
63
+ The two platforms differ. Using the wrong method is a common pairing failure.
67
64
 
68
- - SSSP 5 and newer commercial displays
69
- - TEP 6.5 and newer commercial displays
65
+ ### Samsung Tizen — on-device CMS setup
70
66
 
71
- If you have an older SSSP 4 display, you will need a firmware update or the older-generation player build (contact support).
67
+ The Tizen `.wgt` does **not** bake a BrightSign-style `config.js` endpoint.
72
68
 
73
- ### Activation
69
+ 1. Install / launch the player.
70
+ 2. First boot: choose **orientation** (`landscape` / `portrait-right` / `portrait-left`).
71
+ 3. If no CMS URL is stored yet, the player shows the **CMS setup** screen.
72
+ 4. Enter the CMS HTTP(S) origin, for example:
73
+ - Hosted: `https://your-cms.example.com/`
74
+ - Lab: `http://192.168.1.105:3000/` (your PC **LAN IP**, not `localhost`)
75
+ 5. The player saves the URL in `localStorage` and converts `http://` / `https://` → `ws://` / `wss://` for the device WebSocket.
76
+ 6. Press remote **Red (A)** later to re-open orientation selection.
74
77
 
75
- Once the player is running, the Samsung display shows the TomorrowOS activation screen branded with your logo and colours. Displayed on the screen:
78
+ If you installed via App URL or a CMS USB download, enter **your CMS origin** on the setup screen (not the App URL itself).
76
79
 
77
- - Your logo (top)
78
- - A 6-digit activation code
79
- - "Enter this code at [your CMS URL]"
80
- - Device ID (small text, bottom)
80
+ ### BrightSign — `config.js` on the storage card
81
81
 
82
- On your CMS, go to the **Pair** page, enter the 6-digit code, and press Submit. Within a few seconds the display will transition from the activation screen to your content.
82
+ BrightSign has **no** on-device CMS setup UI in the current player.
83
83
 
84
- ---
84
+ ```js
85
+ window.TOMORROWOS_CONFIG = {
86
+ cmsEndpoint: "https://your-cms.example.com/",
87
+ orientation: "landscape" // landscape | portrait-right | portrait-left
88
+ };
89
+ ```
85
90
 
86
- ## BrightSign
91
+ | Field | Purpose |
92
+ | --- | --- |
93
+ | `cmsEndpoint` | CMS HTTP(S) URL (converted to `ws://` / `wss://` at runtime) |
94
+ | `orientation` | Screen orientation baked into the boot config |
87
95
 
88
- ### Build the player
96
+ When you download via the CMS, `cmsEndpoint` is **filled automatically** with that CMS origin. Usually you only confirm `orientation`.
89
97
 
90
- npx tomorrowos build --platform brightsign
98
+ ### Never use `localhost` on a panel
91
99
 
92
- Outputs:
100
+ `localhost` / `127.0.0.1` on the player points at the **display itself**, not your laptop. Pairing and WebSocket will fail. Use a LAN IP, tunnel, or public HTTPS URL the panel can resolve.
93
101
 
94
- dist/player-brightsign.zip
102
+ ---
95
103
 
96
- ### Install on the screen
104
+ ## 3. Exact device installation steps
97
105
 
98
- 1. Copy the **contents** of `player-brightsign.zip` (not the zip itself) onto a microSD card or USB stick
99
- 2. The root of the card should contain `autorun.brs`, the player files, and the `brand/` assets
100
- 3. Insert the card into the BrightSign device
101
- 4. Power on — BrightSign boots into TomorrowOS automatically
106
+ ### Samsung Tizen
102
107
 
103
- ### Supported BrightSign versions
108
+ **Option A — App Management / App URL (recommended)**
104
109
 
105
- - BrightSign OS 9.0 and newer
106
- - BrightSign OS 8.x: not supported in V1 (known local DWS API differences; support planned for V1.1)
110
+ 1. On the Samsung commercial display, open **App Management**.
111
+ 2. Choose install / add app by **App URL**.
112
+ 3. Enter:
107
113
 
108
- ### Activation
114
+ ```txt
115
+ https://tmr.sh/tizen
116
+ ```
109
117
 
110
- Same as Tizen — the BrightSign displays an activation screen with your branding and a 6-digit code. Enter the code in your CMS's Pair page.
118
+ 4. Install and launch TomorrowOS.
119
+ 5. Complete orientation + CMS URL setup ([section 2](#2-how-the-player-receives-the-cms-endpoint)).
111
120
 
112
- ---
121
+ **Option B — USB sideload (download from CMS)**
113
122
 
114
- ## LG webOS Signage (V1.1)
123
+ 1. Control Panel → **Download Players → Samsung**, download the player package and obtain the `.wgt`.
124
+ 2. Copy the `.wgt` and `.html` to the root folder of a USB stick.
125
+ 3. Insert USB into the display to install.
126
+ 4. Complete orientation + CMS URL setup.
115
127
 
116
- Support planned for V1.1 release. Build command will be:
128
+ **Option C — Tizen Studio Device Manager**
117
129
 
118
- npx tomorrowos build --platform webos
130
+ 1. Install Tizen Studio.
131
+ 2. Enable Developer Mode on the display (enter your PC’s IP).
132
+ 3. Connect in Device Manager by IP.
133
+ 4. Right-click → Install App → select the `.wgt`.
134
+ 5. Complete orientation + CMS URL setup.
119
135
 
120
- Output: `dist/player-webos.ipk` installable via webOS Signage Manager or sideload.
136
+ Signed production packages need a Samsung distributor certificate. App URL / USB paths are fine when your environment allows them.
121
137
 
122
- ---
138
+ ### BrightSign
123
139
 
124
- ## Android Managed (V1.1)
140
+ 1. Get a player zip from either:
141
+ - `https://tmr.sh/app/brightsign/brightsign_package.zip`, **or**
142
+ - Control Panel → **Download Players → BrightSign**
143
+ 2. Unzip on a computer.
144
+ 3. If you used the distribution ZIP, edit `config.js` so `cmsEndpoint` is your CMS origin and set `orientation`.
145
+ If you used the CMS download, `cmsEndpoint` is usually already filled — confirm `orientation`.
146
+ 4. Copy the **contents** of the unzipped folder (not the zip file itself) onto a microSD card or USB stick.
147
+ 5. Confirm the **root** of the card contains:
148
+ - `autorun.brs`
149
+ - `config.js`
150
+ - the rest of the player files
151
+ 6. Ensure only one `autorun.brs` exists (no competing BSN autorun artifacts).
152
+ 7. Insert the card into the BrightSign player.
153
+ 8. Full power-cycle the player.
154
+ 9. Wait through the initial black window (~10 seconds before `Show()` is normal).
155
+ 10. Confirm the pairing / brand UI appears.
125
156
 
126
- Support planned for V1.1 release. Build command will be:
127
-
128
- npx tomorrowos build --platform android-managed
129
-
130
- Output: `dist/player-android.apk` with device-owner privileges required at enrolment.
157
+ ---
131
158
 
132
- Generic (unmanaged) Android boxes are supported in V1.x with capability-limited functionality (see TomorrowOS protocol documentation).
159
+ ## 4. Six-character pairing
133
160
 
134
- ---
161
+ 1. With CMS endpoint configured and network up, the player shows a **six-character** pairing code (digits and uppercase letters `0-9` / `A-Z`).
162
+ 2. In the Control Panel, open **Pair**.
163
+ 3. Enter the code exactly (the UI normalises to uppercase / strips invalid characters; length must be **6**).
164
+ 4. Submit. The CMS calls `POST /pairing/verify`.
165
+ 5. Within a few seconds the device should appear in the device list as paired / online.
166
+ 6. Publish a small image + video playlist to confirm playback.
135
167
 
136
- ## ChromeOS Managed Kiosk (V1.x)
168
+ Notes:
137
169
 
138
- Support planned for V1.x release. Deployment will be via Google Admin Console as a managed kiosk web app.
170
+ - The code is bound to the device identity in the CMS registry and is treated as a **permanent** pairing code for that serial (the same code is used again after a safe unpair).
171
+ - If the UI is still generating / rolling the code, wait until a stable code is shown before submitting.
172
+ - If pairing fails, see [known failure states](#7-known-failure-states) before generating confusion by reinstalling.
139
173
 
140
174
  ---
141
175
 
142
- ## Windows (V1.x)
176
+ ## 5. Tested firmware and model limitations
143
177
 
144
- Support planned for V1.x release. Distribution as MSI installer via Group Policy or Intune.
178
+ Always record **model + firmware** from `device.info.get` before calling a fleet production-ready.
145
179
 
146
- ---
180
+ ### Samsung Tizen
147
181
 
148
- ## Troubleshooting
182
+ | Topic | Limitation |
183
+ | --- | --- |
184
+ | OS baseline | **Tizen 6.5 and 7.0** commercial displays only |
185
+ | Older panels | SSSP 4 / older Tizen generations are out of scope without a separate player / firmware path |
186
+ | Screenshots | `device.telemetry.captureScreen` needs commercial firmware **1080+** |
187
+ | Orientation | First-boot intro; change later with remote **Red (A)** |
188
+ | Capability truth | Trust live `device.info.getCapabilities` over docs tables |
149
189
 
150
- ### Activation screen doesn't appear
190
+ ### BrightSign
151
191
 
152
- **Check:**
192
+ | Topic | Limitation |
193
+ | --- | --- |
194
+ | Control Panel caption | Series **3-6** called out as supported |
195
+ | Series 3–6 | May work; **validate on real hardware** before fleet rollout |
196
+ | Series 3 video | Upgrade firmware to **9.1.140+** for reliable video |
197
+ | Series 3 4K H.264 | **Hardware limit** — use **1080p H.264**, not 4K |
198
+ | Boot black screen | ~10s delay before UI show is normal |
199
+ | On/off timer | Supported only when display mute API is available |
200
+ | Capability truth | Trust live `device.info.getCapabilities` over docs tables |
153
201
 
154
- - Display is powered on and has network connectivity
155
- - `brand.json` has `cms_endpoint` set to your publicly reachable CMS URL (it should be `wss://` for production, `ws://` only for local testing on the same network)
156
- - You rebuilt the player after changing `brand.json` — the CMS endpoint is baked into the `.wgt` at build time
202
+ ### Not shipping yet
157
203
 
158
- ### Activation code appears but pairing fails
204
+ LG webOS, Android, and Windows players are not in this SDK release.
159
205
 
160
- **Check:**
206
+ ---
161
207
 
162
- - The code has not expired — codes are valid for 15 minutes; generate a new one by restarting the player
163
- - The CMS server is actually reachable from the display's network — test by opening the CMS URL in the display's browser (if available)
164
- - Firewall rules — the display needs to reach your CMS on WebSocket port 443 (or whatever you configured)
208
+ ## 6. Safe unpair / re-pair instructions
165
209
 
166
- ### Replit workspaces go to sleep
210
+ Do **not** wipe the SD card or reinstall the app as the first unpair step. Unpair in the CMS first.
167
211
 
168
- Replit's free tier sleeps inactive workspaces. Your screen will show "reconnecting..." when the workspace is asleep, and reconnect automatically when someone wakes it.
212
+ ### Unpair (safe)
169
213
 
170
- **For production:** upgrade to Replit Hacker (Always-On) or move to Railway / Vercel / self-hosted.
214
+ 1. Open the Control Panel device list.
215
+ 2. Find the device and click **Unpair** (confirms before sending).
216
+ 3. That calls `POST /pairing/unpair` with `{ "deviceId": "..." }`.
217
+ 4. The CMS removes the paired-device record. Operator display name can survive in the device registry for later.
218
+ 5. If the player is still connected, the CMS sends a `pairing.unpaired` message over the WebSocket so the player can return to the pairing UI.
171
219
 
172
- ### Samsung display stuck on black screen after URL Launcher
220
+ Programmatic equivalent on the server:
173
221
 
174
- Check that your `.wgt` is reachable at the URL you set. Open the URL in any browser — it should download the `.wgt` file. If not, the display can't fetch it. Common causes:
222
+ ```ts
223
+ await tomorrowos.pairing.unpair(deviceId);
224
+ ```
175
225
 
176
- - URL is http:// but server redirects to https:// (Samsung doesn't follow the redirect)
177
- - URL requires auth (host the `.wgt` publicly)
178
- - File is named `.zip` instead of `.wgt` (must be `.wgt`)
226
+ ### Re-pair
179
227
 
180
- ### BrightSign won't boot into the player
228
+ 1. Confirm the player shows the pairing UI again (power-cycle if it did not receive the unpair push).
229
+ 2. Enter the **same six-character code** shown on the screen into Control Panel → **Pair**.
230
+ 3. Publish content again if needed (assignments were cleared with the paired record).
181
231
 
182
- Check `autorun.brs` is at the root of the SD card, not in a subfolder. BrightSign only runs `autorun.brs` from the root.
232
+ ### Moving a screen to a different CMS
183
233
 
184
- ### "Pairing already completed" error
234
+ 1. Unpair on the **old** CMS first.
235
+ 2. Point the player at the **new** CMS endpoint:
236
+ - Tizen: re-enter CMS URL on the setup screen (clear / change stored URL if needed, then reboot).
237
+ - BrightSign: download a new zip from the **new** CMS (or edit `config.js` `cmsEndpoint`), copy to SD, power-cycle.
238
+ 3. Pair on the new CMS with the on-screen code.
185
239
 
186
- A device can only be paired once. If you want to re-pair (e.g. moving a screen to a new CMS), first unpair it from the current CMS (`tomorrowos.pairing.revoke(deviceId)` from your CMS server), then generate a new activation code on the device by power-cycling or running "Unpair" from the device's Settings menu (if enabled in `brand.json`).
240
+ ---
187
241
 
188
- ### Pairing code rolls past 15 minutes before I can enter it
242
+ ## 7. Known failure states
189
243
 
190
- Power-cycle the device (or call `player.restart()` if available) to generate a fresh code.
244
+ | Symptom | Likely cause | What to do |
245
+ | --- | --- | --- |
246
+ | Pairing / WebSocket fails immediately | CMS URL is `localhost` / `127.0.0.1` on the panel | Use LAN IP, tunnel, or public HTTPS |
247
+ | BrightSign empty / wrong `cmsEndpoint` | Distribution ZIP used without editing `config.js`, or wrong CMS download | Set `cmsEndpoint` in `config.js`, or re-download from **this** CMS (`/players/brightsign.zip`) |
248
+ | BrightSign never boots player | `autorun.brs` not at SD root, or competing autorun | Put files at card root; only one `autorun.brs` |
249
+ | BrightSign black for ~10s then UI | Normal boot delay | Wait; do not treat as a crash yet |
250
+ | BrightSign Series 3 video fails | Firmware below **9.1.140** | Upgrade firmware, re-test |
251
+ | BrightSign Series 3 4K video fails | Hardware codec limit | Re-encode to **1080p H.264** |
252
+ | Tizen pairs but screenshot fails | Firmware below **1080** | Upgrade commercial firmware to **1080+** |
191
253
 
192
254
  ---
193
255
 
194
- ## Getting help
256
+ ## Coming soon
195
257
 
196
- - Package issues — file a GitHub issue at `github.com/TomorrowOS/sdk`
197
- - Samsung-specific issues — the TomorrowOS Samsung bridge is Apache 2.0 at `github.com/TomorrowOS/player-tizen`
198
- - BrightSign-specific issues — `github.com/TomorrowOS/player-brightsign`
199
- - Commercial support — SL-X provides supported, SLA-backed deployments; see `sl-x.com`
258
+ LG webOS, Android, and Windows apps.
200
259
 
201
260
  ---
202
261
 
203
262
  ## Glossary
204
263
 
205
- - `.wgt` — Tizen web package (a signed zip containing your branded player for Samsung displays)
206
- - **Activation screen** — the branded full-screen UI a new player shows while it waits to be paired
207
- - **Pairing code** — six-digit number shown on the screen, entered in the CMS to complete device registration
208
- - **SSSP** — Samsung Smart Signage Platform (older Tizen signage firmware generation)
209
- - **TEP** — Tizen Enterprise Platform (newer Samsung signage firmware generation)
210
- - **DWS** — BrightSign's Device Web Services (local HTTPS REST API)
211
- - **URL Launcher** — Samsung's built-in mechanism for loading a web app from a URL on startup
264
+ - **`.wgt`** — Tizen web package for Samsung commercial displays
265
+ - **Pairing code** — six-character `0-9A-Z` code shown on the screen and entered in the CMS
266
+ - **App URL** — Samsung App Management install URL (`https://tmr.sh/tizen`)
267
+ - **`cmsEndpoint`** — BrightSign `config.js` CMS HTTP(S) URL
268
+ - **`POST /pairing/verify`** — Control Panel pair action
269
+ - **`POST /pairing/unpair`** — Control Panel unpair action