Aladdin Garage Door Controller

Tags: #<Tag:0x00007faf7b706f20>

I recently purchased an Aladdin Garage Door Controller. I would like to incorporate it into OpenHAB, but haven’t found a way to do it. Has anyone else looked into this controller?

Thanks.

Somebody would need to volunteer to write a binding. I see Home Assistant has a binding. Perhaps somebody could get hints from their Python based binding.

It looks like the HA integration depends on this Python library and a quick perusal of the code it looks like it uses an cloud based API. If a binding is beyond what you think you can manage, there are other alternatives.

  • set it up as an external script that you access using the Exec binding, executeCommandLine, or if it needs to stay running, using something like MQTT (see https://github.com/rkoshak/sensorReporter for a platform that would be easier to integrate with than an OH binding).

  • Import the library and use it from JSR223 Jython rules. This assumes it isn’t doing anything Python 3 specific.

  • See if there is support in some other system that OH can integrate with like NodeRed.

1 Like

I recently bought a house with one of these garage door openers already installed.

I just got around to configuring it in the Aladdin Connect app and confirmed that it works as it should.

I then took a look at the aladdin-connect python library. Despite it not having been updated for a while, I was able to use the example code without issue to query my garage door status.

I will spend some time in the near future working up a more functional script and integrating it with my OpenHAB system and will post some updates when I get it working.

1 Like

@T.Hutchins,

I got this working yesterday, I had to modify a couple of scripts to do this. This is what I came up with:

Go to this site and follow the instructions to get the necessary information:

I will let you know that I could not find the portal key (cik) by using these instructions, but I was able to find it when I logged into my Genie Aladdin Connect account.

These are what I use for my items:

Switch	    Sh_Garage_Door_Open         "Garage Door Open"                                      <garagedoor-open>	                            		    [ "Switchable" ]        // proxy item to control rule for garage door.
Switch	    Sh_Garage_Door_Close        "Garage Door Close"                                     <garagedoor-close>	                            		    [ "Switchable" ]        // proxy item to control rule for garage door.

These are my Rules:

rule "open garage door"
when
    Item Sh_Garage_Door_Open changed from OFF to ON
then
    val telegramAction = getActions("telegram","telegram:telegramBot:23707ee5")
        executeCommandLine=("/etc/openhab2/scripts/garage-open.sh")
        Sh_Garage_Door_Close.sendCommand(OFF)
        telegramAction.sendTelegram(XXXXXXXXXL,"Garage door has been opened")
        logInfo("doors","garage door has been opened")
end

rule "close garage door"
when
    Item Sh_Garage_Door_Close changed from OFF to ON
then
    val telegramAction = getActions("telegram","telegram:telegramBot:23707ee5")
        executeCommandLine=("/etc/openhab2/scripts/garage-closed.sh")
        Sh_Garage_Door_Open.sendCommand(OFF)
        telegramAction.sendTelegram(XXXXXXXXXL,"Garage door has been closed")
        logInfo("doors","garage door has been closed")
end

Here are the scripts, you will need to change your [YOUR TOKEN HERE], [YOUR CIK], [YOUR DEVICE ID] and [YOUR ACCOUNT EMAIL ADDRESS].
garagedoorOpen.sh:

#!/bin/bash
curl --location --request POST 'https://genie.m2.exosite.com/onep:v1/rpc/process' \
--header 'AppVersion: 2.10.1' \
--header 'BundleName: com.geniecompany.AladdinConnect' \
--header 'User-Agent: Aladdin Connect Android v2.10.1'\''' \
--header 'BuildVersion: 131' \
--header 'Authorization: Token: [YOUR TOKEN HERE]' \
--header 'Content-Type: application/json' \
--data '{
    "auth": {
        "cik": "[YOUR CIK]",
        "client_id": "[YOUR DEVICE ID]"
    },
    "calls": [
    	{
            "arguments": [
                {
                    "alias": "dps1.desired_status"
                },
                "1"
            ],
            "id": 1,
            "procedure": "write"
        },
        {
            "arguments": [
                {
                    "alias": "dps1.desired_status_user"
                },
                "[YOUR ACCOUNT EMAIL ADDRESS]"
            ],
            "id": 2,
            "procedure": "write"
        }
	]
}'

garageDoorClose.sh:

#!/bin/bash
curl --location --request POST 'https://genie.m2.exosite.com/onep:v1/rpc/process' \
--header 'AppVersion: 2.10.1' \
--header 'BundleName: com.geniecompany.AladdinConnect' \
--header 'User-Agent: Aladdin Connect Android v2.10.1'\''' \
--header 'BuildVersion: 131' \
--header 'Authorization: Token: [YOUR TOKEN HERE]' \
--header 'Content-Type: application/json' \
--data '{
    "auth": {
        "cik": "[YOUR CIK]",
        "client_id": "[YOUR DEVICE ID]"
    },
    "calls": [
    	{
            "arguments": [
                {
                    "alias": "dps1.desired_status"
                },
                "0"
            ],
            "id": 1,
            "procedure": "write"
        },
        {
            "arguments": [
                {
                    "alias": "dps1.desired_status_user"
                },
                "[YOUR ACCOUNT EMAIL ADDRESS]"
            ],
            "id": 2,
            "procedure": "write"
        }
	]
}'

If you notice, the only difference between the two scripts is the value of the number in “arguments”, close = 0, open = 1.
Sitemap looks like this:

Switch item=Sh_Garage_Door_Open visibility=[Sh_Garage_Door_Close==ON]
Switch item=Sh_Garage_Door_Close visibility=[Sh_Garage_Door_Open==ON]

I am sure that there is a more elegant way to do this, but like I said, I just started yesterday and this is what I came up with. I did put Alexa tags in my items file, but it’s a little awkward to tell Alexa to “turn on garage door open”. I look forward to see what you came up with.

~John

1 Like

Hi John,

Just thought I’d ask, were you ever able to “refine” your process? If not, no biggie. Sometimes, just getting it to work is enough… :wink:

Todd