UNPKG

node-red-contrib-xmihome

Version:

Node-RED nodes for controlling Xiaomi Mi Home devices using the xmihome library.

49 lines (40 loc) 2.23 kB
<script type="text/markdown" data-help-name="xmihome-config" data-lang="en-US"> <!-- markdownlint-disable-file MD041 --> Configures the connection to your Xiaomi Mi Home account to access devices via the cloud, local network (MiIO), or Bluetooth. ### Configuration #### Authentication You can provide your credentials in two ways, selected from the **Credentials Source** dropdown: - **Enter Manually**: This is the standard method where you enter your account details directly in Node-RED. - **Username**: Your Xiaomi account login (Email, phone, or account ID). - **Password**: Your Xiaomi account password. - **Country**: The server region your account is bound to. **It is crucial to select the correct region**, otherwise, your devices will not be found in the cloud. Available regions: `ru`, `cn`, `de`, `us`, `sg`, `tw`. - **Use CLI File**: This method uses a credentials file generated by the `xmihome` command-line tool. It is more secure as it avoids storing your password directly in Node-RED. - **Credentials File Path**: The path to the `credentials.json` file. This file is created by running the `xmihome login` command. This information is **only** required for fetching the device list from the cloud or for controlling devices in "Cloud" mode. If you plan to use only local control (MiIO/Bluetooth) with manually entered parameters, you can leave these fields blank. #### Defaults - **Default mode**: Specifies the default connection method to be used for all devices if a specific mode is not selected in the `Device` node. - **Auto**: The library will attempt to determine the best connection method based on the provided device data (IP and token for MiIO, MAC for Bluetooth, ID for Cloud). - **Cloud**: Forces the use of the Xiaomi Cloud API. Requires authentication to be configured. - **MiIO**: Forces the use of the local MiIO protocol. Requires the device's IP address and token. - **Bluetooth**: Forces the use of Bluetooth LE. Requires the device's MAC address and model. #### Debugging - **Enable debug**: Activates detailed logging of the library's operations in the Node-RED debug panel. Useful for diagnosing issues. </script>