node-red-contrib-lgtv-notify 1.0.0 → 1.0.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/.claude/settings.local.json +31 -0
- package/.github/workflows/publish.yml +25 -0
- package/CLAUDE.md +99 -0
- package/README.md +6 -0
- package/package.json +7 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(npm run build:*)",
|
|
5
|
+
"mcp__plugin_playwright_playwright__browser_click",
|
|
6
|
+
"mcp__plugin_playwright_playwright__browser_evaluate",
|
|
7
|
+
"Bash(curl:*)",
|
|
8
|
+
"Bash(timeout 5 npx ares-inspect:*)",
|
|
9
|
+
"mcp__plugin_playwright_playwright__browser_console_messages",
|
|
10
|
+
"Bash(timeout 8 npx ares-inspect:*)",
|
|
11
|
+
"WebFetch(domain:webostv.developer.lge.com)",
|
|
12
|
+
"WebFetch(domain:gist.github.com)",
|
|
13
|
+
"WebFetch(domain:www.webosbrew.org)",
|
|
14
|
+
"WebFetch(domain:www.webosose.org)",
|
|
15
|
+
"Bash(npx ares-device-info:*)",
|
|
16
|
+
"Bash(npx @�webos-tools/cli ares-device-info -d webostv)",
|
|
17
|
+
"Bash(npx ares-shell -d webostv -r \"cat /var/run/nyx/os_info.json\")",
|
|
18
|
+
"Bash(npx ares-shell:*)",
|
|
19
|
+
"Bash(npx ares-device:*)",
|
|
20
|
+
"WebFetch(domain:cani.rootmy.tv)",
|
|
21
|
+
"WebFetch(domain:www.home-assistant.io)",
|
|
22
|
+
"Bash(timeout 5 curl:*)",
|
|
23
|
+
"Bash(timeout 3 bash -c 'echo > /dev/tcp/10.1.60.87/3000')",
|
|
24
|
+
"Bash(timeout 3 bash -c 'echo > /dev/tcp/10.1.60.87/3001')",
|
|
25
|
+
"Bash(timeout 15 node:*)",
|
|
26
|
+
"Bash(timeout 35 node:*)",
|
|
27
|
+
"Bash(npm whoami:*)",
|
|
28
|
+
"Bash(npm publish)"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm install --ignore-scripts
|
|
21
|
+
|
|
22
|
+
- name: Publish to npm
|
|
23
|
+
run: npm publish --access public
|
|
24
|
+
env:
|
|
25
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# YouTube Enhanced - webOS TV App
|
|
2
|
+
|
|
3
|
+
Based on [youtube-webos](https://github.com/webosbrew/youtube-webos) with custom modifications for larger TVs.
|
|
4
|
+
|
|
5
|
+
## App Info
|
|
6
|
+
- **App ID**: `com.mysmartv.youtube`
|
|
7
|
+
- **Title**: YouTube Enhanced
|
|
8
|
+
- **Features**: Ad blocking, SponsorBlock, smaller thumbnails (5 per row)
|
|
9
|
+
|
|
10
|
+
## Project Structure
|
|
11
|
+
```
|
|
12
|
+
/home/rcaldeira/mySmartTV-Youtube/
|
|
13
|
+
├── assets/
|
|
14
|
+
│ └── appinfo.json # App manifest (custom ID)
|
|
15
|
+
├── src/
|
|
16
|
+
│ ├── index.html # Entry point
|
|
17
|
+
│ ├── index.js # Redirects to youtube.com/tv
|
|
18
|
+
│ ├── userScript.ts # Main injection script
|
|
19
|
+
│ ├── thumbnail-size.css # Custom CSS for smaller thumbnails
|
|
20
|
+
│ ├── adblock.js # Ad blocking
|
|
21
|
+
│ ├── sponsorblock.js # SponsorBlock integration
|
|
22
|
+
│ └── ... # Other modules
|
|
23
|
+
├── dist/ # Build output
|
|
24
|
+
└── com.mysmartv.youtube_1.0.0_all.ipk
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Development Commands
|
|
28
|
+
|
|
29
|
+
### Build
|
|
30
|
+
```bash
|
|
31
|
+
npm run build
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Package
|
|
35
|
+
```bash
|
|
36
|
+
npx ares-package dist/ --outdir .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Install to TV
|
|
40
|
+
```bash
|
|
41
|
+
npx ares-install com.mysmartv.youtube_1.0.0_all.ipk -d webostv
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Launch
|
|
45
|
+
```bash
|
|
46
|
+
npx ares-launch com.mysmartv.youtube -d webostv
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Full Deploy (one command)
|
|
50
|
+
```bash
|
|
51
|
+
npm run build && npx ares-package dist/ --outdir . && npx ares-install com.mysmartv.youtube_1.0.0_all.ipk -d webostv && npx ares-launch com.mysmartv.youtube -d webostv
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Preview Method (Remote Debugging)
|
|
55
|
+
|
|
56
|
+
### 1. Start Inspector
|
|
57
|
+
```bash
|
|
58
|
+
npx ares-inspect com.mysmartv.youtube -d webostv
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Output:
|
|
62
|
+
```
|
|
63
|
+
Application Debugging - http://localhost:XXXXX
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. Open in Browser
|
|
67
|
+
1. Navigate to `http://localhost:XXXXX`
|
|
68
|
+
2. Click on "YouTube na TV" link
|
|
69
|
+
3. DevTools opens with live screencast of the TV
|
|
70
|
+
|
|
71
|
+
### 3. Take Screenshot with Playwright
|
|
72
|
+
```javascript
|
|
73
|
+
await page.goto('http://localhost:XXXXX');
|
|
74
|
+
await page.click('text=YouTube na TV');
|
|
75
|
+
await page.waitForTimeout(3000);
|
|
76
|
+
await page.screenshot({ path: 'tv-preview.png' });
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Custom Thumbnail CSS
|
|
80
|
+
|
|
81
|
+
The `src/thumbnail-size.css` uses CSS transforms to scale down content:
|
|
82
|
+
- Scales browse content to 85%
|
|
83
|
+
- Scales individual tiles to 82%
|
|
84
|
+
- Compacts sidebar to give more content space
|
|
85
|
+
- Results in ~5 thumbnails per row on large TVs
|
|
86
|
+
|
|
87
|
+
## TV Device
|
|
88
|
+
- **Name**: webostv
|
|
89
|
+
- **IP**: 10.1.60.87:9922
|
|
90
|
+
|
|
91
|
+
### List Devices
|
|
92
|
+
```bash
|
|
93
|
+
npx ares-setup-device --list
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
- App coexists with official YouTube (different app ID)
|
|
98
|
+
- All youtube-webos features enabled (ad blocking, SponsorBlock)
|
|
99
|
+
- CSS may need fine-tuning based on specific TV size
|
package/README.md
CHANGED
|
@@ -94,6 +94,12 @@ return msg;
|
|
|
94
94
|
- Notifications only appear when the TV is on and displaying content
|
|
95
95
|
- Maximum message length is 60 characters
|
|
96
96
|
|
|
97
|
+
## Support
|
|
98
|
+
|
|
99
|
+
If you find this useful, consider buying me a coffee:
|
|
100
|
+
|
|
101
|
+
[](https://buymeacoffee.com/rcaldeira)
|
|
102
|
+
|
|
97
103
|
## License
|
|
98
104
|
|
|
99
105
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-lgtv-notify",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Send toast notifications to LG webOS TVs from Node-RED. Works with webOS 10+ (2025 TVs).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|
|
@@ -13,14 +13,17 @@
|
|
|
13
13
|
"smart-home",
|
|
14
14
|
"home-automation"
|
|
15
15
|
],
|
|
16
|
-
"author": "rcaldeira",
|
|
16
|
+
"author": "rcaldeira <ricardo.caldeira.00@gmail.com>",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "git+https://github.com/Ricardo-Miguel-Caldeira/node-red-contrib-lgtv-notify.git"
|
|
21
21
|
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Ricardo-Miguel-Caldeira/node-red-contrib-lgtv-notify/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Ricardo-Miguel-Caldeira/node-red-contrib-lgtv-notify#readme",
|
|
22
26
|
"node-red": {
|
|
23
|
-
"version": ">=2.0.0",
|
|
24
27
|
"nodes": {
|
|
25
28
|
"lgtv-notify": "nodes/lgtv-notify.js"
|
|
26
29
|
}
|