madmicio / lg-webos-remote-control Goto Github PK
View Code? Open in Web Editor NEWRemote Control for LG TV WebOS
Remote Control for LG TV WebOS
Please add an example how to add button background color when using default scheme.
I got get this error after fresh install
[Error] Unhandled Promise Rejection: https://[mysite]/hacsfiles/LG-WebOS-Remote-Control/lg-remote-control.js
(anonymous function)
rejectPromise
rejectPromiseWithFirstResolvingFunctionCallCheck
SyntaxError: bad method definition lg-remote-control.js:7:11
static disneyIcon = html`<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
Currently, the Sources list takes only an 'icon' property to go with the name. The icon can only be a recognised icon source (eg hass:, mdi:, etc).
It would be great if we could reference a url (eg '/local/path/tvfiles/netflix_alt.png') in the same way that channels have the 'image' property. This could either be done using the 'icon' property and some logic to handle the different content type, or by implementing an additional 'image' property for the sources list items.
There would need to be Readme guidance as to best icon sizing (64x64?).
This would be one way to resolve #62 and would provide a way for users to reference any logo, as well as implement alternate colour schemes by editing the original logos saved from web sites.
on the standard dark theme the white icons on white button does not work very well
can we have option to set all button colours
Received invalid webhook payload: required key not provided @ data[12]['state']. Got None
config:
sources:
- icon: 'mdi:netflix'
app: Netflix
- icon: 'mdi:amazon'
app: Amazon Prime Video
- icon: disney
app: Disney+
- icon: 'mdi:youtube'
app: YouTube
Hi. I have had this lovelace card working perfectly fine for months, until recently. Now i cannot change the sources - i have tried multiple browsers and through iOS app. The sources are visible and the list updates, but clicking on any source doesnt do nothing. For the sake of troubleshooting, i have tried running media_player.select_source service and it works perfectly fine, so the issue is with the card.
The problem started a few weeks ago, but i cannot exactly say when - if there was an update of Home Assistant or the card at that time.
Hello,
First of all, thank you for the great work, this is the best remote I've seen for HA.
I saw your recent change for the color of the powerbutton.
is is possible to change it like this
${stateObj.state === 'off' ? '' : 'style="color: red;"'}
so while using dark mode the button color will become white, black on darkgray is just hard to see.
Next to that, I took the liberty to clone your source and "rewire" the buttons so they work for the Ziggo media box.
https://github.com/bkbartk/Ziggo-Remote-Control
with kind regards
Bart
Is there any way to make Amazon Prime Video and Plex work? I tried to put the names between double quotes, but as soon as i save the quotes go away. Here's my sources entry. PS: Netflix and YouTube are working fine:
sources:
Hi there,
Would be possible to have the list of channels as showed in this screen?
https://raw.githubusercontent.com/madmicio/LG-WebOS-Remote-Control/master/example/channels.jpg
Thanks :)
Hello!
I want to fork your excellent project to support android TV but I don't know what the license is.
It would be great if you can add an license
entry in the repo since a project without a license isn't open source (see here and here ) and can't be legally modified.
Thanks a lot for maintaining such a wonderful project.
Hello and congratulations for the work done.
Is it possible to implement the card allowing you to use a single card for multiple televisions, inserting the possibility of selecting different televisions?
Hello,
Any chance of a guide button so we can easily open the TV channel guide?
Thanks.
Hi everyone, I've setup the LG TV WebOS Remote Control via HACS with all the components needed following the instructions provided and it works very well.
However, I have a problem with the channel selection button that started displaying an "undefined" header today.
I am on HA Core v0.115.6 and OS v4.13
I am using LG WebOS Remote Control, LG WebOS Keypad, LG WebOS channel pad and browser_mod all updated to the latest release.
This is my LG WebOS Remote config in lovelace:
channels:
- image: /local/lg_remote/tv_logo/Rai 1 HD.png
number: '501'
- image: /local/lg_remote/tv_logo/Rai 2 HD.png
number: '502'
- image: /local/lg_remote/tv_logo/Rai 3 HD.png
number: '503'
- image: /local/lg_remote/tv_logo/Rete4 HD.png
number: '504'
- image: /local/lg_remote/tv_logo/Canale5 HD.png
number: '505'
- image: /local/lg_remote/tv_logo/Italia1 HD.png
number: '506'
- image: /local/lg_remote/tv_logo/LA7 HD.png
number: '507'
- image: /local/lg_remote/tv_logo/rainews24.png
number: '48'
- image: /local/lg_remote/tv_logo/Sky TG24 HD.png
number: '50'
- image: /local/lg_remote/tv_logo/TGCOM24.png
number: '51'
- image: /local/lg_remote/tv_logo/DMAX.png
number: '52'
- image: /local/lg_remote/tv_logo/HGTV.png
number: '56'
- image: /local/lg_remote/tv_logo/MotorTrend.png
number: '59'
colors:
background: 'rgba(0, 0, 0, 0.5)'
border: grey
buttons: 'rgba(0, 0, 0, 0.85)'
texts: white
dimensions:
border_width: 3px
scale: 1
entity: media_player.lg_tv
sources:
- icon: 'mdi:netflix'
name: Netflix
- icon: 'mdi:amazon'
name: Amazon Prime Video
- icon: 'mdi:plex'
name: Plex
- icon: 'mdi:youtube-tv'
name: YouTube
- icon: 'mdi:sony-playstation'
name: PS4 Pro
- icon: 'mdi:spotify'
name: Spotify - Musica e podcast
- icon: 'mdi:google-chrome'
name: Browser Web
- icon: 'mdi:television-classic'
name: Canali TV
type: 'custom:lg-remote-control'
I've tested this on Chrome (PC) as well as on HA iOS App, Edge and Fully Kyosk Browser and I have the same issue.
The channel selection works fine, it just bother me that the "undefined" header is displayed.
Any suggestions on how to resolve this?
Thank-you
Hi,
i have installed a HACS, browser_mod and 3 plugin frontend ( LG WebOS keypad, Remote Control and channel pad )
I'm starting right now to integrate my LG TV, and ON OFF for example works, with remote template in lovelace.
But when I try to see channel list, i have this error, and popup doesn't appear.
Fallita chiamata a servizio browser_mod/popup . Service not found.
I don't understand why, in my configuration.yaml, there is browser_mod: null
I have also tried to browser_mod:, so without "null", but no luck for me.
I also see that some screenshot from you, are with others stuff from tv, so please, can you share your configuration ?
Seems that you have remote control, but also others buttons in lovelace.
Thanks anyway for the support
i have been able to get the channel number pad to open to show the numbers but for some reason when i click for example 1 it will do two 1s on the tv means that it changes to wrong channel is there any help for this.
Hi,
I need some help with LG-WebOS-Remote-Control.
I managed to install LG-WebOS-Remote-Control via HACS in my HA configured as follows:
version | 2021.1.0 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
virtualenv | false |
python_version | 3.8.7 |
os_name | Linux |
os_version | 5.4.79-v7 |
arch | armv7l |
timezone | Europe/Rome |
GitHub API | ok |
---|---|
Github API Calls Remaining | 4881 |
Installed Version | 1.9.0 |
Stage | running |
Available Repositories | 773 |
Installed Repositories | 4 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
host_os | Home Assistant OS 5.9 |
---|---|
update_channel | stable |
supervisor_version | 2020.12.7 |
docker_version | 19.03.13 |
disk_total | 28.6 GB |
disk_used | 3.8 GB |
healthy | true |
supported | true |
board | rpi3 |
supervisor_api | ok |
version_api | ok |
installed_addons | File editor (5.2.0), Duck DNS (1.12.4), Terminal & SSH (8.10.0), ESPHome (1.15.3) |
dashboards | 1 |
---|---|
mode | storage |
views | 6 |
resources | 2 |
During first installation of HA on my RaspberryPi 3B+ it automatically discovered my LG TV 43UM7000PLA and installed the LG HomeKit Controller named "LG webOS TV 9DAE" and the entity media_player.lg_webos_tv_9dae; with this entity I was already able to control only the video source of the TV.
After the installation of LG-WebOS-Remote-Control and of the other required add-ons (browser_mod and channel_pad), I was able to view the image of the enhanced remote control adding a custom card with the following code:
type: 'custom:lg-remote-control'
entity: media_player.lg_webos_tv_9dae
sources:
- name: Netflix
icon: 'mdi:netflix'
- name: Plex
icon: 'mdi:plex'
- name: YouTube Kids
icon: 'mdi:youtube'
- name: YouTube
icon: 'mdi:youtube-tv'
- name: Amazon Prime Video
icon: 'mdi:amazon'
- name: HDMI1
icon: 'mdi:video-input-hdmi'
- name: HDMI2
icon: 'mdi:video-input-hdmi'
- name: HDMI3
icon: 'mdi:video-input-hdmi'
channels:
- image: /local/config/www/community/channel-pad/tv_logo/channel_1.png
number: '1'
- image: /local/config/www/community/channel-pad/tv_logo/channel_2.png
number: '2'
dimensions:
scale: 0.8
border_width: 3px
colors:
buttons: var(--deactive-background-button-color)
texts: null
However the only working button on this remote control is the "source" one; pressing it a drop-down list with all alternative sources appears and they work correctly. Any other available button on the remote control image react but nothing happens on the TV and for some of them an error "Failed to call service webostv/command. Service not found" is displayed on the bottom left corner of the browser window.
If I press the individual "sources" keys the displayed error is "Failed to call service media_player/select_source. Could not find source Youtube (or Plex or Amazon Prime Video, etc.).
Please, can someone address me on how to solve this problem?
Hi!
First, many thanks, its a nice plugin for HA, looks so pro and works as charm.
I was playing around with a tasmotized tuya ir remote and was thinking if this could be integrated. Im not familiar with this programming language, but i think i can do it if you guide me a little.
I have all the codes for a LG TV from here: https://gitlab.com/snippets/1690600 and all i have to do is to send via mqtt the correct code.
My first approach could be defining input_booleans for a whole country, but thinking about your remote that work surely could be worth it.
How could I do it?
Hello,
I'm facing challenges with the lg-remote-control script on HA 2021.1.4 (I've installed it through the IOTStack project)
I'm getting the following error:
Basically I've placed the lg-remote-control.js script inside the following folder:
/usr/share/hassio/homeassistant/config/www/
and then added it into the Lovelace resources as
/local/lg-remote-control.js
Please note that I followed the same approach for another js custom components and it working fine.
Can someone help me?
Thanks
Hi, I just define my sources with icons, it's ok for the buttons with icons but when I tap the source to get items listed, I have just one item : Live TV. Sources text not respect the color that I define in colors: too.
in the instructions it says to install using HACS but when i go to HACS it doesnt appear also do i need to add it as a new repository.
is the browser_mod required and channel-pad required and do i have to use a repository for them if they do can you add to comment a link for that so i can add it to my HACS
many thanks
ghost
Here in Brazil, we have DTV (digital tv) and it has some channels in one channel number as you can see on the image below
I would like to know how I need to write the channel number on the configuration.
And another problem, after I click on the Channel Logo, appeared an error: "Failed to call the service media_player/play_media.'NoneType' object is not iterable". You can see the screenshot below
I noticed that if you use the default name for the custom disney icon, namely:
Is it possible to add some scaling capabilities? Currently the remote is bigger than the size of the phone and it will be great if some scaling can be done or there will be smaller version available.
Great work BTW!!!
Pushing the power on button does not turn on the tv.
Instead I get the following errors:
on the interface
Failed to call service media_player/toggle. extra keys not allowed @ data['message']
in developer -> logs
Log Details (ERROR)
Logger: homeassistant.helpers.script
Source: helpers/script.py:802
First occurred: 10:08:00 AM (1 occurrences)
Last logged: 10:08:00 AM
Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['message']
and
Log Details (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.2870756496
Source: core.py:1210
Integration: websocket_api (documentation, issues)
First occurred: 10:08:00 AM (1 occurrences)
Last logged: 10:08:00 AM
extra keys not allowed @ data['message']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1232, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1255, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 412, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 600, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 443, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 708, in async_toggle
await self.async_turn_on()
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 308, in async_turn_on
await self._on_script.async_run()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 802, in async_run
await run.async_run()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 523, in async_run
await self._async_run()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 540, in _async_run
await self._async_step(log_exceptions=not propagate_exceptions)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 154, in _async_step
self, f"_async_{cv.determine_script_action(self._action)}_step"
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_call_service_step
*self._prep_call_service_step(), blocking=True, context=self._context
File "/usr/src/homeassistant/homeassistant/core.py", line 1210, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['message']
Running on a Raspbian + "HOME ASSISTANT SUPERVISED"
I would like to set a custom icon for a source (Rakuten TV). There is no mdi version. Including a local png similar to the channels doesn't work.
with latest version of HA (2021.2.3 but is possibile release before too) Channel Pad with TV logo don't appear anymore
I use HA core in venv 201.2.3 on RPi 3b
Before this, all work fine
Alle other function works fine, only channel pad don't appear
Tried to reinstall card-channel-pad but nothing change
Tried with 5 different browser, cleared cache too, but nothing change
what can i check?
Thanks
Is it possible/has anyone implemented the 3D toggle button of the magic remote? It would be really helpful!
Readme section for manual installation mentions adding lines to config file, which now is deprecated and confgi panel for dashboard resources should be used.
Using new way of configuration I can make it work.
/home/homeassistant/.homeassistant/
custom_components
folder under config dir./home/homeassistant/.homeassistant/custom_components
folder looks like:drwxr-xr-x 3 homeassistant homeassistant 4096 Dec 27 17:59 .
drwxr-xr-x 8 homeassistant homeassistant 4096 Dec 27 18:02 ..
drwxrwxrwx 3 homeassistant homeassistant 4096 Dec 27 17:58 browser_mod
-rwxrwxrwx 1 homeassistant homeassistant 3504 Dec 27 17:59 card-channel-pad.js
-rwxrwxrwx 1 homeassistant homeassistant 54873 Dec 27 17:58 lg-remote-control.js
I've created a resource in dashboard resources configs as such:
URL: /local/custom_components/lg-remote-control.js
type: Javascript module
But I'm unable to find component in "Add card" dashboard func.
Not sure how is on other LG-TVs. But my TV starts to respond after few seconds after I press ON.
I was wondering if there is a way to show on HA-remote that the status of the TV changed from OFF to ON and backward?
For it might be a change of color on ON-OFF icon.
Or background or border, whatever.
the new version does not appear on the ios app,
on the version on the pc everything ok, instead on the ios app says:
Custom element doesn't exist: lg-remote-control.
entity: media_player.tv_lg
type: 'custom: lg-remote-control'
please update and include the now tv icon also when i click the button left of the power button for channels it loads but is blank how can i fix this i have the issue and believe that it might be because i run home assistant os then core you say you need image: /local/lg_remote/tv_logo/file.png but mine are located in /config/www/images/tv_logo i have tried changing the path but still nothing appears can you give any help
Hi,
i'm trying to install this component in my HA,
i've installed manually browser mod (i could not find it in HACS), added browser_mod: in the configuration.yaml file
then i installed channel pad (from HACS frontend)
installed lg remote control (from HACS frontend)
restart HA (there were already url in lovelace resource)
create a new card in the home page
- type: 'custom:lg-remote-control'
entity: media_player.lg_salotto
but i still get this:
No card type found
- type: 'custom:lg-remote-control'
entity: media_player.lg_salotto
any ideas??
thanks
In addition to scaling, it will be nice to have the option to control which buttons will be shown / hide.
The reason is that to have all buttons on one mobile screen, scaling make all buttons small, while on the other hand, not all buttons are being used.
Adding the option to control which buttons will be shown or hide can reduce the scaling factor which will make buttons in reasonable size on mobile devices.
It is also oj if you can start with group of buttons, e.g., all the play / stop /pause buttons (in the bottom of the remote)
I do not use the LG TV speakers but instead an LG soundbar and on occasion a yamaha amplifier and both speakers are available as objects in home assistant. Ideally, I would be able to use the volume button to control the soundbar volume from the remote, as I can with the LG remote.
Thanks a lot for the solution but you might update your example code here
**channels:
- image: /local/images/tv_logo/channel_1.png
number: '1'
- image: /local/images/tv_logo/channel_2.png
number: '1'**
the second line of number should be
number: '2'
i have installed the LG webos remote control + channel pad + browser mode
and the remote is working fine except the channel pad
i have added the channels part in my lovelace card as shown below but nothing happens when i press the channel pad icon
thank you
card:
type: vertical-stack
cards:
- type: custom:lg-remote-control
entity: media_player.lg_tv
colors:
texts: black
background: grey
border: black
dimensions:
scale: 0.9
border_width: 0px
sources:
- icon: mdi:netflix
name: Netflix
- icon: mdi:youtube
name: YouTube
- icon: mdi:television-classic
name: Live TV
- icon: mdi:image-multiple-outline
name: Photo & Video
channels:
- image: /local/lg/IMG_0820.png
number: '501'
- image: /local/www/lg/IMG_0821.png
number: '328'
Hi,
Thanks you for your hard work! i have managed to get it working PERFECT on the desktop but when i go to view on my iphone it says custom element does not exist.
Any ideas? Very weird it works on desktop but not on ios devices i have also tried on my ipad same issue.
I can select Netflix and Amazon Prime Video but not Disney +( I don’t have Dzne )
The issue is in line 73:
e => this._netfli(stateObj)
instead of
e => this._netflix(stateObj)
Please how i can change the color of source button for netflix to be red, knowing that i use the following in lovelace ui:
sources:
- icon: mdi:netflix
name: Netflix
where it is only appearing in black color that i cannot change to red, so how i can manage to do so also for yourtube source icon the same issue.
Thank you
Great work however the power button doesn't work for me as it doesn't register commands till the tv is on.
If I could remap the power button I could get Harmony to turn the TV on. Is this going to be an option in the future?
Hi, when I try to turn off the TV, it does nothing - TV is still running.
All other buttons are working, there is a problem with power off button only. I have webOS gen 1 (47LB650V from 2014).
Can you help me, please? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.