Giter Site home page Giter Site logo

bdraco / aiolip Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 55 KB

Async Lutron Integration Protocol - Archived now that this is available via LEAP in https://github.com/home-assistant/core/pull/61032

License: Apache License 2.0

Python 86.24% Makefile 13.36% Shell 0.40%

aiolip's People

Contributors

bdraco avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jongilmore

aiolip's Issues

Feature request: Enable calling LIP connect with longer timeout

  • Async Lutron Integration Protocol version: 1.1.4
  • Python version: 3.7
  • Operating System: Ubuntu 18

Description

Need to call async_connect with longer timeout.

Background:
This took quite a bit of digging, but after trying to figure out if there was a network reason for the LIP connection to not establish, I noticed that when manually connecting via telnet I would receive a prompt after a 30 second delay. That helped me find this forum post that indicates the Caseta is trying to connect back to the host system on TCP 113 for an IDENT operation, and timing out (seems the packets are being dropped and not denied - I'm using this from within Home Assistant but I'm looking into corrective options there as well).

Meanwhile, it seems the Lutron Caseta component of Home Assistant could be updated to specify a longer timeout if that becomes an option in aiolip. I plan on opening an issue there and linking back here.

What I Did

telnet to Caseta Pro IP

Fix reconnect after offline for multiple minutes

21-02-09 07:17:56 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiolip/__init__.py", line 163, in async_run
    await self._async_run_once()
  File "/usr/local/lib/python3.8/site-packages/aiolip/__init__.py", line 186, in _async_run_once
    if isinstance(read_task.exception(), asyncio.TimeoutError) or isinstance(
asyncio.exceptions.InvalidStateError: Exception is not set.
2021-02-09 07:17:56 DEBUG (MainThread) [aiolip] Connecting to 192.168.107.77

2021-02-09 07:17:59 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiolip/__init__.py", line 137, in _async_keep_alive_or_reconnect
    await self._async_disconnected()
  File "/usr/local/lib/python3.8/site-packages/aiolip/__init__.py", line 108, in _async_disconnected
    await self._async_connect(self._host)
  File "/usr/local/lib/python3.8/site-packages/aiolip/__init__.py", line 69, in _async_connect
    reader, writer = await asyncio.wait_for(
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.107.77', 23)

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.