node-red-contrib-lgtv-notify 1.0.2 → 1.0.4
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.
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "lgtv-example-flow",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "LG TV Notify Example",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Basic example showing how to send toast notifications to an LG webOS TV."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "lgtv-inject-node",
|
|
11
|
+
"type": "inject",
|
|
12
|
+
"z": "lgtv-example-flow",
|
|
13
|
+
"name": "Send Notification",
|
|
14
|
+
"props": [
|
|
15
|
+
{
|
|
16
|
+
"p": "payload"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"repeat": "",
|
|
20
|
+
"crontab": "",
|
|
21
|
+
"once": false,
|
|
22
|
+
"onceDelay": 0.1,
|
|
23
|
+
"topic": "",
|
|
24
|
+
"payload": "Hello from Node-RED!",
|
|
25
|
+
"payloadType": "str",
|
|
26
|
+
"x": 160,
|
|
27
|
+
"y": 100,
|
|
28
|
+
"wires": [
|
|
29
|
+
[
|
|
30
|
+
"lgtv-notify-node"
|
|
31
|
+
]
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "lgtv-notify-node",
|
|
36
|
+
"type": "lgtv-notify",
|
|
37
|
+
"z": "lgtv-example-flow",
|
|
38
|
+
"name": "LG TV",
|
|
39
|
+
"tv": "",
|
|
40
|
+
"message": "",
|
|
41
|
+
"x": 370,
|
|
42
|
+
"y": 100,
|
|
43
|
+
"wires": [
|
|
44
|
+
[
|
|
45
|
+
"lgtv-debug-node"
|
|
46
|
+
]
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "lgtv-debug-node",
|
|
51
|
+
"type": "debug",
|
|
52
|
+
"z": "lgtv-example-flow",
|
|
53
|
+
"name": "Response",
|
|
54
|
+
"active": true,
|
|
55
|
+
"tosidebar": true,
|
|
56
|
+
"console": false,
|
|
57
|
+
"tostatus": false,
|
|
58
|
+
"complete": "true",
|
|
59
|
+
"targetType": "full",
|
|
60
|
+
"statusVal": "",
|
|
61
|
+
"statusType": "auto",
|
|
62
|
+
"x": 540,
|
|
63
|
+
"y": 100,
|
|
64
|
+
"wires": []
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "lgtv-comment-node",
|
|
68
|
+
"type": "comment",
|
|
69
|
+
"z": "lgtv-example-flow",
|
|
70
|
+
"name": "Instructions",
|
|
71
|
+
"info": "1. Double-click the 'LG TV' node\n2. Add a new TV configuration with your TV's IP address\n3. Deploy the flow\n4. Accept the pairing prompt on your TV\n5. Click the inject button to send a notification",
|
|
72
|
+
"x": 130,
|
|
73
|
+
"y": 40,
|
|
74
|
+
"wires": []
|
|
75
|
+
}
|
|
76
|
+
]
|
package/nodes/lgtv-notify.html
CHANGED
|
@@ -30,6 +30,41 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
|
+
<script type="text/html" data-help-name="lgtv-config">
|
|
34
|
+
<p>Configuration node for LG webOS TV connection.</p>
|
|
35
|
+
|
|
36
|
+
<h3>Properties</h3>
|
|
37
|
+
<dl class="message-properties">
|
|
38
|
+
<dt>Name <span class="property-type">string</span></dt>
|
|
39
|
+
<dd>A friendly name for this TV (e.g., "Living Room TV").</dd>
|
|
40
|
+
<dt>TV IP <span class="property-type">string</span></dt>
|
|
41
|
+
<dd>The IP address of your LG TV on the local network.</dd>
|
|
42
|
+
</dl>
|
|
43
|
+
|
|
44
|
+
<h3>Finding your TV's IP Address</h3>
|
|
45
|
+
<ol>
|
|
46
|
+
<li>On your TV, go to <strong>Settings > Network > Wi-Fi Connection</strong></li>
|
|
47
|
+
<li>Select your connected network</li>
|
|
48
|
+
<li>The IP address will be displayed (e.g., 192.168.1.100)</li>
|
|
49
|
+
</ol>
|
|
50
|
+
|
|
51
|
+
<h3>Pairing Process</h3>
|
|
52
|
+
<p>When you first deploy a flow using this TV configuration:</p>
|
|
53
|
+
<ol>
|
|
54
|
+
<li>A pairing prompt will appear on your TV screen</li>
|
|
55
|
+
<li>Use your TV remote to select "Accept"</li>
|
|
56
|
+
<li>The pairing key is saved automatically</li>
|
|
57
|
+
<li>Future connections will happen automatically</li>
|
|
58
|
+
</ol>
|
|
59
|
+
|
|
60
|
+
<h3>Requirements</h3>
|
|
61
|
+
<ul>
|
|
62
|
+
<li>TV must be powered on (not in standby mode)</li>
|
|
63
|
+
<li>"LG Connect Apps" must be enabled: Settings > General > External Device Manager > LG Connect Apps</li>
|
|
64
|
+
<li>TV and Node-RED server must be on the same network</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</script>
|
|
67
|
+
|
|
33
68
|
<!-- LG TV Notify Node -->
|
|
34
69
|
<script type="text/javascript">
|
|
35
70
|
RED.nodes.registerType('lgtv-notify', {
|
|
@@ -68,12 +103,12 @@
|
|
|
68
103
|
</script>
|
|
69
104
|
|
|
70
105
|
<script type="text/html" data-help-name="lgtv-notify">
|
|
71
|
-
<p>Send toast notifications to an LG webOS TV.</p>
|
|
106
|
+
<p>Send toast notifications to an LG webOS Smart TV.</p>
|
|
72
107
|
|
|
73
108
|
<h3>Inputs</h3>
|
|
74
109
|
<dl class="message-properties">
|
|
75
110
|
<dt>payload <span class="property-type">string</span></dt>
|
|
76
|
-
<dd>The notification message to display on the TV.</dd>
|
|
111
|
+
<dd>The notification message to display on the TV (max 60 characters recommended).</dd>
|
|
77
112
|
</dl>
|
|
78
113
|
|
|
79
114
|
<h3>Outputs</h3>
|
|
@@ -82,15 +117,43 @@
|
|
|
82
117
|
<dd>The original message.</dd>
|
|
83
118
|
<dt>toastId <span class="property-type">string</span></dt>
|
|
84
119
|
<dd>The ID of the created toast notification.</dd>
|
|
120
|
+
<dt>tvResponse <span class="property-type">object</span></dt>
|
|
121
|
+
<dd>The full response from the TV API.</dd>
|
|
85
122
|
</dl>
|
|
86
123
|
|
|
87
124
|
<h3>Details</h3>
|
|
88
|
-
<p>This node sends a toast notification to an LG webOS Smart TV.</p>
|
|
89
|
-
|
|
90
|
-
<
|
|
125
|
+
<p>This node sends a toast notification to an LG webOS Smart TV. The notification appears in the top-right corner of the TV screen for approximately 5 seconds.</p>
|
|
126
|
+
|
|
127
|
+
<h4>First-time Setup</h4>
|
|
128
|
+
<ol>
|
|
129
|
+
<li>Configure the TV node with your TV's IP address</li>
|
|
130
|
+
<li>Deploy the flow</li>
|
|
131
|
+
<li><strong>Important:</strong> Accept the pairing prompt on your TV</li>
|
|
132
|
+
<li>The pairing key is saved automatically for future connections</li>
|
|
133
|
+
</ol>
|
|
134
|
+
|
|
135
|
+
<h4>Example Usage</h4>
|
|
136
|
+
<p>Send a simple notification:</p>
|
|
137
|
+
<pre>msg.payload = "Doorbell: Someone is at the door!";
|
|
138
|
+
return msg;</pre>
|
|
139
|
+
|
|
140
|
+
<h4>Requirements</h4>
|
|
141
|
+
<ul>
|
|
142
|
+
<li>LG webOS Smart TV (webOS 3.0 or newer, including 2025 models)</li>
|
|
143
|
+
<li>TV and Node-RED must be on the same network</li>
|
|
144
|
+
<li>"LG Connect Apps" must be enabled on the TV (Settings > General > External Device Manager)</li>
|
|
145
|
+
</ul>
|
|
146
|
+
|
|
147
|
+
<h4>Troubleshooting</h4>
|
|
148
|
+
<ul>
|
|
149
|
+
<li><strong>TV not connecting:</strong> Ensure TV is powered on (not standby), wait ~25 seconds after power-on</li>
|
|
150
|
+
<li><strong>No pairing prompt:</strong> Restart Node-RED and redeploy</li>
|
|
151
|
+
<li><strong>Notifications not showing:</strong> TV must be on and displaying content</li>
|
|
152
|
+
</ul>
|
|
91
153
|
|
|
92
154
|
<h3>References</h3>
|
|
93
155
|
<ul>
|
|
94
|
-
<li><a href="https://github.com/
|
|
156
|
+
<li><a href="https://github.com/Ricardo-Miguel-Caldeira/node-red-contrib-lgtv-notify">GitHub Repository</a></li>
|
|
157
|
+
<li><a href="https://www.npmjs.com/package/node-red-contrib-lgtv-notify">npm Package</a></li>
|
|
95
158
|
</ul>
|
|
96
159
|
</script>
|
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.4",
|
|
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",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/Ricardo-Miguel-Caldeira/node-red-contrib-lgtv-notify#readme",
|
|
26
26
|
"node-red": {
|
|
27
|
+
"version": ">=2.0.0",
|
|
27
28
|
"nodes": {
|
|
28
29
|
"lgtv-notify": "nodes/lgtv-notify.js"
|
|
29
30
|
}
|