Aladdin API changing

They belong in the eye dee ten tee club.

Hereā€™s how I restored Aladdin Connect support to 2024.7.3. Iā€™m running the full Home Assistant OS in a Proxmox VM, so the steps are probably different in other environments.

  1. From the Home Assistant CLI, type login to drop to the shell.
  2. Go to the main config directory. This is the same directory that contains configuration.yaml.
    cd /mnt/data/supervisor/homeassistant
    
  3. Create a directory for Aladdin Connect. Check that the permissions on these directories match the permissions of other sibling directories.
    mkdir -p custom_components/aladdin_connect
    cd custom_components/aladdin_connect
    
  4. Download the Aladdin Connect component from the 2024.6.4 release:
    curl -Ls 'https://api.github.com/repos/home-assistant/core/contents/homeassistant/components/aladdin_connect?ref=2024.6.4' | jq -r '.[].download_url' | xargs -n1 curl -O
    
  5. Add a version to manifest.json:
    jq '.version = "0.0.1"' manifest.json > manifest.tmp && mv manifest.tmp manifest.json
    
  6. Restart Home Assistant.
7 Likes

Not familiar with custom componentsā€¦ Does that mean the custom one with version 0.0.1 would automatically supersede the newer one that comes with 2024.7.x, even though they share the same name aladin_connect?

Do I need to re-configure the aladin_connect integration? Or whatever Iā€™ve setup already would automatically start using the custom component codes from 2024.6.4?

Just trying to understand what would get myself into.

It will override the built in.

It shouldnā€™t need to be re-configured.

1 Like

I tried this, but get the following error:

Logger: homeassistant.setup
Source: setup.py:322
First occurred: 8:32:30 AM (1 occurrences)
Last logged: 8:32:30 AM

Setup failed for custom integration 'aladdin_connect': Unable to import component: No module named 'genie_partner_sdk'
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/homeassistant/setup.py", line 322, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/loader.py", line 1027, in async_get_component
    self._component_future.result()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/loader.py", line 1007, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/loader.py", line 1067, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/aladdin_connect/__init__.py", line 5, in <module>
    from genie_partner_sdk.client import AladdinConnectClient
ModuleNotFoundError: No module named 'genie_partner_sdk'

1 Like

Also, Iā€™m getting the following error in my logs now that integration has been removedā€¦

Logger: homeassistant.config_entries
Source: config_entries.py:911
First occurred: 9:31:08 AM (1 occurrences)
Last logged: 9:31:08 AM

Migration handler not found for entry [email protected] for aladdin_connect

How do I get rid of this error?

I canā€™t say how much I appreciate this!

Iā€™ve been on 2024.6.4, unwilling to update until I had the chance to sort this out, and your instructions made this so much easier! So, I did the core update to 2024.7.3, and then immediately followed your instructions. (Aladdin Connect was configured and working previously).

I used the Advanced SSH & Web Terminal add-on to access CLI. The only difference from that interface was that the homeassistant directory is at /homeassistant, but your hint about same directory w/configuration.yaml got me on track.

Otherwise I was able to follow the directions to the T, and all worked out well! Iā€™ve got everything else updated, restarted, and no errors related to Aladdin Connect. Thanks @_Vynce!

1 Like

Thank you @_Vynce for these directions. I stopped upgrading at 2024.6 as I was afraid of loosing this integration since it was removed in 2024.7. Today I was able to follow your directions and then upgrade to 2024.8 and my garage door control still works! Thanks for taking the time to write up those step by step directions!

Thanks, this worked for me too. I could have sworn this was working with a new API very recently thoughā€¦Iā€™m curious what happened?

They used something in the integration that wasnā€™t licensed correctly so they had to remove the official one.

1 Like

The fact is that alladin refuse to license their code under an open source licence.

Just last year Chamberlain (myQ) forced their integration to stop working. At the time, Aladdin was happy to tell users that their API would remain open to HA and other platforms. Then they did a complete U-turn and work against open platforms or just make it all difficult to use. I suspect some corporate higher ups (who likely donā€™t care to understand this very well) made some blanket decision to appear tough on hackers or some other BS security nonsense to justify keeping their walled garden (of exactly one device) so they could eventually monetize it as a service someday. Disappointing.

Unfortunately, it is impossible to get step one to work :frowning:

You canā€™t type login?

What do you see and experience. ā€œDoesnā€™t workā€ is unhelpful.

Wait, what have you tried exactly? Can you elaborate? I have no problem on the step 1 here.

Well, the only two admin logins I know of (the default homeassistant for SSH, and my user for the HA web interface) do not work for login.


Iā€™ve also seen that youā€™re required to change the port to 22222 and Iā€™ve seen that youā€™re forced to use certificates for authentication rather than a login.

I think I tried making that work for about 5 hours and I canā€™t get passed. Disconnected: No supported authentication methods available (server sent: publickey; keyboard-interactive) when I enter the user homeassistent (or just by pressing enter with nothing in the field).
Keep in mind though this part is just attempting to login to SSH.

So this is why. The login would work when you plug a keyboard and a monitor to your HA metal box. Not web interface, nor SSH.

If you do VM install, then there must be a way to get to the local console (aka Home Assistant CLI) of your VM - as if you have a monitor and a keyboard to your VM.

You donā€™t need to do the login step.

Just go to the terminal and type

cd /config/

Then proceed from step 3.

1 Like

Thank you!

I am using HA Docker Container, and updated to 2024.9.2 to try and fix a different issue, not realizing the aladdin connect that was working fine in the 2024.6 version would get dropped.

I tried this custom component, but I am having an error with the genie-partner-sdk library. I tried to manually install in on my system, and 1.0.2 does not work with python3.12, so I installed version 1.0.4, and upped the version in the custom component library, but home assistant is giving me this error:

2024-09-18 12:27:29.865 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package genie-partner-sdk==1.0.4: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/.local'
Check the permissions.
2024-09-18 12:27:29.866 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'aladdin_connect': Requirements for aladdin_connect not found: ['genie-partner-sdk==1.0.4'].

Is there a way to just download the library into the custom_component folder and reference it locally?