Home-Assistant-custom-components-SmartThings-Soundbar
Home-Assistant-custom-components-SmartThings-Soundbar copied to clipboard
Samsung n950
Hi, thank You for great HA integration. I cant fully / properly use it. I think I dont properly installed it. I have HA installed as a Docker image on Synology nas 920+
Ive use HACS. Add repository, add integration and restart HA.
I didnt have anycard on Lovelace. Ive manually put into "configuration.yaml" following snippets replacing proper Api key and device id.
media_player:
- platform: smartthings_soundbar
name: Soundbar
api_key: "YOUR API KEY"
device_id: "YOUR DEVICE ID"
max_volume: 30
I see a card in lovelace but it dont controll anything on soundbar. Pve put some wifi music on it and I cant even turn off speaker.
2021-05-10 19:17:06 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.soundbar fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, 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 38, in device_update
data = resp.json()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
So finally
- do I need to put config manually or theres a place in Your code?
- where to look for clues why its not working?
Hi,
your configuration is put in a correct place.
This problem occurs when device id is invalid, can you check if it is configured correctly?
Thank You for answer. Ive doublecheck - Device ID is correct. As for API key - Ive created one on this page: https://account.smartthings.com/tokens#
Ive set token to have almost all permissions (no "installed app" permission) but still it doesnt work.
I have homeassistant installed in my local network NAS (Synology) - maybe this is culprit of issues?
Errors are the same.