Home-Assistant-custom-components-SmartThings-Soundbar icon indicating copy to clipboard operation
Home-Assistant-custom-components-SmartThings-Soundbar copied to clipboard

No function to select source in Samsung Soundbar MS650

Open Nathy76 opened this issue 4 years ago • 6 comments

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'

Nathy76 avatar Jan 20 '21 22:01 Nathy76

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?

aherbjornsen avatar Jan 21 '21 08:01 aherbjornsen

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

No, it seems to be a change in SmartThings API

PiotrMachowski avatar Jan 21 '21 08:01 PiotrMachowski

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']

PiotrMachowski avatar Jan 28 '21 00:01 PiotrMachowski

@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.

am1ter avatar Jan 29 '21 15:01 am1ter

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

PiotrMachowski avatar Jan 29 '21 15:01 PiotrMachowski

Any change on this soundbar?

filikun avatar Oct 27 '22 15:10 filikun