home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Telldus Live does not work in 0.57 #10326

Closed ScuttleSE closed 6 years ago

ScuttleSE commented 6 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.57.0

Python release (python3 --version): Python 3.5.3

Component/platform: Telldus Live

Description of problem: Telldus Live component throws an error when HA starts up

Expected: Telldus Live should work...

Problem-relevant configuration.yaml entries and steps to reproduce:

tellduslive:
  public_key: XXX
  private_key: YYY
  token: ZZZ
  token_secret: QQQ

2017-11-04 08:59:00 ERROR (MainThread) [homeassistant.setup] Error during setup of component tellduslive
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/setup.py", line 194, in _async_setup_component
    component.setup, hass, processed_config)
  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 "/usr/local/lib/python3.5/dist-packages/homeassistant/components/tellduslive.py", line 51, in setup
    client = TelldusLiveClient(hass, config)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/tellduslive.py", line 72, in __init__
    from tellduslive import Client
  File "/home/hass/.homeassistant/deps/lib/python3.5/site-packages/tellduslive.py", line 10, in <module>
    from requests_oauthlib import OAuth1
  File "/home/hass/.homeassistant/deps/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module>
    if requests.__version__ < '2.0.0':
TypeError: unorderable types: module() < str()

Traceback (if applicable):

Additional info:

Cnordbo commented 6 years ago

Install Requests version 2.14.2: pip3 install requests==2.14.2

Install Requests_oauthlib version 0.8.0 pip3 install requests_oauthlib==0.8.0

Then the command printed out the versions - But this did not help with the setup.

Still says:

Error during setup of component tellduslive
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  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/tellduslive.py", line 71, in setup
    from tellduslive import Session, supports_local_api
  File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 9, in <module>
    from requests_oauthlib import OAuth1Session
  File "/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module>
    if requests.__version__ < '2.0.0':
TypeError: unorderable types: module() < str()
leifmariposa commented 6 years ago

Could it be that you must switch to the virtual Python environment first? sudo su -s /bin/bash homeassistant source /srv/homeassistant/bin/activate and then run: pip3 install requests==2.14.2

I think this is how I got it to work.

BR Leif Persson

mcfrojd commented 6 years ago

Could it be that you must switch to the virtual Python environment first? @leifmariposa Omg, cant belive i forgot that... Now tellduslive is up and running for me on my hassbian install.

Cnordbo commented 6 years ago

That worked for me as well! Thanks @leifmariposa !

JojjeErvalla commented 6 years ago

Works perfect now =)

juan11perez commented 6 years ago

This problem persists in 0.60. @mcfrojd solution still works.

Konstigt commented 6 years ago

Upgraded from 0.59.2 to 0.60 and got this problem. Had to install requests 2.14.2 to get it working again.

Rawet commented 6 years ago

Hi.

This problem still exist, but @mcfrojd fix works just fine.

I would like to add they changed how HASS connects to Tellduslive. The old way was by adding the API keys directly into HASS config like: tellduslive: public_key: XXX private_key: YYY token: ZZZ token_secret: QQQ

From 0.58 you dont need the keys, you get promted with this after adding only tellduslive: tellduslive

You can read more here: https://home-assistant.io/components/tellduslive/