GithubHelp home page GithubHelp logo

andyrak / hacs-aladdin-legacy Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 6.0 113 KB

A workaround HACS integration for Aladdin Connect until the new manufacturer API is done soon™️

License: MIT License

Python 97.72% Shell 2.28%
aladdin-connect cover garage-door home-assistant

hacs-aladdin-legacy's Introduction

Metrics

Metrics

hacs-aladdin-legacy's People

Contributors

andyrak avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

hacs-aladdin-legacy's Issues

Cover status doesn't update

System Health details

## System Information

version core-2024.5.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.29-haos
arch x86_64
timezone America/Los_Angeles
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4976
Installed Version 1.34.0
Stage running
Available Repositories 1402
Downloaded Repositories 45
HACS Data ok
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.3
update_channel stable
supervisor_version supervisor-2024.05.1
agent_version 1.6.0
docker_version 25.0.5
disk_total 30.8 GB
disk_used 23.6 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Bookstack (2.0.5), Let's Encrypt (5.0.15), File editor (5.8.0), Advanced SSH & Web Terminal (17.3.0), motionEye (0.20.0), Piper (1.5.0), Grocy (0.21.0), Terminal & SSH (9.14.0), Whisper (2.0.0), openWakeWord (1.10.0), Music Assistant BETA (2.1.0b0), MariaDB (2.7.1), Traccar (0.25.0), go2rtc (1.9.2), Studio Code Server (5.15.0), Frigate Proxy (1.5), ESPHome (2024.5.0), Log Viewer (0.17.0)
Dashboards
dashboards 9
resources 20
views 34
mode storage
Recorder
oldest_recorder_run May 9, 2024 at 01:16
current_recorder_run May 18, 2024 at 09:32
estimated_db_size 360.55 MiB
database_engine sqlite
database_version 3.44.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

Cover status is not immediately updated when status changes due to outside action. i.e. manual button in garage or Genie app.

Earlier this week errors were generated in the log because the Genie API responded with "already open" or something similar.

Here's an example error log I just caused:

error log2024-05-18 14:21:24.510 ERROR (MainThread) [custom_components.aladdin_connect] [API] An error occurred sending command OPEN_DOOR to door Far Garage Door; {"error":"Device is offline","type":"BusinessLogicError"} 2024-05-18 14:21:24.510 ERROR (MainThread) [custom_components.aladdin_connect] [API] An error occurred sending command OPEN_DOOR to door Far Garage Door; 400, message='Bad Request', url=URL('https://api.smartgarage.systems/command/devices/F0AD4E14EF14/doors/1') 2024-05-18 14:21:24.510 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140374338942784] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/aladdin_connect/cover.py", line 107, in async_open_cover raise HomeAssistantError("Aladdin Connect API failed to open the cover") homeassistant.exceptions.HomeAssistantError: Aladdin Connect API failed to open the cover

I tried to use

service: homeassistant.update_entity
data: {}
target:
  entity_id: cover.main_garage_door

but it doesn't update.

Status is however updated upon reload of integration.

I figured this out:

service: homeassistant.reload_config_entry
data: {}
target:
  device_id: a3f8a9c8a493b30bdcc0788f26964fde

which works as a stop-gap. I'll just have to figure out how to trigger it. I have a camera I can use for my case.

Earlier this week errors were generated because the Genie API responded with "already open" or something similar.

Reproduction steps

  1. open garage door with genie app or button in garage.
  2. observe status in integration

...

Debug logs

NA I believe, but please let me know if you'd like them - Happy to pull all this, but it seems like it's an issue that's been around as there are comments in the forum about it.

https://community.home-assistant.io/t/aladdin-api-changing/676893/39?u=cake1468

Diagnostics dump

No response

HA Automation calls to service.toggle_cover fail

System Health details

System Information

version core-2024.4.4
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.21-v8+
arch aarch64
timezone America/Los_Angeles
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4973
Installed Version 1.34.0
Stage running
Available Repositories 1408
Downloaded Repositories 35
AccuWeather
can_reach_server ok
remaining_requests 29
Home Assistant Cloud
logged_in true
subscription_expiration August 8, 2024 at 17:00
relayer_connected true
relayer_region us-east-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled false
remote_server us-east-1-8.ui.nabu.casa
certificate_status ready
instance_id 20738baa02714c0f95f64db3bc7b910f
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 13
resources 14
views 14
mode yaml
NextDNS
can_reach_server ok
Recorder
oldest_recorder_run April 23, 2024 at 03:35
current_recorder_run April 29, 2024 at 23:45
estimated_db_size 2822.11 MiB
database_engine sqlite
database_version 3.44.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

When calling the service.cover_toggle, the aladdin connect plugin does not correctly detect the current state, and fails with a bad request.

Reproduction steps

  1. Create automation with service.toggle_cover
service: cover.toggle
target:
  device_id: <redacted_device_id>
data: {}
  1. Call automation
  2. Encounter errors as listed in debug logs section

Debug logs

This error originated from a custom integration.

Logger: custom_components.aladdin_connect
Source: custom_components/aladdin_connect/api.py:220
integration: Aladdin Connect Legacy (documentation, issues)
First occurred: April 30, 2024 at 16:05:07 (6 occurrences)
Last logged: 11:34:05

[API] An error occurred sending command OPEN_DOOR to door Right Garage Door; 400, message='Bad Request', url=URL('https://api.smartgarage.systems/command/devices/F0AD4E264D9D/doors/1')
[API] An error occurred sending command OPEN_DOOR to door Left Garage Door; 400, message='Bad Request', url=URL('https://api.smartgarage.systems/command/devices/F0AD4E2649F4/doors/1')

---------

This error originated from a custom integration.

Logger: custom_components.aladdin_connect
Source: custom_components/aladdin_connect/api.py:213
integration: Aladdin Connect Legacy (documentation, issues)
First occurred: April 30, 2024 at 16:05:07 (6 occurrences)
Last logged: 11:34:05

[API] An error occurred sending command OPEN_DOOR to door Right Garage Door; {"error":"Door is already open","type":"BusinessLogicError"}
[API] An error occurred sending command OPEN_DOOR to door Left Garage Door; {"error":"Door is already open","type":"BusinessLogicError"}

Diagnostics dump

No 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.