Skip to content
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

Telldus Live does not work in 0.57 #10326

Closed
ScuttleSE opened this issue Nov 4, 2017 · 58 comments
Closed

Telldus Live does not work in 0.57 #10326

ScuttleSE opened this issue Nov 4, 2017 · 58 comments

Comments

@ScuttleSE
Copy link

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:

@pappajohan
Copy link

pappajohan commented Nov 4, 2017

Hi!

Similar or same issue. Always had errors due to tellduslive, but now only some of my stuff works. Motion sensors, z-wave, do but switches, 433 and z-wave, do not.

Regards,
Johan

2017-11-04 15:13:19 ERROR (MainThread) [homeassistant.setup] Error during setup of component tellduslive
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 51, in setup
    client = TelldusLiveClient(hass, config)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 72, in __init__
    from tellduslive import Client
  File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 10, in <module>
    from requests_oauthlib import OAuth1
  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()

@pappajohan
Copy link

No, sorry, my sensors don't work either. I just see them in the frontend since they're customized...

@pappajohan
Copy link

pappajohan commented Nov 4, 2017

Returned to .56.2, everything back to normal including old errors.

2017-11-04 15:48:27 WARNING (Thread-6) [homeassistant.components.tellduslive] Unidentified device type (methods: 0)
2017-11-04 15:48:27 WARNING (Thread-6) [homeassistant.components.tellduslive] Unidentified device type (methods: 0)
2017-11-04 15:48:27 WARNING (Thread-6) [homeassistant.components.tellduslive] Unidentified device type (methods: 0)

@molobrakos
Copy link
Contributor

@pappajohan - the WARNING about Unidentified device type you report in #10326 (comment) is probably resolved by #10106

The other issue (the requests library) seems to be a dependency problem.

@pappajohan
Copy link

Thanks @molobrakos, that's why I was excited to try .57 to see if the warnings disappeared. Anything I could do?

BTW, did you see #8747?
/Johan

@leifmariposa
Copy link

leifmariposa commented Nov 5, 2017

Hi, same issue on 0.57.1 here.

BR
/Leif

2017-11-05 09:25:49 ERROR (MainThread) [homeassistant.setup] Error during setup of component tellduslive
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 51, in setup
    client = TelldusLiveClient(hass, config)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 72, in __init__
    from tellduslive import Client
  File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 10, in <module>
    from requests_oauthlib import OAuth1
  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()

@molobrakos
Copy link
Contributor

Could perhaps be related to #9876 ?

@molobrakos
Copy link
Contributor

molobrakos commented Nov 5, 2017

