Coder Social home page Coder Social logo

derek-miller / homebridge-genie-aladdin-connect Goto Github PK

View Code? Open in Web Editor NEW
29.0 6.0 5.0 379 KB

Homebridge plugin to integrate Genie Aladdin Connect enabled garage door openers.

Home Page: https://www.npmjs.com/package/homebridge-genie-aladdin-connect

License: Apache License 2.0

TypeScript 100.00%
homebridge homebridge-plugin homekit genie aladdin aladdin-connect

homebridge-genie-aladdin-connect's People

Contributors

bwitting avatar dependabot[bot] avatar derek-miller avatar herrtimd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

homebridge-genie-aladdin-connect's Issues

OAuth token timeout

Hi, I just tried to use this plugin and I'm getting this error in my log:
Screen Shot 2022-04-22 at 10 47 18

Any idea on what I can do to fix this? I've double checked my email/password and they're correct. Thanks!

Using deep-refresh for polling

response = await this.session.get(`https://${AladdinConnect.API_HOST}/deep-refresh`, {

On the above line, you are calling /deep-refresh to get the device status. There is a GET /devices endpoint that would be better for this. You will receive the same device data as the deep-refresh, but it is less expensive on our side. The deep-refresh endpoint actually sends a sync command to the device, which causes it to send relatively large sync response message. It also contains a lot of other information that you are not using.

I know we are working on a new solution, but in the meantime this would really help us out on our end. If you have any questions or need any help just let me know at [email protected]

Garage door does not open/close

Describe The Bug:
When I click 'Garage Door' in Home, the door does not open or close. The app spins as though it is trying to open the door, then a notification pops up and says the door was opened, then another notification says the door was closed. The door does not move at all.

To Reproduce:
I do not know. I installed the plugin from the UI and used my login credentials.

Expected behavior:
The door opens and closes when tapped.

Logs:

[12/21/2021, 8:55:09 PM] [Garage Door] Command to run: open
[12/21/2021, 8:55:11 PM] [Garage Door] Set Garage Door to open
[12/21/2021, 9:04:53 PM] [Garage Door] Command to run: open
[12/21/2021, 9:04:55 PM] [Garage Door] Set Garage Door to open

Plugin Config:

            "name": "Garage Door",
            "status_update_delay": "15",
            "poll_state_delay": 15,
            "accessory": "AladdinConnectGarageDoorOpener",
            "_bridge": {
                "username": "XX.XX.XX.XX.XX.XX",
                "port": 30257

Environment:

  • Plugin Version: 1.0.5
  • Homebridge Version: 1.3.8
  • Node.js Version: v16.13.1
  • NPM Version: v8.1.2
  • Operating System: Says Ubuntu Bionic Beaver (18.04.6 LTS), is actually OMV 5.6.21-2

Local Execution

Would it be possible to have the plugin control the device directly from the LAN instead of going to the cloud?

Oauth Token Error

Describe Your Problem:
HomeKit is unable to communicate with the garage door through HomeBridge. I have tried restarting the server, uninstalling/reinstalling the plugin, and verifying I can access the door through the Aladdin app.

Logs:

 [API] An error occurred getting oauth token; Request failed with status code 403
 [API] An error occurred getting devices from account; Request failed with status code 403
 Failed to load doors from account; retrying in 5 minutes

Plugin Config:

 "bridge": {
        "name": "Homebridge 07F1",
        "username": "",
        "port": 51121,
        "pin": 
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "refreshToken": 
            "hideAlarmSirenSwitch": true,
            "platform": "Ring"
        },
        {
            "name": "Nest",
            "access_token": ",
            "refreshToken": “”,
            "_bridge": {
                "username": "",
                "port": 58349
            },
            "platform": "Nest"
        },
        {
            "devices": [
                {
                    "ipAddress": "10.0.5.63",
                    "serialNumber": "",
                    "credentials": "",
                    "enableAutoModeWhenActivating": false,
                    "enableOscillationWhenActivating": false,
                    "isNightModeEnabled": false,
                    "isJetFocusEnabled": false,
                    "isContinuousMonitoringEnabled": false,
                    "isTemperatureSensorEnabled": false,
                    "isHumiditySensorEnabled": true,
                    "isAirQualitySensorEnabled": true,
                    "isSingleSensorAccessoryModeEnabled": false,
                    "isSingleAccessoryModeEnabled": false,
                    "isFullRangeHumidity": false,
                    "isHeatingDisabled": false
                }
            ],
            "platform": "DysonPureCoolPlatform"
        },
        {
            "bonds": [
                {
                    "ip_address": "",
                    "token": ""
                }
            ],
            "include_dimmer": false,
            "include_toggle_state": false,
            "fan_speed_values": false,
            "platform": "Bond",
            "_bridge": {
                "username": "",
                "port": 54677
            }
        },
        {
            "controllers": [
                {
                    "address": "",
                    "password": "",
                    "username": ""
                }
            ],
            "platform": "UniFi Protect",
            "_bridge": {
                "username": "",
                "port": 35747
            }
        },
        {
            "name": "Wemo",
            "mode": "auto",
            "platform": "Wemo"
        },
        {
            "name": "Garage Door",
            "username": "",
            "password": "",
            "batteryLowLevel": 15,
            "userInfoCacheTtl": 3600,
            "doorStatusStationaryCacheTtl": 15,
            "doorStatusTransitioningCacheTtl": 5,
            "doorStatusPollInterval": 15000,
            "logApiResponses": false,
            "platform": "GenieAladdinConnect",
            "_bridge": {
                "username": "",
                "port": 39574
            }
        }
    ],
    "disabledPlugins": [
        "",
        ""
    ]
}

Screenshots:

Environment:

  • Plugin Version: homebridge-genie-aladdin-connect v2.2.0
  • Homebridge Version: v1.5.0
  • Node.js Version: v16.15.1
  • NPM Version: 4.18.1
  • Operating System: Raspbian

New API Question

This is just a question, but I received a notification that at the end of January, Genie will be changing the app and backend API.

Do you know if any of this will affect the plugin and if it will still work after this change? I know that MyQ just made big changes that broke all plugins and third-party access and if that is going to be the case here I'm trying to look ahead.

Thanks!

401 error despite app login working

Describe Your Problem:

It seems like there's something weird going on with authentication; I can log in and out of the app just fine, but using the same username and password in this plugin gives me a 401.

Logs:

[Garage Door] [API] An error occurred getting operator oauth token; Request failed with status code 401
[Garage Door] [API] An error occurred getting devices from account; Request failed with status code 401
[Garage Door] Failed to load doors from account; retrying in 5 minutes

Plugin Config:

{
            "name": "Garage Door",
            "username": "{email}",
            "password": "{password}",
            "batteryLowLevel": 15,
            "userInfoCacheTtl": 3600,
            "doorStatusStationaryCacheTtl": 15,
            "doorStatusTransitioningCacheTtl": 5,
            "doorStatusPollInterval": 15000,
            "logApiResponses": true,
            "showShared": false,
            "platform": "GenieAladdinConnect"
        }

Screenshots:

Environment:

  • Plugin Version: 2.5.3
  • Homebridge Version: 1.6.0
  • Node.js Version: v18.13.0
  • NPM Version: 8.19.3
  • Operating System: Raspbian

I also tried turning on debug mode (for homebridge and this app) but no additional information was given besides the same error logs as above. I could try again though if you think that would help. 👍

Error on plugin under Hoobs

Describe Your Problem:
Receiving - [API] An error occurred getting oauth token; Request failed with status code 403

Logs:

6/28/2022, 10:04:34 AMGenie Aladdin Connect BridgeGarage DoorERROR[API] An error occurred getting oauth token; Request failed with status code 403
6/28/2022, 10:04:34 AMGenie Aladdin Connect BridgeGarage DoorERROR[API] An error occurred getting devices from account; Request failed with status code 403
6/28/2022, 10:04:34 AMGenie Aladdin Connect BridgeGarage DoorERRORFailed to load doors from account; retrying in 5 minutes

Plugin Config:

 "platform": "GenieAladdinConnect",
    "name": "Garage Door",
    "userInfoCacheTtl": 3600,
    "doorStatusStationaryCacheTtl": 15,
    "doorStatusTransitioningCacheTtl": 5,
    "doorStatusPollInterval": 15000,
    "password": "xxxxxxx",
    "username": "xxxxxxxx"

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Plugin Version**:2.2.0
* **Homebridge Version**: HOOBS 4.2.3
* **Node.js Version**: <!-- node -v -->
* **NPM Version**: <!-- npm -v -->
* **Operating System**: HOOBS

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->

Too many requests to Aladdin Connect API

Anyone else getting their home bridge logs flooded with this?
[14/08/2022, 11:46:58] [Garage Door] [API] An error occurred getting device status; Request failed with status code 429

API no longer connecting

Describe The Bug:
Doors no longer load

[API] An error occurred getting o auth token; timeout of 5000ms exceeded

To Reproduce:
Restart Homebridge - occurs at boot

Expected behavior:
Norma run and loading of accessories

Logs:

Show the Homebridge logs here, remove any sensitive information.

[API] An error occurred getting o auth token; timeout of 5000ms exceed

Continues to timeout

[API] An error occurred getting devices from account; timeout of 5000 ms exceeded

[] Failed to load doors from account ; retrying in 5 minutes

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

{
{
"name": "",
"username": "",
"password": "",
"batteryLowLevel": 15,
"userInfoCacheTtl": 3600,
"doorStatusStationaryCacheTtl": 15,
"doorStatusTransitioningCacheTtl": 5,
"doorStatusPollInterval": 15000,
"logApiResponses": false,
"showShared": false,
"platform": "GenieAladdinConnect"
}

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: 1.51
  • Node.js Version:
  • NPM Version:
  • Operating System: Raspbian

Lots and lots of API calls

I don't know if this is a bug or standard behavior but the API seems to be called constantly. Here is a couple screenshots from my pi-hole:

Screen Shot 2023-07-28 at 11 03 22 AM

Screen Shot 2023-07-28 at 11 03 45 AM

I set up this plugin in homebridge just yesterday.

The plugin itself is working just fine.

Now plugin only reconginizes one of the two doors on my genie aladdin account

Describe The Bug:
I installed this plugin previously and both of my garage doors (two of them) were recognized. Now only the last garage door added (Jess's door) to my genie aladdin account is recognized and added to Homekit.

To Reproduce:
I tried to uninstall and reinstall the plugin, but still only one garage door is recognized. I also went to the genie aladdin app and removed and re-added the two garage doors.

Expected behavior:
I was expected the two doors to be recognized like it previously did.

Logs:

Show the Homebridge logs here, remove any sensitive information.
1/14/2022, 9:03:37 AMGenie Aladdin Connect BridgeLoaded plugin 'homebridge-genie-aladdin-connect'
1/14/2022, 9:03:37 AMGenie Aladdin Connect BridgeLoading 1 platforms...
1/14/2022, 9:03:38 AMGenie Aladdin Connect BridgeBridge is running on port 51856.
1/14/2022, 9:03:38 AMGenie Aladdin Connect BridgeWARNINGunhandled rejection: Error: Request failed with status code 403
1/14/2022, 9:04:13 AMGenie Aladdin Connect BridgeConfiguration change
1/14/2022, 9:04:13 AMgeniealaddinconnectbridge stopping
1/14/2022, 9:04:18 AMGenie Aladdin Connect Bridge starting
1/14/2022, 9:04:21 AMGenie Aladdin Connect BridgeLoaded plugin 'homebridge-genie-aladdin-connect'
1/14/2022, 9:04:21 AMGenie Aladdin Connect BridgeLoading 1 platforms...
1/14/2022, 9:04:21 AMGenie Aladdin Connect BridgeBridge is running on port 51856.
1/14/2022, 9:04:23 AMGenie Aladdin Connect BridgeGarage DoorAdding new accessory: Jess’s Door
**Plugin Config:**

```json
{
    "platform": "GenieAladdinConnect",
    "name": "Garage Door",
    "userInfoCacheTtl": 3600,
    "doorStatusStationaryCacheTtl": 15,
    "doorStatusTransitioningCacheTtl": 5,
    "doorStatusPollInterval": 15000,
    "username": "my email address",
    "password": "my password"```

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Genie aladdin connect 1.2.0**:
* **HOOBS version 4.1.21-->
* **Node.js Version**: 16.13.2
* **NPM Version**: <!-- npm -v -->
* **Operating System**: <!--RPI 4 -->

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->

Crash Homebridge

Logs:

Error: timeout of 5000ms exceeded
at createError (/usr/local/lib/node_modules/homebridge-genie-aladdin-connect/node_modules/axios/lib/core/createError.js:16:15)
at RedirectableRequest.handleRequestTimeout (/usr/local/lib/node_modules/homebridge-genie-aladdin-connect/node_modules/axios/lib/adapters/http.js:328:16)
at RedirectableRequest.emit (node:events:390:28)
at Timeout. (/usr/local/lib/node_modules/homebridge-genie-aladdin-connect/node_modules/follow-redirects/index.js:164:12)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)

Plugin Config:

Garage Door will not open

Describe The Bug:

I use the home app to open the garage door and it never opens. it shows that it is opening but then it goes back to closed.

To Reproduce:

open the home app and click on the garage door to open. will start the request but will never actually open and then shows the garage door closed.

Expected behavior:

garage door should open.

Logs:
1/21/2022, 3:00:30 PMAladdin Connect Garage Door Bridge starting
1/21/2022, 3:00:36 PMAladdin Connect Garage Door BridgeLoaded plugin 'homebridge-aladdin-connect-garage-door'
1/21/2022, 3:00:36 PMAladdin Connect Garage Door BridgeLoading 1 accessories...
1/21/2022, 3:00:36 PMAladdin Connect Garage Door BridgeBridge is running on port 51826.
1/21/2022, 3:01:58 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)
1/21/2022, 3:02:00 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)
1/21/2022, 3:02:22 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)
1/21/2022, 3:02:22 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)
1/21/2022, 3:02:32 PMAladdin Connect Garage Door BridgeGarage DoorCommand to run: open
1/21/2022, 3:02:33 PMAladdin Connect Garage Door BridgeGarage DoorSet Garage Door to open
1/21/2022, 3:02:43 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)
1/21/2022, 3:03:05 PMAladdin Connect Garage Door BridgeGarage DoorState of Garage Door is: STOPPED (sent CLOSED)

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

