Closed darootler closed 3 years ago
Please use the issue template.
Done.
Regards Richard
I will give a try to support static config but as i have no LG Soundbar i'll need you to test the new version as custom component for example. And btw how much soundbars do you have ? Only 1 ?
Yes, i will test a new custom version. I have one LG SK6F soundbar.
Regards
Can you please try this as custom component : https://github.com/SNoof85/home-assistant/tree/dev/homeassistant/components/lg_soundbar
Add config into your configuration.yaml
media_player:
- platform: lg_soundbar
host: <ip of the soundbar>
port: <port to use>
Hope i did it correct (i'm not an expert !). Would be nice also if you could try it with discovery first (with soundbar on same net that your HA instance), then with fixed config (soundbar different network if you want to) and report. Thx
PS : you need to place all 3 files into
I already tried a similar solution like yours. It seems like "add_entities" needs some information from discovery, but i am not an expert too :-)
I does not work and i think you need an "else" after "if discovery_info:". No error logs and no entity added.
Regards Richard
There was missing import 🗡 Try again ? :)
2019-05-10 23:54:24 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform lg_soundbar
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/lg_soundbar/media_player.py", line 38, in setup_platform
add_entities([LGDevice(hass, host, port)], True)
TypeError: __init__() takes 3 positional arguments but 4 were given
Sorry again a stupid mistake. Fixed.
It's adding a media player, but you cannot change the source:
Also changing the sound mode is very buggy. And changing the volume is also not possible.
Regards
ok, so it's either a bug with the test component or the original was also buggy. Did you managed to make the original component working with discovery ? and if yes was it also buggy ?
On my side if i just configure a lg soundbar within my config with the IP of my TV i have the same than yours but...it's a TV not an LG soundbar. It's a bit hard for me to test.
Could you try to set your soundbar in the same subnet that home assistant and test the custom component ? If it works, we would then exclude any network communication bug.
Yes, the original component is working with the exception that "Optical/HDMI ARC" is not shown in the gui if selected:
Volume, source and sound mode is changeable.
The soundbar is on the same subnet as HA because the original component is not working if the soundbar is on different subnet.
As i said i think "add_entities" is expecting a discovery object, mine looks like this:
{'host': '192.168.6.3', 'port': 9741, 'hostname': 'Chromecast.local.', 'properties': {'PROTO_VER': '1.0', 'UUID': 'de85605e-68f4-4e83-9b28-474ee7315596'}
Regards Richard
Yes we have to find these missing properties as i just pass host and port in the new version component. Thx for the detailed report of the discovery info object. Will try to get a look at this.
The temescal lib is only waiting for host and port. Wich are passed to the class LGDevice in the component (stable and tested one).
Don't want to doubt on your knowledge but what did you wrote in your config ? It should be this :
media_player:
- platform: lg_soundbar
host: 192.168.6.3
port: 9741
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
@SNoof85
Any progress?
Regards Richard
Hey, sorry no, have no time yet to try it again. Also, i don't have this hardware at home and it's hard to find out without. On top of this I'm afraid that I've reached my maximum level at home assistant/python dev. I'm sorry but i won't be able to help more on this. If someone here is using an LG soundbar and with better knowledge than me can help it would be nice.
same problem that got worse after updating my SK10Y soundbar
I think the problem is in the code that the component uses https://github.com/google/python-temescal broken by the latest updates LG(?)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Not working yet.
Regards Richard
Also not working with LG SL9YG
Also not working with LG SL8YG soundbar
Also not working with LG SK10Y
I have tested this PR https://github.com/home-assistant/core/pull/31617 as custom_components and it seems to work properly on my soundbar LG SK10Y Thanks @mattchrist @MartinHjelmare
I have tested the PR #31617 with a LG SK6F soundbar too. I am getting a working media_player entity:
What i am missing is the option to turn it on or off. As an addition it would be nice to store this entity permanent. And if the source is changed to "Optical/HDMI ARC" the source changes to "Optical" and the GUI does not show the source anymore.
Thanks @mattchrist @MartinHjelmare for the work so far.
Regards Richard
How do i test it as a custom component? Right now i have added LG_smart_device to my ignore list.
How do i test it as a custom component? Right now i have added LG_smart_device to my ignore list.
Download this git clone, extract the contents. Navigate to \homeassistant\components and copy the folder "lg_soundbar" to your HA "custom_components" folder, configure the lg_soundbar like mentioned here and restart HA.
Regards Richard
There is also a problem with this integration and the standby option with the soundbar. Since this integration polls the soundbar permanently, it turns on instantly after the soundbar enters standby mode. Maybe this can be fixed in a combination with an on/off feature.
For me this is not useable at the moment.
Regards Richard
Any chance to get the integration working without discovery?
Regards Richard
I think it works without discovery
discovery:
ignore:
- lg_smart_device
media_player:
- platform: lg_soundbar
host: 192.168.7.118
port: 9741
these are the problems found:
I think it works without discovery
discovery: ignore: - lg_smart_device media_player: - platform: lg_soundbar host: 192.168.7.118 port: 9741
these are the problems found:
- soundbar turns on instantly after the soundbar enters standby mode
- if the soundbar is completely turned off, the connection is lost until the reboot of home-assistant
I also encountered the problem with the soundbar turning on with this configuration... So that's not an option i guess.
Regards Richard
Can confirm, even with just discovery enabled, the soundbar will turn off, then immediately turn back on again. SL10YG here.
I had to disable lg_soundbar due to heating problems. It was keeping the device always on.
Hi guys, any news about this issue?
No news from me. I have kinda accepted that it does not work. I have created a remote in HA that controls a Broadlink Mini that in turn controls the soundbar. Still annoying that the soundbar turns on immediately after you turn it off tho.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Issue still persists.
Regards
I think it works without discovery
discovery: ignore: - lg_smart_device media_player: - platform: lg_soundbar host: 192.168.7.118 port: 9741
these are the problems found:
- soundbar turns on instantly after the soundbar enters standby mode
- if the soundbar is completely turned off, the connection is lost until the reboot of home-assistant
I also encountered the problem with the soundbar turning on with this configuration... So that's not an option i guess.
Regards Richard
SAme problem here with sn9yg soundbar I have doubts as to whether this will ever work.
Is there a possibility to turn off the soundbar via wifi/network? I'm beginning to think not....
In fact, the official soundbar app doesn't have the option, and besides, it has the same problem as us, as soon as you open the app the soundbar turns on :-(
On the other hand, for my soundbar model, I had to edit the lg_soundbar component, with the temescal library, because it doesn't support all the modes of my soundbar: https://github.com/google/python-temescal/issues/9
Translated with www.DeepL.com/Translator (free version)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Home Assistant release with the issue: hassos: "2.11" homeassistant: 0.92.2 machine: raspberrypi3 supervisor: "162"
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io
Component/platform: lg_soundbar
Description of problem: I am using a LG SK6F soundbar. Hassio and the soundbar are both on different subnets. This is for security reasons.
It would be nice if there would be an option to configure the soundbar manually with ip/port without having discovery enabled.