It seems that upgrading to Python 3.6 is a workaround (see #10353).

@pappajohan
Copy link

Great news, will absolutely try after work! Thanks!

/Johan

@pappajohan
Copy link

pappajohan commented Nov 6, 2017

Sorry @molobrakos, I just realized I'm not sure what "a dependency problem" means. My most common error lately, I think, is:

2017-11-06 07:05:04 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 1026, 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 117, 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

which I think is the same as #8130, but I'm not sure.

I thought that was connected to the warnings regarding "Unidentified device type", probably without reason.

Is that what You meant?

@ScuttleSE
Copy link
Author

Same error in 57.2

2017-11-06 09:16:37 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()
2017-11-06 09:16:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=title=Invalid config, message=The following components and platforms could not be set up:

 - [tellduslive](https://home-assistant.io/components/tellduslive/)

Please check your config., notification_id=invalid_config, service=create, service_call_id=140713731265984-6, domain=persistent_notification>
2017-11-06 09:16:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - [tellduslive](https://home-assistant.io/components/tellduslive/)

@molobrakos
Copy link
Contributor

molobrakos commented Nov 6, 2017

@pappajohan, the TypeError: 'NoneType' object does not support item assignment-stuff in #8130 seems to be a separate issue not related to this bug.

@ScuttleSE
Copy link
Author

Has anyone verified that upgrading to Python 3.6 will help?

@fredrike
Copy link
Contributor

fredrike commented Nov 7, 2017

Have you tested to update all required packages i.e.

pip3 install -U -r requirements_all.txt

Or rather, revert requests (2.18.4) to version 2.14.2 according to: #10353 (comment)

pip3 install requests==2.14.2

@ScuttleSE
Copy link
Author

pip3 install -U -r requirements_all.txt

Dunno where to run this from, that file exists nowhere on my debian-system..

pip3 install requests==2.14.2

That did the trick though

@molobrakos
Copy link
Contributor

I am not sure, but a problem could be that the dependency library (tellduslive) pins specific versions of requests/requests_oauth? https://github.com/molobrakos/tellduslive/blob/27a366f3ae9bf36c75224879377d7a6e723bb19a/requirements.txt

@fredrike
Copy link
Contributor

fredrike commented Nov 7, 2017

requirements_all.txt can be found here https://github.com/home-assistant/home-assistant/blob/dev/requirements_all.txt (isn't that part of the install instructions?).

But good that it is working now.

@molobrakos close this as pip3 install requests==2.14.2 fixes the issue :)

@molobrakos
Copy link
Contributor

I don't want to close it if it requires manual intervention.

@teoball
Copy link

teoball commented Nov 7, 2017

pip3 install requests==2.14.2 worked for me too.
I tride to upgrade to the latest version of phyton (3.6.5) first, but without any luck.

@mcfrojd
Copy link

mcfrojd commented Nov 10, 2017

The pip3 install requests==2.14.2 trick does not work for me on latest Hassbian.
Still get this error:

2017-11-09 18:43:31 ERROR (MainThread) [homeassistant.setup] Error during setup of component tellduslive
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 51, in setup
    client = TelldusLiveClient(hass, config)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 72, in __init__
    from tellduslive import Client
  File "/srv/homeassistant/lib/python3.5/site-packages/tellduslive.py", line 10, in <module>
    from requests_oauthlib import OAuth1
  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()

@molobrakos
Copy link
Contributor

molobrakos commented Nov 20, 2017

I've removed the version pinning of requests in the tellduslive library anyway, hoping that it will solve this issue.

@pappajohan
Copy link

Hi! Can’t get 0.58.1 to work with or without pip3 install requests==2.14.2, but maybe I messed up something else by now..?

Reverted to 0.56.2 which works.

/Johan

@tubalainen
Copy link
Contributor

Even the states of lights and switches are affected and does not always update. Requires restart of HASS for the to update.

I am really looking forward to this fix henice my whole system is dependant upon Tellduslive.

Thanks for all the hard work @molobrakos !

(Running HASSIO 1.1 with the latest update, 0.58.1)

@tubalainen
Copy link
Contributor

Same core problem i presume? #10759 #10757 ?

@pappajohan
Copy link

Wasn’t sure if I messed up something else, so I tried again. 0.58.1 started without errors after the requests==. However, 7 hours later everything Telldus went unavailable and;

Linux hassbian 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Nov 26 13:40:06 2017 from 192.168.1.111
pi@hassbian:~ $ sudo journalctl -fu home-assistant@homeassistant | grep telldus
Nov 27 16:23:34 hassbian hass[7106]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 101, in update
Nov 27 16:23:34 hassbian hass[7106]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 141, in _sync
Nov 27 16:23:34 hassbian hass[7106]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tellduslive.py", line 114, in identify_device

/Johan

@molobrakos
Copy link
Contributor

molobrakos commented Dec 4, 2017

I have no idea why this problem occur for some users.
It is not isolated to telldus live component (fitbit component here: #10540, twitter component here: #10353), honeywell thermostat here: https://community.home-assistant.io/t/honeywell-lyric-thermostat/3520/300?u=molobrakos).

Upstream bug seems is filed here: requests/requests-oauthlib#299
Referencing possibly related commit: psf/requests@e038aad

To sum it up it seems to be more of a configuration problem (I suspect it might have to do something with Hassbian).

@tubalainen
Copy link
Contributor

tubalainen commented Dec 5, 2017

@molobrakos, correct! The TypeError: unsupported operand type(s) for &: 'NoneType' and 'int' is the one I was having.

I am 100% tellduslive.py error free at this stage! <3

@pappajohan
Copy link

I’m very grateful. I cannot however see any dead sensors, only a dummy switch to control a lua script and a group besides 433- and z-wave switches and motion sensors. Two of my neo coolcam sensors don’t report lux even though they should, will remove them just in case.

Or did you mean I should install Cython and DTLSSocket?

Kind regards,
Johan

@pappajohan
Copy link

Reading on my phone... Ok, yes, my error is the “packages/requests_oauthlib/init.py", line 9, in
if requests.version < '2.0.0':
TypeError: unorderable types: module() < str()”.

Will try what ScuttleSE said... ;-)

@tubalainen
Copy link
Contributor

@pappajohan Go to Events, create a event and drag and drop a sensor, in the drop down list, do you have many empty rows? (See pictures from my previous pose above). If so, contact support and ask Telldus to clean for you. I have informed them about this issue and the compability problems with HASS. They are aware of this issue.

@pappajohan
Copy link

Thanks! No empty rows on my iPhone, will see tonight if it’s browser specific.

Also downgraded homeassistant to 0.58.0, pip3 install Cython and DTLSSocket, pip3 — upgrade and restarted home assistant. Same errors...
/Johan

@pappajohan
Copy link

The same thing on the computer @tubalainen ... Registered a ticket with Telldus anyway.

@ScuttleSE, any advice..?
/Johan

@tubalainen
Copy link
Contributor

tubalainen commented Dec 6, 2017

Please try to reinstall from scratch, have HASS discover your telldus unit(s) and then parse the configuration manually? If you still experiencing problems please check with Telldus Support. They are aware of HASS and the issues with the API. New firmware for the telldus units are in early beta and will be released momentarily that will address ghost sensors and other known issues.

I cannot replicate your specific error, please try to do a complete reinstall and see if it helps.

I have two telldus units, a "shit load" of sensors and switches, currently running "local API". It works like a charm, not a single error. Under the latest version of HASSIO (0.59.1).... It all started to "work like a charm" after telldus cleaned out the dead ghost sensors (that I had a "shitload of" as well).

@pappajohan
Copy link

Thanks!
Telldus replied this morning that there are no dead sensors, pity.

I tried a clean install, hassbian 1.31, and also removed hass, installed Cython and installed mentioned sw before reinstalling. Tried with discovery and manually. I guess I’m doing something stupid...

After upgrading tellduslive it reverts to previous version. How do you change that?
/Johan

@mcfrojd
Copy link

mcfrojd commented Dec 6, 2017

I still have the same problem in Hassbian 0.59.1

2017-12-06 10:38:49 ERROR (MainThread) [homeassistant.setup] 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()

I made a fresh install of HassIO and on 0.58.1 telldus live worked fine with old settings (public key and more), After a upgrade to 0.59.1 i had to use the new settings with OAuth and that worked fine.

On my Hassbian install i never get the notification to OAuth telldus live, only the error even if i use the new setting.

Just upgraded my Hassbian to latest 0.59.2 and same problem still.

But now i noticed that even if i comment out "#tellduslive:" and restart HASS i still get the error.
How come HASS tries to load tellduslive even if i dont have in enabled in configuration.yaml?
-EDIT- After a reboot the tellduslive was still loaded.

@pappajohan
Copy link

Thanks @mcfrojd for pointing that out, using hassio now. I would prefer hassbian, but at the moment it just doesn't work.

/Johan

@molobrakos
Copy link
Contributor

@mcfrojd, Home Assistant will discover your Tellstick on the local network and automatically load the tellduslive module if the discovery module is enabled in your configuration.

To sum it up, the problem (TypeError: unorderable types...) now only occur on Hassbian?

@pappajohan
Copy link

@molobrakos , at least the mentioned error occur on Hassbian and not on hassio. I guess that could be a good reason to try "the ultimate home automation hub"for a while... :-)

Really, I'm super happy at the moment, but I'll keep my Hassbian on another card and will gladly try any other idea to get it working again.

Regards,
Johan

@mcfrojd
Copy link

mcfrojd commented Dec 9, 2017

To sum it up, the problem (TypeError: unorderable types...) now only occur on Hassbian?

@molobrakos At least for me, (i have not tried the tellduslive on a fresh install of hassbian)
The tellduslive have worked for days now on my HassIO.
I havent made my HassIO a full config as my Hassbian, only got Tellduslive and Tradfri up and running on that one. So if there is any other component that make telldus act up i have not installed that one yet.
I will add some components one by one and let it run for a couple hours to see what, if any other component is making tellduslive fail.

@Cnordbo
Copy link

Cnordbo commented Dec 10, 2017

Same issue here as well, running Hassbian with 0.59.2 - fresh install - nothing is setup, fails from discovery. no tweaks done is configuration yet either.

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()

If API keys is suppose to be defined in configuration.yaml, then i would strongly suggest adding that to the documentation of the component as well.

@molobrakos
Copy link
Contributor

I don't feel like installing Hassbian to debug this issue, but I am curious, what happens if you run this on your Hassbian installation, in the Hass virtual environment:

python3 -c "import requests; import requests_oauthlib; print(requests.__file__, requests.__version__, requests_oauthlib.__file__, requests_oauthlib.__version__)"

@PetrolHead2
Copy link

PetrolHead2 commented Dec 11, 2017

Hi,
On a test system running version 0.59.2 (Fresh installation)
Telldus not working (new config)
After running: pip3 install requests==2.14.2
Telldus is working.

python3 -c "import requests; import requests_oauthlib; print(requests.__file__, requests.__version__, requests_oauthlib.__file__, requests_oauthlib.__version__)"
resulted in:
/srv/homeassistant/lib/python3.5/site-packages/requests/__init__.py 2.14.2 /srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py 0.8.0

On my production system,
Running 0.59.0,
Telldus working (old config)
I get:
/srv/homeassistant/lib/python3.5/site-packages/requests/__init__.py 2.18.4 /srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py 0.8.0

Regards PH

@Cnordbo
Copy link

Cnordbo commented Dec 11, 2017

If /src/homeassistant is where you wanted me to execute the command then the following thing happened:

pi@hassbian:/srv/homeassistant $ python3 -c "import requests; import requests_oauthlib; print(requests.__file__, requests.__version__, requests_oauthlib.__file__, requests_oauthlib.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'requests'

@Cnordbo
Copy link

Cnordbo commented Dec 11, 2017

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
Copy link

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
Copy link

mcfrojd commented Dec 11, 2017

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
Copy link

Cnordbo commented Dec 11, 2017

That worked for me as well! Thanks @leifmariposa !

@JojjeErvalla
Copy link

Works perfect now =)

@juan11perez
Copy link

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

@Konstigt
Copy link

Konstigt commented Jan 5, 2018

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
Copy link

Rawet commented Jan 5, 2018

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/

@home-assistant home-assistant locked and limited conversation to collaborators May 29, 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