[API] An error occurred getting operator oauth token; Request failed with status code 403

Describe The Bug:
[12/15/2022, 1:55:21 PM] [Garage Door] [API] An error occurred getting operator oauth token; Request failed with status code 403
[12/15/2022, 1:55:21 PM] [Garage Door] [API] An error occurred getting devices from account; Request failed with status code 403
[12/15/2022, 1:55:21 PM] [Garage Door] Failed to load doors from account; retrying in 5 minutes

To Reproduce:
Restart Homebridge - occurs at boot

Expected behavior:
Normal loading and running of accessories.

Logs:

[12/15/2022, 1:55:20 PM] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge 75A4) is running on port XXXXX
[12/15/2022, 1:55:21 PM] [Garage Door] [API] An error occurred getting operator oauth token; Request failed with status code 403
[12/15/2022, 1:55:21 PM] [Garage Door] [API] An error occurred getting devices from account; Request failed with status code 403
[12/15/2022, 1:55:21 PM] [Garage Door] Failed to load doors from account; retrying in 5 minutes
[12/15/2022, 2:00:22 PM] [Garage Door] [API] An error occurred getting operator oauth token; Request failed with status code 403
[12/15/2022, 2:00:22 PM] [Garage Door] [API] An error occurred getting devices from account; Request failed with status code 403
[12/15/2022, 2:00:22 PM] [Garage Door] Failed to load doors from account; retrying in 5 minutes

