GithubHelp home page GithubHelp logo

ha-samsungtv-qled's People

Contributors

giefca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-samsungtv-qled's Issues

Key error visible

Unfortunately I have the same Key error problem like the user Gamelauncher ;(
I have a Samsung Q70R

Error doing job: Task exception was never retrieved

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 408, in _async_add_entity
await entity.async_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 796, in state_attributes
for attr in ATTR_TO_PROPERTY
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 797, in
if getattr(self, attr) is not None
File "/config/custom_components/samsungtv_qled/media_player.py", line 305, in source
if self._application.current_app() is None:
File "/config/custom_components/samsungtv_qled/samsungctl/application.py", line 52, in current_app
if (self.is_visible(app) is True):
File "/config/custom_components/samsungtv_qled/samsungctl/application.py", line 38, in is_visible
return app_state['visible']
KeyError: 'visible'

under api/v2/applications/11101200001 the following came out

id "11101200001"
name "Netflix"
running true
version "9.0.0"
visible true

Application ID "NPO Start"

I have a Samsung QE55Q9FNALXXN and am searching for the APPS id for the "NPO Start" app.
Is there a way to find this?

Home Assistant Support 2021.6 version requirements

Hello
It seems like your manifest doesn't conform to Home Assistant's new requirements:

2021-04-21 19:11:54 WARNING (MainThread) [homeassistant.loader] You are using a custom integration samsungtv_qled which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-21 19:11:54 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'samsungtv_qled'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'samsungtv_qled'

Key error visable

Hi, when trying to load the component I get the below error ...

media_player:

  • platform: samsungtv_qled
    name: "Living TV"
    host: 192.168.1.40
    port: 8002
    timeout: 30
    applist: "Plex, Netflix"
Oct 17 19:36:55 hassbian hass[15548]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 273, in async_update_ha_state
Oct 17 19:36:55 hassbian hass[15548]:     self._async_write_ha_state()
Oct 17 19:36:55 hassbian hass[15548]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 314, in _async_write_ha_state
Oct 17 19:36:55 hassbian hass[15548]:     attr.update(self.state_attributes or {})
Oct 17 19:36:55 hassbian hass[15548]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 832, in state_attributes
Oct 17 19:36:55 hassbian hass[15548]:     for attr in ATTR_TO_PROPERTY
Oct 17 19:36:55 hassbian hass[15548]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 833, in <dictcomp>
Oct 17 19:36:55 hassbian hass[15548]:     if getattr(self, attr) is not None
Oct 17 19:36:55 hassbian hass[15548]:   File "/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/media_player.py", line 305, in source
Oct 17 19:36:55 hassbian hass[15548]:     if self._application.current_app() is None:
Oct 17 19:36:55 hassbian hass[15548]:   File "/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/samsungctl/application.py", line 68, in current_app
Oct 17 19:36:55 hassbian hass[15548]:     if (self.is_visible(app) is True):
Oct 17 19:36:55 hassbian hass[15548]:   File "/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/samsungctl/application.py", line 54, in is_visible
Oct 17 19:36:55 hassbian hass[15548]:     return app_state['visible']
Oct 17 19:36:55 hassbian hass[15548]: KeyError: 'visible'

send_key does not work. Also HA ask to don’t use IO inside main thread

media_player.play_media

entity_id: media_player.samsung_tv
"media_content_type": "send_key"
"media_content_id": "KEY_POWEROFF"
2020-10-31 00:42:08 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_qled doing I/O at custom_components/samsungtv_qled/samsungtvctl/samsungtvupnp.py, line 55: r = requests.get('http://{host}:8001/api/v2/applications/{value}'.format(host=self.host, value=self._app_list[app]), timeout=0.5)
2020-10-31 00:42:08 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_qled doing I/O at custom_components/samsungtv_qled/samsungtvctl/samsungtvupnp.py, line 55: r = requests.get('http://{host}:8001/api/v2/applications/{value}'.format(host=self.host, value=self._app_list[app]), timeout=0.5)
2020-10-31 00:42:08 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.samsung_tv 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 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/samsungtv_qled/media_player.py", line 282, in update
    self._ping_device()
  File "/config/custom_components/samsungtv_qled/media_player.py", line 254, in _ping_device
    self._smarttv.device_update()
  File "/config/custom_components/samsungtv_qled/samsungtvctl/smartthings.py", line 51, in device_update
    data = resp.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 898, 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)
2020-10-31 00:42:10 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 592, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 809, in state_attributes
    value = getattr(self, attr)
  File "/usr/src/homeassistant/homeassistant/components/squeezebox/media_player.py", line 360, in media_duration
    return self._player.duration
  File "/usr/local/lib/python3.8/site-packages/pysqueezebox/player.py", line 105, in duration
    if self.current_track and "duration" in self.current_track:
  File "/usr/local/lib/python3.8/site-packages/pysqueezebox/player.py", line 165, in current_track
    return self._status["playlist_loop"][self.current_index]
TypeError: 'NoneType' object is not subscriptable
2020-10-31 00:42:10 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.samsung_tv 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 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/samsungtv_qled/media_player.py", line 282, in update
    self._ping_device()
  File "/config/custom_components/samsungtv_qled/media_player.py", line 254, in _ping_device
    self._smarttv.device_update()
  File "/config/custom_components/samsungtv_qled/samsungtvctl/smartthings.py", line 51, in device_update
    data = resp.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 898, 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)
2020-10-31 00:42:18 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.samsung_tv 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 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/samsungtv_qled/media_player.py", line 282, in update
    self._ping_device()
  File "/config/custom_components/samsungtv_qled/media_player.py", line 254, in _ping_device
    self._smarttv.device_update()
  File "/config/custom_components/samsungtv_qled/samsungtvctl/smartthings.py", line 51, in device_update
    data = resp.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 898, 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.