8000 Error from Telldus live component · Issue #8747 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error from Telldus live component #8747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Nicxe opened this issue Jul 31, 2017 · 7 comments
Closed

Error from Telldus live component #8747

Nicxe opened this issue Jul 31, 2017 · 7 comments

Comments

@Nicxe
Copy link
Nicxe commented Jul 31, 2017

**Home Assistant release: 0.50.1

**Python release: Python 3.4.2

**Component/platform: Telldus Live

**Description of problem:

Error from Telldus Live component in log. The component is not as reliable as it as previous this errors showed up.

2017-07-31 11:34:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/__init__.py", line 116, in async_handle_switch_service
    yield from switch.async_turn_off()
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/tellduslive.py", line 40, in turn_off
    self.device.turn_off()
  File "/srv/homeassistant/lib/python3.4/site-packages/tellduslive.py", line 273, in turn_off
    return self._execute(TURNOFF)
  File "/srv/homeassistant/lib/python3.4/site-packages/tellduslive.py", line 231, in _execute
    self.device['state'] = command
TypeError: 'NoneType' object does not support item assignment
2017-07-31 11:35:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/__init__.py", line 281, in async_handle_light_service
    yield from light.async_turn_off(**params)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/tellduslive.py", line 61, in turn_off
    self.device.turn_off()
  File "/srv/homeassistant/lib/python3.4/site-packages/tellduslive.py", line 273, in turn_off
    return self._execute(TURNOFF)
  File "/srv/homeassistant/lib/python3.4/site-packages/tellduslive.py", line 231, in _execute
    self.device['state'] = command
TypeError: 'NoneType' object does not support item assignment
@Nicxe
Copy link
Author
Nicxe commented Aug 3, 2017

This relly affect the use of Telldus live for me, the Telldus is not responding to to commands from HASS. Do you know what possible can trigger this errors @molobrakos ?

@molobrakos
Copy link
Contributor
molobrakos commented Aug 4, 2017

No changes has been made to the Tellduslive component (as far as I know) so I asume this error is because of some change within Hass core. (maybe because the component is not rewritten to being async yet?)

@molobrakos
Copy link
Contributor

Can you please turn on logging for the tellduslive component as well as for the tellduslive library?
In configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.tellduslive: debug
    homeassistant.components.*.tellduslive: debug
    tellduslive: debug

@Nicxe
Copy link
Author
Nicxe commented Aug 7, 2017

I have terminated my Telldus due to all the latest issues so I can't test this. Maby @pappajohan can help, I know he have the same issue

@molobrakos
Copy link
Contributor

Closing this for now, @pappajohan, please reopen this bug if you are able to reproduce it and are willing to help out testing/debugging it (since I can not reproduce it myself).

@pappajohan
Copy link

Thanks!
Well, I have since updated hassbian to 1.31 and moved most of my z-wave devices to a razberry card. I do however see the same errors.

I have no clue on what to attach but below are a few lines. Please advice what I can do further.

Kind regards,
/Johan

2017-10-19 23:59:38 DEBUG (Thread-6) [tellduslive] Request https://api.telldus.com/json/device/turnOff {'id': '1632847'}
2017-10-19 23:59:39 DEBUG (Thread-6) [tellduslive] Response 200 {'status': 'success'}
2017-10-19 23:59:39 DEBUG (Thread-4) [tellduslive] Request https://api.telldus.com/json/device/turnOff {'id': '1632008'}
2017-10-19 23:59:39 DEBUG (Thread-3) [homeassistant.components.tellduslive] Updating
2017-10-19 23:59:39 DEBUG (Thread-3) [tellduslive] Request https://api.telldus.com/json/devices/list {'supportedMethods': 915, 'includeIgnored': 0}
2017-10-19 23:59:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state zwave.hall=Associations; node_id=3, new_entity_id=zwave.hall, friendly_name=Hall, max_baud_rate=40000, old_entity_id=zwave.hall_3, is_failed=False, receivedTS=2017-10-19 23:59:27:521 , lastRequestRTT=119, is_info_received=True, receivedDups=1, lastResponseRTT=195, sentCnt=12, node_name=Hall, manufacturer_name=FIBARO System, receivedUnsolicited=1, product_name=FGD212 Dimmer 2, sentFailed=0, is_zwave_plus=True, capabilities={'listening', 'beaming', 'routing'}, averageResponseRTT=193, retries=0, query_stage=Associations, receivedCnt=9, is_awake=True, averageRequestRTT=115, is_ready=False, sentTS=2017-10-19 23:59:27:325 @ 2017-10-19T23:59:35.325949+02:00>, entity_id=zwave.hall, new_state=<state zwave.hall=Associations; node_id=3, new_entity_id=zwave.hall, friendly_name=Hall, max_baud_rate=40000, old_entity_id=zwave.hall_3, is_failed=False, receivedTS=2017-10-19 23:59:39:732 , lastRequestRTT=71, is_info_received=True, receivedDups=1, lastResponseRTT=145, sentCnt=14, node_name=Hall, manufacturer_name=FIBARO System, receivedUnsolicited=1, product_name=FGD212 Dimmer 2, sentFailed=0, is_zwave_plus=True, capabilities={'listening', 'beaming', 'routing'}, averageResponseRTT=169, retries=0, query_stage=Associations, receivedCnt=10, is_awake=True, averageRequestRTT=85, is_ready=False, sentTS=2017-10-19 23:59:39:587 @ 2017-10-19T23:59:35.325949+02:00>>
2017-10-19 23:59:40 DEBUG (Thread-4) [tellduslive] Response 200 {'status': 'success'}
2017-10-19 23:59:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
yield from service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/init.py", line 116, in async_handle_switch_service
yield from switch.async_turn_off()
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/tellduslive.py", line 40, in turn_off
self.device.turn_off()
File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 273, in turn_off
return self._execute(TURNOFF)
File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 231, in _execute
self.device['state'] = command
TypeError: 'NoneType' object does not support item assignment

@molobrakos
Copy link
Contributor

I believe I have found the reason for this bug. I wasn't aware of the fact that HA expected the library to be thread safe. I have now protected the internal state by a lock and I hope it will be included in the next release of HA.

@home-assistant home-assistant locked and limited conversation to collaborators Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0