Plugin Config:

            "name": "",
            "username": "",
            "password": "",
            "batteryLowLevel": 15,
            "userInfoCacheTtl": 3600,
            "doorStatusStationaryCacheTtl": 15,
            "doorStatusTransitioningCacheTtl": 5,
            "doorStatusPollInterval": 15000,
            "logApiResponses": true,
            "showShared": true,
            "platform": "GenieAladdinConnect"

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: 2.5.1
  • Node.js Version: 18.2.1
  • NPM Version: 8.5.1
  • Operating System: Ubuntu Jammy Jellyfish (22.04.1 LTS)

Please reach out for official version conversations

Is your feature request related to a problem? Please describe:
I am reaching out from Genie's Engineering which owns Aladdin Connect Product

Describe the solution you'd like:
We want to collaborate on an official version. The current version may cease to work as we implement security measures. Reach out to us [email protected]

Describe alternatives you've considered:
Official release that we can work on collaboratively

Additional context:
The current version is polling requests putting the load on our servers. Fact that this code is available out in public, sophisticated users can morph it and potentially DDos on us which will be an issue for your use base and larger user community.

Include/exclude lists

Is your feature request related to a problem? Please describe:
Aladdin Connect doesn't have any equivalent to HomeKit's multiple home feature. If you have multiple openers in different places, and therefore have multiple HomeBridge instances, then it would be good to be able to have this plug-in ignore the doors that are in a different place.

