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

Cant initialize remote.HomeAssistant API #4094

Closed
omcdr opened this issue Oct 28, 2016 · 1 comment
Closed

Cant initialize remote.HomeAssistant API #4094

omcdr opened this issue Oct 28, 2016 · 1 comment

Comments

@omcdr
Copy link

omcdr commented Oct 28, 2016

*_Home Assistant release (hass --version): 0.31.1
*_Python release (python3 --version): Python 3.4.2
*_Component/platform: remote.HomeAssistant
*_Description of problem: Can't initialize remote.HomeAssistant API

Traceback (if applicable):

Python 3.4.2 (default, Oct  8 2014, 14:38:51)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import homeassistant.remote as remote
>>> import homeassistant.bootstrap as bootstrap
>>> remote_api = remote.API("192.168.7.21")
>>> print(remote.get_state(remote_api, 'sensor.temp2'))
<state sensor.temp2=10.06; friendly_name=temp2@ 2016-10-28T18:33:58.777007+00:00>

#up to this place works, but next instruction has infinite execution time. I have waited 2 hours, withot success. Only ctrl+C can break this.

>>> hass = remote.HomeAssistant(remote_api)
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/hdd/repo/venv-tcan/lib/python3.4/site-packages/homeassistant/remote.py", line 131, in __init__
    self.states = StateMachine(self.bus, self.loop, self.remote_api)
  File "/hdd/repo/venv-tcan/lib/python3.4/site-packages/homeassistant/remote.py", line 267, in __init__
    bus.listen(ha.EVENT_STATE_CHANGED, self._state_changed_listener)
  File "/hdd/repo/venv-tcan/lib/python3.4/site-packages/homeassistant/core.py", line 472, in listen
    self._hass.loop, self.async_listen, event_type, listener).result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 397, in result
    self._condition.wait(timeout)
  File "/usr/lib/python3.4/threading.py", line 290, in wait
    waiter.acquire()
KeyboardInterrupt
@w1ll1am23
Copy link
Contributor

Dup #3990

@balloob balloob closed this as completed Nov 3, 2016
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants