Code Monkey home page Code Monkey logo

ha-glinet-integration's Introduction

Welcome to me.dart

class Me extends Human with Doctor, Developer {
  static String username = 'HarvsG';
  static String website = 'www.codingdoctor.co.uk'
  static String contact = '[email protected]'

  static List<Languages> canCode = [
    Python,
    R,
    Dart,
    Flutter,
    Javascript
    ];

  static Map<String,dynamic> medical = {
    'currentRole' : 'Anaesthetics ACCS 2',
    'completedRoles' : ['Medical School', 'FY1', 'FY2', 'Medical Education FY3'],
    'toGo' : ['ICM trainee', 'Anaesthetics Trainee', 'CCT'],
    'interests' : ['Physiology','Pre-hospital Medicine', 'Evidence Based Medicine'],
  };

  static List<String> ongoingProjects = [
    'GitHub clone for clinical research',
    'Cohort study into ECG criteria for LVH',
    'Tinkering with raspberry pi cluster',
    'Energy usage and production monitoring with raspberry pi'
  ]

}

final me = new Me()

ha-glinet-integration's People

Contributors

harvsg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ha-glinet-integration's Issues

unknown error

I use Home Assistant OS on a Raspberry Pi 4 with a GL-X3000. When setting up the integration, after confirming the IP + password, the integration reports "unknown".

Startup error

await self.async_init()

Startup error often blocks successful loading of the integration

This error originated from a custom integration.

Logger: custom_components.glinet.router
Source: custom_components/glinet/router.py:118
Integration: GL-inet
First occurred: 2:35:18 AM (2 occurrences)
Last logged: 2:35:18 AM

GL-inet router http://192.168.0.1 did not respond in time:
Error getting basic device info from GL-inet router http://192.168.0.1 for setup: 'NoneType' object is not subscriptable

Nonetype error

dev_info = wrt_devices.get(device_mac)

Logger: homeassistant
Source: custom_components/glinet/router.py:272
Integration: GL-inet
First occurred: 2:35:57 AM (1 occurrences)
Last logged: 2:35:57 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/glinet/router.py", line 192, in update_all
    await self.update_device_trackers()
  File "/config/custom_components/glinet/router.py", line 272, in update_device_trackers
    dev_info = wrt_devices.get(device_mac)
               ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

Error on first boot

router_info = await self._update_platform(self._api.router_hello) # TODO seems to always throw unexpected err on first boot

This line always seems to throw an unexpected or timeout error on first boot and then runs fine:

2023-07-01 11:26:26.739 ERROR (MainThread) [custom_components.glinet.router] GL-inet router http://192.168.0.1 did not respond in time:
2023-07-01 11:26:26.781 ERROR (MainThread) [custom_components.glinet.router] Error getting basic device info from GL-inet router http://192.168.0.1 for setup: 'NoneType' object is not subscriptable
2023-07-01 11:26:26.786 WARNING (MainThread) [homeassistant.config_entries] Config entry 'GL-inet mt1300' for glinet integration not ready yet: 'NoneType' object is not subscriptable; Retrying in background
2023-07-01 11:26:29.859 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/enum.py:288: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
enum_member = enum_class._value2member_map_[value]
2023-07-01 11:26:29.920 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session

Workaround is implemented in 3a412bf by raising config not ready so HA retries later

Thinking:

Why fail on first run and not second?

  • Maybe something changes in flow by second run
    • Tested self._token_error: bool = False to True and made no difference
  • HA more impatient at start-up and overwrites the Timeout?
  • Too much 'noise' so HA misses response?

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.