Describe the solution you'd like:
I'd like to have a configuration dictionary entry called "ignore" that maps to a list of door names that this plugin instance will, well, ignore.

Describe alternatives you've considered:
The only alternative to this is setting up multiple Aladdin Connect accounts, but then you'd need to sign in and out of them in the actual Aladdin Connect app, which would be tremendously annoying.

Excessive Sessions on Aladdin Connect

Describe Your Problem:
Genie says that my system has excessive sessions. I’ve changed the polling to once a minute, but I suspect this might be a new change of service by Genie. Are you aware

Logs:

Not likely a log issue but a change of service by Genie

Plugin Config:

12345678910111213
{ "name": "Garage Door", "username": "—-", "password": "—-", "batteryLowLevel": 15, "userInfoCacheTtl": 3600, "doorStatusStationaryCacheTtl": 15, "doorStatusTransitioningCacheTtl": 5, "doorStatusPollInterval": 60000, "logApiResponses": false, "showShared": false, "platform": "GenieAladdinConnect"}

Screenshots:
Email from Genie

Hello,

We got an alert on your account showing that the mobile app has an excessively high number of user sessions from your account. Please confirm if you are using any third-party apps (home assistant or something similar). If that is the case, please ensure there are no defects in that implementation or reach out to that vendor’s support team.

