GithubHelp home page GithubHelp logo

sebirdman / deako_hass_integration Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 8.0 272 KB

An (unofficial) Deako integration with home assistant

License: MIT License

Python 100.00%
home-assistant homeassistant integration deako lights local

deako_hass_integration's Introduction

Deako HASS integration

Component to integrate with Deako using the public local api

This component will set up the following platforms.

Platform Description
Lights Control your lights

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called integration_blueprint.
  4. Download all the files from the custom_components/integration_blueprint/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Deako"

Configuration is done in the UI

Find an IP address of a deako device that is on your wifi, and input that into the configuration popup

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

deako_hass_integration's People

Contributors

caminadab avatar ctso avatar eifinger avatar eseglem avatar github-actions[bot] avatar iantrich avatar joedorman avatar ludeeus avatar matthewflamm avatar oncleben31 avatar salem84 avatar sebirdman avatar swartjean avatar tefinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deako_hass_integration's Issues

Integration fails to control multiple devices at once

Version of the custom_component

latest

Configuration

Nothing special, brand new HASS with Deako recently installed

Add your logs here.

This error originated from a custom integration.

Logger: custom_components.deako
Source: custom_components/deako/deako.py:174
Integration: Deako Smart Lighting (documentation, issues)
First occurred: 1:08:31 AM (3 occurrences)
Last logged: 1:08:38 AM

Failed to parse {'src': 'deako', 'status': 'error', 'timestamp': 1634717311, 'data': {'code': 'REQUEST_MALFORMED', 'message': 'no type field'}}
Failed to parse {'src': 'deako', 'status': 'error', 'timestamp': 1634717318, 'data': {'code': 'REQUEST_MALFORMED', 'message': 'no type field'}}

Describe the bug

Whenever the integration sends multiple requests in a short period of time, the devices fail to parse the requests and consider them "malformed". I found documentation from the official Deako repo stating that for optimal results, requests should be sent no faster than 800ms apart.
I found that the threshold (at least on my local network) for simultaneous requests working is about 5. Ideally a request buffer should be included in the integration to force a delay between requests.

Integration works intermittently

Version of the custom_component

0.0.1

Describe the bug

This integration is very unreliable. It sometimes works, but most of the time I am unable to control my Deako lights using Home Assistant. When I check the logs, it looks to fail due to a global task timeout (see logs below).

Debug log


Error setting up entry 192.168.1.101 for deako
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deako/__init__.py", line 41, in async_setup_entry
    await connection.connect()
  File "/config/custom_components/deako/deako.py", line 204, in connect
    await self.connection.wait_for_connect()
  File "/config/custom_components/deako/deako.py", line 87, in wait_for_connect
    await asyncio.sleep(1)
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError: Global task timeout

I also see a "failed to connect" message:


This error originated from a custom integration.

Logger: custom_components.deako
Source: custom_components/deako/deako.py:96
Integration: Deako Smart Lighting (documentation, issues)
First occurred: 1:20:52 AM (42 occurrences)
Last logged: 1:44:42 AM

Failed to connect

deprecated features that will be removed in HA Core 2025.1

Version of the custom_component

0.0.1

Describe the bug

Upon setup, I see a notice that the integration is using deprecated features which will be removed in HA Core 2025.1. Please see here for more info: https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

Debug log

Entity None (<class 'custom_components.deako.light.DeakoLightSwitch'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/sebirdman/deako_hass_integration/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

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.