Integration seems broken on HA 2022.8.0 json.decoder error on first start
At-M opened this issue · comments
David S. commented
Fresh install via HACS, using HA 2022.8.0
(since the install instructions were found all over the place, here's a short recap aswell)
After struggling with the get_token.py, smartcrypto (on windows dont bother with pycrypto, use pycryptodome), i finally seemed to get it running.
this were the things that should get it started:
pip install pycryptodome
python get_token.py --ip XXX.XXX.XXX.XXX --port 8080
i also implemented the fix for #48 ( #59 )
This fix is also done: #73
Now i'm getting this error and the integration is now loading, and i'm out of ideas
config.yaml:
# Samsung TV
media_player:
- platform: samsungtv_custom
host: XXX.XXX.XXX.XXX
port: 8001
mac: XX:XX:XX:XX:XX:XX
sourcelist: '{"TV": "KEY_TV", HDMI": "KEY_HDMI"}'
applist: "YouTube, Plex"
protocol: ctl_beta
token: !secret samsungtv.token
id: !secret samsungtv.id
error:
2022-08-15 20:23:35.178 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up samsungtv_custom platform for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/samsungtv_custom/media_player.py", line 108, in setup_platform
sourcelist = json.loads(config.get(CONF_SOURCELIST))
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 18 (char 17)
any idea what i can do here?