Please reach out if you need additional clarification. Your account will be locked out if this issue is not resolved by 12/23/2023.

We are doing this to secure our system and not cause excessive unwarranted load on the system.

Thanks,
Aladdin Connect/OHD Anywhere Support

Environment:

  • Plugin Version: 3.0.0
  • Homebridge Version: 1.7.0
  • Node.js Version: 18.16.0
  • NPM Version: 9.5.1
  • Operating System: Raspbian 11

timeout

Describe Your Problem:

been working great now getting timeout errors may be related to having been connected to vpn earlier. on iMac safari is not the best of letting go.

Logs:
[5/5/2022, 6:04:48 PM] [Garage Door] [API] An error occurred getting oauth token; timeout of 5000ms exceeded
[5/5/2022, 6:04:48 PM] [Garage Door] [API] An error occurred getting devices from account; timeout of 5000ms exceeded
[5/5/2022, 6:04:48 PM] [Garage Door] Failed to load doors from account; skipping discovery

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

{
"name": "Garage Door",
"username": "xxx",
"password": "xxx,
"batteryLowLevel": 15,
"userInfoCacheTtl": 3600,
"doorStatusStationaryCacheTtl": 15,
"doorStatusTransitioningCacheTtl": 5,
"doorStatusPollInterval": 15000,
"logApiResponses": false,
"platform": "GenieAladdinConnect"
}
Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: homebridge-config-ui-x v4.43.2
    homebridge-genie-aladdin-connect v2.1.4
  • Node.js Version:
  • NPM Version:
  • Operating System:

Battery Level Illegal Value

Describe The Bug:
The battery level characteristic is throwing an illegal argument of -1.

To Reproduce:
Update plugin to v 2.3, and restart the plugin.

Expected behavior:
Should show a valid argument for the battery level to expose in Homebridge / Homekit.

Logs:

6/29/2022, 11:12:04 AMHOOBS BridgeERROR[HOOBS Bridge B57C@My Door@My Door@Battery Level] characteristic was supplied illegal value: number -1 exceeded minimum of 0

Plugin Config:

{
"accessories": [],
"platforms": [
{
"platform": "GenieAladdinConnect",
"name": "Garage Door",
"userInfoCacheTtl": 3600,
"doorStatusStationaryCacheTtl": 15,
"doorStatusTransitioningCacheTtl": 15,
"doorStatusPollInterval": 15000,
"username": ,
"password":
}
]
}

Screenshots:

Environment:

  • Plugin Version: 2.3.0
  • Homebridge Version: 1.4.0
  • Node.js Version: 16.14.2
  • NPM Version: 2.3.0
  • Operating System: Raspbian

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.