Skip to content

bostrt/homebridge-bali-blinds

Repository files navigation

Homebridge Plugin for Bali Blinds

This is a Homebridge plugin for Bali Blinds. The Bali Motorization mobile application used to control the blinds only supports Amazon Alex and Google Assistant (as of 2023) hence this plugin's existence.

(Thanks @hjdhjd, I copied some of your Install and Configuration section 😄)

Installation

If you have installed the Homebridge Config UI, you can intall this plugin by going to the Plugins tab and searching for homebridge-bali-blinds and installing it.

Or, if you prefer to install homebridge-bali-blinds from the command line, you can do so by executing:

sudo npm install -g homebridge-bali-blinds

Configuration

I strongly recommend using the Homebridge Config UI rather than editing your config.json directly. It does a good job of showing you all the options and always generating a valid configuration so you don't get stuck on typos or looking for stray commas in your config.json.

For those that prefer configuring things directly, add the accessory in config.json in your home directory inside .homebridge.

    "platforms": [
        {
            "gateways": [
                {
                    "baliUsername": "your-username",
                    "baliPassword": "your-password",
                    "baliGatewayId": "12345678", // Optional
                    "lowBattery": 33 // Optional
                }
            ],
            "platform": "BaliBlinds"
        }
    ]

Options

  • baliUsername: (Required) Username from Bali Motorization mobile app. It is recommended creating a new user in mobile app with "Basic User" permission levels since no Admin or Advanced permissions are required by this plugin.
  • baliPassword: (Required) Password for the user above.
  • baliGatewayId: (Optional) The Bali Gateway ID. This can be found in your Bali Motorization mobile app. If you do not specify a Gateway ID, then the first one associated with your account is automatically used.
  • lowBattery: (Optional) Default 33%. The percentage threshold at which the low battery status will be set on Homebridge blinds accessories.

Multiple Gateways

If you have multiple Bali Gateways/Hubs, you can add each one to your configuration. You can do this in the Homebridge Config UI but clicking the "Add to Gateways" button.

Screenshot of Homebridge UI

Alternatively, you can add a new sectino to the gateways array like this:

    "platforms": [
        {
            "gateways": [
                {
                    "baliUsername": "your-username",
                    "baliPassword": "your-password",
                    "baliGatewayId": "12345678", // Optional
                    "lowBattery": 33 // Optional
                },
                {
                    "baliUsername": "your-username",
                    "baliPassword": "your-password",
                    "baliGatewayId": "98765432", // Optional
                    "lowBattery": 33 // Optional
                }
            ],
            "platform": "BaliBlinds"
        }
    ]

Where do I find my Gateway ID?

In the Bali Motorization mobile app, you can find it on the home login screen where you select the gateway to connect to:

Fun Facts and Random Bits

I'm not an expert with IoT products, MiOS, Ezlo, Vera, or really any of the technologies used in this plugin. If you see something that doesn't make sense or could be improved please let me know by opening a GitHub issue to discuss.

Plugin Design

The design of this plugin is that it communicates with an HTTP API hosted by MiOS and Ezlo. This HTTP API is connected (polled I think) to the Bali Gateway device (Ezlo Atom) that communicates ZWave with the blinds. At first, I considered this solution pretty round-about when I could just speak ZWave directly to the blinds from Homebridge but I believe there is some benefit to not requiring more hardware. If you already have a ZWave device connected to Homebridge there are probably other plugins you can use to benefit from the direct communication.

flowchart LR;
	A[Homebridge Plugin] --> B[MiOS/Ezlo HTTP API];
	B <--> C[Bali Gateway*];
	C --> D[ZWave];
	D --> E[Blinds];
	F[Mobile App] --> B;
	G[Physical Remote**] --> C;
Loading
* Bali Gateway is an Ezlo Atom hub usb device
** The physical remote is Somfy brand device

Documentation and References

During development of this plugin I used various references including but not limited to:

Development

See DEVELOPMENT.md

Plugin Development Dashboard

GitHub GitHub Workflow Status npm Libraries.io dependency status for latest release