LG TV Remote

TV Remote using node-red-dashboard and node-red-contrib-lgtv.

Example Dashboard Screenshot

[{"id":"ee19f49b.64ec08","type":"tab","label":"LG TV Remote"},{"id":"f02ea33d.fdb84","type":"ui_dropdown","z":"ee19f49b.64ec08","name":"app dropdown","label":"","group":"c6dacf54.b2518","order":2,"width":"4","height":"2","passthru":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":471.5,"y":235,"wires":[["ff0bfad9.199c88"]]},{"id":"4717c94f.7ad0c8","type":"lgtv-request","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":188.5,"y":172,"wires":[["190297fe.204198"]]},{"id":"190297fe.204198","type":"function","z":"ee19f49b.64ec08","name":"dropdown options","func":"context.global.lgtvIcons = {};\nvar res = [];\nmsg.payload.launchPoints.forEach(function (lp) {\n     var dv = {};\n     dv[lp.title] = lp.id;\n     context.global.lgtvIcons[lp.id] = lp.icon;\n     res.push(dv);\n});\nreturn {options: res};","outputs":1,"noerr":0,"x":365.5,"y":172,"wires":[["f02ea33d.fdb84","eb3bb2e7.ac27b"]]},{"id":"ff0bfad9.199c88","type":"lgtv-app","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","passthru":true,"x":127.5,"y":299,"wires":[["f02ea33d.fdb84","eb3bb2e7.ac27b","94500e07.0ebf5"]]},{"id":"eb3bb2e7.ac27b","type":"function","z":"ee19f49b.64ec08","name":"save currentApp","func":"if (msg.payload) context.global.lgtvCurrentApp = msg.payload;\nreturn {payload: context.global.lgtvCurrentApp};","outputs":1,"noerr":0,"x":262.5,"y":236,"wires":[["f02ea33d.fdb84"]]},{"id":"fe0302b3.4e099","type":"ui_template","z":"ee19f49b.64ec08","group":"c6dacf54.b2518","name":"app icon","order":3,"width":"2","height":"2","format":"<div style=\"text-align: center\">\n<img style=\"width:80px; height: 80px;\" ng-src=\"{{msg.payload}}\">\n</div>","storeOutMessages":false,"fwdInMessages":false,"x":486.5,"y":300,"wires":[[]]},{"id":"94500e07.0ebf5","type":"function","z":"ee19f49b.64ec08","name":"app icon","func":"\nreturn {payload: context.global.lgtvIcons[msg.payload]};","outputs":1,"noerr":0,"x":327.5,"y":300,"wires":[["fe0302b3.4e099"]]},{"id":"78388b06.3b86c4","type":"lgtv-mute","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","passthru":true,"x":105.5,"y":436,"wires":[["5ba5e6b1.5a3538"]]},{"id":"32b6d911.22d5f6","type":"lgtv-volume","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","passthru":false,"x":280.5,"y":439,"wires":[["211fae9a.d0d312"]]},{"id":"5ba5e6b1.5a3538","type":"ui_switch","z":"ee19f49b.64ec08","name":"mute","label":"","group":"c6dacf54.b2518","order":4,"width":"1","height":"1","passthru":false,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":109.5,"y":382,"wires":[["78388b06.3b86c4"]]},{"id":"211fae9a.d0d312","type":"ui_slider","z":"ee19f49b.64ec08","name":"","label":"","group":"c6dacf54.b2518","order":6,"width":"3","height":"1","passthru":false,"topic":"","min":0,"max":"100","step":1,"x":276.5,"y":380,"wires":[["32b6d911.22d5f6"]]},{"id":"da8e4647.757db8","type":"lgtv-control","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":96.5,"y":119,"wires":[["b33211e2.cb7c1","755cbe6d.09763"]]},{"id":"b33211e2.cb7c1","type":"switch","z":"ee19f49b.64ec08","name":"is true","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","outputs":1,"x":225.5,"y":119,"wires":[["2718e96d.19e0a6"]]},{"id":"2718e96d.19e0a6","type":"function","z":"ee19f49b.64ec08","name":"listLaunchPoints","func":"return {\n    topic: 'ssap://com.webos.applicationManager/listLaunchPoints',\n    payload: {}\n};","outputs":1,"noerr":0,"x":393.5,"y":119,"wires":[["4717c94f.7ad0c8"]]},{"id":"755cbe6d.09763","type":"ui_switch","z":"ee19f49b.64ec08","name":"","label":"Power","group":"c6dacf54.b2518","order":1,"width":"6","height":"1","passthru":false,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":137.5,"y":48,"wires":[["23477b86.594934"]]},{"id":"23477b86.594934","type":"switch","z":"ee19f49b.64ec08","name":"false/true","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"true"}],"checkall":"true","outputs":2,"x":262.5,"y":48,"wires":[["bc9c4a8e.abf0f8"],["f9ee91a5.fda56"]]},{"id":"f9ee91a5.fda56","type":"function","z":"ee19f49b.64ec08","name":"turnOn","func":"\nreturn msg;","outputs":1,"noerr":0,"x":404.5,"y":72,"wires":[[]]},{"id":"bc9c4a8e.abf0f8","type":"function","z":"ee19f49b.64ec08","name":"turnOff","func":"return {payload: 'turnOff'};","outputs":1,"noerr":0,"x":413,"y":25,"wires":[["8f8b7123.60cbd"]]},{"id":"8f8b7123.60cbd","type":"lgtv-control","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":548.5,"y":25,"wires":[[]]},{"id":"cdfaa845.a67578","type":"ui_button","z":"ee19f49b.64ec08","name":"volumeDown","group":"c6dacf54.b2518","order":5,"width":"1","height":"1","label":"","color":"","bgcolor":"","icon":"fa-volume-down","payload":"volumeDown","payloadType":"str","topic":"","x":469.5,"y":381,"wires":[["852b6f27.07788"]]},{"id":"b31aed95.878a3","type":"ui_button","z":"ee19f49b.64ec08","name":"volumeUp","group":"c6dacf54.b2518","order":7,"width":"1","height":"1","label":"","color":"","bgcolor":"","icon":"fa-volume-up","payload":"volumeUp","payloadType":"str","topic":"","x":466,"y":431,"wires":[["852b6f27.07788"]]},{"id":"852b6f27.07788","type":"lgtv-control","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":630,"y":408,"wires":[[]]},{"id":"77a146f9.260528","type":"ui_button","z":"ee19f49b.64ec08","name":"back","group":"c6dacf54.b2518","order":8,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-undo","payload":"BACK","payloadType":"str","topic":"","x":100,"y":502,"wires":[["560c9098.8f17"]]},{"id":"49a50ec1.bf7ef","type":"ui_button","z":"ee19f49b.64ec08","name":"up","group":"c6dacf54.b2518","order":9,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-arrow-up","payload":"UP","payloadType":"str","topic":"","x":223.14285278320312,"y":497.42852783203125,"wires":[["560c9098.8f17"]]},{"id":"f7e5efd3.8f287","type":"ui_button","z":"ee19f49b.64ec08","name":"left","group":"c6dacf54.b2518","order":11,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-arrow-left","payload":"LEFT","payloadType":"str","topic":"","x":98.5714111328125,"y":539.1427688598633,"wires":[["560c9098.8f17"]]},{"id":"e0626064.ca00e","type":"ui_button","z":"ee19f49b.64ec08","name":"ok","group":"c6dacf54.b2518","order":12,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-check","payload":"ENTER","payloadType":"str","topic":"","x":227.14285278320312,"y":541.5712890625,"wires":[["560c9098.8f17"]]},{"id":"f2567df2.acf89","type":"ui_button","z":"ee19f49b.64ec08","name":"right","group":"c6dacf54.b2518","order":13,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-arrow-right","payload":"RIGHT","payloadType":"str","topic":"","x":352.5714111328125,"y":540.5713500976562,"wires":[["560c9098.8f17"]]},{"id":"9132c4fd.6ae9e8","type":"ui_button","z":"ee19f49b.64ec08","name":"<<","group":"c6dacf54.b2518","order":14,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-backward","payload":"rewind","payloadType":"str","topic":"","x":98.57141876220703,"y":576.2856254577637,"wires":[["284e4fae.9a7bf"]]},{"id":"19878b07.61ba35","type":"ui_button","z":"ee19f49b.64ec08","name":"down","group":"c6dacf54.b2518","order":15,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-arrow-down","payload":"DOWN","payloadType":"str","topic":"","x":222.7143096923828,"y":576.7141723632812,"wires":[["560c9098.8f17"]]},{"id":"a0df526b.ea05c","type":"ui_button","z":"ee19f49b.64ec08","name":">>","group":"c6dacf54.b2518","order":16,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-forward","payload":"fastForward","payloadType":"str","topic":"","x":347.5714416503906,"y":579.7142333984375,"wires":[["284e4fae.9a7bf"]]},{"id":"a3498e46.512e","type":"ui_button","z":"ee19f49b.64ec08","name":"play","group":"c6dacf54.b2518","order":17,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-play","payload":"play","payloadType":"str","topic":"lgtv/set/media.controls/play","x":98.42855834960938,"y":613.999927520752,"wires":[["284e4fae.9a7bf"]]},{"id":"2f31c215.a44a0e","type":"ui_button","z":"ee19f49b.64ec08","name":"pause","group":"c6dacf54.b2518","order":18,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-pause","payload":"pause","payloadType":"str","topic":"","x":222.4285888671875,"y":612.8571166992188,"wires":[["284e4fae.9a7bf"]]},{"id":"a13b1e0b.7285d","type":"ui_button","z":"ee19f49b.64ec08","name":"stop","group":"c6dacf54.b2518","order":19,"width":"2","height":"1","label":"","color":"","bgcolor":"","icon":"fa-stop","payload":"stop","payloadType":"str","topic":"","x":349.1428527832031,"y":615.142822265625,"wires":[["284e4fae.9a7bf"]]},{"id":"284e4fae.9a7bf","type":"lgtv-control","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":598,"y":673,"wires":[[]]},{"id":"560c9098.8f17","type":"lgtv-button","z":"ee19f49b.64ec08","tv":"7ec37465.2c0f1c","name":"","x":619.5,"y":538,"wires":[]},{"id":"b58ebda1.fd3db","type":"ui_button","z":"ee19f49b.64ec08","name":"menu","group":"c6dacf54.b2518","order":10,"width":"2","height":"1","label":"MENU","color":"","bgcolor":"","icon":"","payload":"MENU","payloadType":"str","topic":"","x":350,"y":502,"wires":[["560c9098.8f17"]]},{"id":"768575af.8c8fdc","type":"ui_button","z":"ee19f49b.64ec08","name":"home","group":"c6dacf54.b2518","order":20,"width":"3","height":"1","label":"HOME","color":"","bgcolor":"","icon":"","payload":"HOME","payloadType":"str","topic":"","x":101,"y":661,"wires":[["560c9098.8f17"]]},{"id":"738965c6.97b76c","type":"ui_button","z":"ee19f49b.64ec08","name":"exit","group":"c6dacf54.b2518","order":22,"width":"3","height":"1","label":"EXIT","color":"","bgcolor":"","icon":"","payload":"EXIT","payloadType":"str","topic":"","x":102,"y":700,"wires":[["560c9098.8f17"]]},{"id":"56972812.3b8048","type":"ui_button","z":"ee19f49b.64ec08","name":"CH+","group":"c6dacf54.b2518","order":21,"width":"3","height":"1","label":"CH+","color":"","bgcolor":"","icon":"","payload":"CHANNELUP","payloadType":"str","topic":"","x":349,"y":656,"wires":[["560c9098.8f17"]]},{"id":"7ce843e2.bc419c","type":"ui_button","z":"ee19f49b.64ec08","name":"CH-","group":"c6dacf54.b2518","order":23,"width":"3","height":"1","label":"CH-","color":"","bgcolor":"","icon":"","payload":"CHANNELDOWN","payloadType":"str","topic":"","x":347,"y":700,"wires":[["560c9098.8f17"]]},{"id":"c6dacf54.b2518","type":"ui_group","z":"","name":"LG TV Remote","tab":"3e4d192e.aea486","disp":true,"width":"6"},{"id":"7ec37465.2c0f1c","type":"lgtv-config","z":"","host":"lgwebostv"},{"id":"3e4d192e.aea486","type":"ui_tab","z":"","name":"LG TV Remote","icon":"dashboard"}]
hobbyquaker

Flow Info

created 9 months ago

Node Types

Core
  • function (x6)
  • switch (x2)
Other

Tags

  • dashboard
  • remote
  • ui
  • lg
  • tv
  • webos
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option