PiotrMachowski / Home-Assistant-custom-components-SmartThings-Soundbar

Samsung Smarthings API for controlling Soundbar
MIT License
89 stars 23 forks source link

No function to select source in Samsung Soundbar MS650 #7

Open Nathy76 opened 3 years ago

Nathy76 commented 3 years ago

Until a few days ago everything worked fine. Thank you for the great integration. Unfortunately, the "select source" function has now been lost. It is also not possible to choose the source with a service.

IMG_9439

image

Logger: homeassistant.helpers.entity
Source: custom_components/smartthings_soundbar/api.py:43
First occurred: 23:25:18 (127 occurrences)
Last logged: 23:49:24
Update for media_player.soundbar fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthings_soundbar/media_player.py", line 76, in update
    SoundbarApi.device_update(self)
  File "/config/custom_components/smartthings_soundbar/api.py", line 43, in device_update
    device_source = data['main']['inputSource']['value']
KeyError: 'inputSource'
aherbjornsen commented 3 years ago

This looks exactly like the problem I reported a bit earlier: https://github.com/PiotrMachowski/Home-Assistant-custom-components-SmartThings-Soundbar/issues/6

If it used to work, and stopped working recently, could this be a result of the recent security changes that was implemented in regards to custom components?

PiotrMachowski commented 3 years ago

I will close this issue as a duplicate of #6.

No, it seems to be a change in SmartThings API

PiotrMachowski commented 3 years ago

I have inspected data sent by @am1ter and it seems that MS650 is now missing mediaInputSource capability. You can try removing your device from SmartThings and adding it again.

Expected capabilities:

['ocf', 'execute', 'refresh', 'switch', 'audioVolume', 'audioMute', 'audioTrackData', 'mediaInputSource', 'mediaPlayback', 'audioNotification', 'samsungvd.groupInfo']

Actual capabilities:

['ocf', 'execute', 'refresh', 'switch', 'audioVolume', 'audioMute', 'mediaPlayback', 'audioNotification']
am1ter commented 3 years ago

@PiotrMachowski thank you for analyze. I tried to remove and add soundbar to SmartThings but it didn't help. Such functions as turnon/turnoff, mute, source selection don't work.

Looking at all MS650 users should wait update of smart things api. So I found another custom component based on samsung multiroom technology, forked it and made some fixes for my soundbar.

PiotrMachowski commented 3 years ago

@am1ter you can also try to combine different media_player entities using universal media player

filikun commented 2 years ago

Any change on this soundbar?