# Google Home UI Automator
Google Home Automator can help you automate your Google Home App.
## Getting Started
### Prerequisites
#### Python 3
You need a python 3 environment to run the script.
Google Home UI Automator requires python 3.11 or newer.
#### Android phone
1. Turn on ***User Debugging*** mode on your android phone.
1. Connect your android phone to computer.
#### Google Home App
1. You need to install Google Home App on your Android phone.
1. Login to your Google Home App.
1. Make sure the Google Home App's version is between `3.1.1.14` and `3.24.1.4`.
NOTE: Please select the correct Google account on Google Home App.
### Installation
#### PyPI (recommended)
```shell
$ pip install google-home-ui-automator
```
#### Build from source code
1. clone this repo.
```shell
$ git clone https://testsuite-smarthome-matter.googlesource.com/ui-automator
```
2. `cd` to the folder.
3. Run `pip install .`
## Usage
### Commissioning Matter device
Follow the steps below to automatically commission a matter device.
```shell
$ ui-automator --commission DEVICE_NAME,PAIRING_CODE,ROOM_NAME
```
* `DEVICE_NAME`: desired Matter device, e.g. `m5stack`
* `PAIRING_CODE`: pairing code of your Matter device, e.g. `34970112332`
* `ROOM_NAME`: room that is going to be assigned, e.g. `Office`
### Decommissioning Matter device
Follow the steps below to decommission a matter device.
```shell
$ ui-automator --decommission DEVICE_NAME
```
* `DEVICE_NAME`: display name of commissioned Matter device on GHA, e.g. `m5stack`
### Regression Test
Follow the steps below to run a regression test.
```shell
$ ui-automator --commission DEVICE_NAME,PAIRING_CODE,ROOM_NAME --regtest [--repeat <REPEAT_TIMES>] [--hub <HUB_VERSION>] [--dut <MODEL>,<TYPE>,<PROTOCOL>] [--fw <DEVICE_FIRMWARE>]
```
* flag `--regtest` is required
* regression test need to be used with flag `--commission`
* regression test now only supports commissioning/decommissioning cycle
* defaultly, regression test will run until users use keyboard interrupt to
stop the process
* optionally add `--repeat` to run regression test in limited times
* `REPEAT_TIMES`: repeated times for regression test
* optionally add `--hub` to include hub version in produced test report
* `HUB_VERSION`: version of hub for controlling devices on GHA
* optionally add `--dut` to include device under test in produced test report
* `MODEL`: Model of the device. e.g. `X123123`
* `TYPE`: Type of the device. e.g. `LIGHT`
* `PROTOCOL`: Used protocol of the device. e.g. `MATTER`
* optionally add `--fw` to include device firmware in produced test report
* `DEVICE_FIRMWARE`: Firmware of test device.
## Roadmap
- [x] Commissioning Matter device
- [x] Decommissioning Matter device
- [x] Regression test of cycling commissioning/decommissioning
- [ ] Support regression test for devices that need additionally manual
operations after decommissioning to recover to BLE commissioning mode
- [ ] Share Fabric
- [ ] Get pairing code when sharing fabric
## Notice
* While UI Automation is processing, interfering android phone with any UI
operation might fail the automation.
## Report issue
- Click
[here](https://issuetracker.google.com/issues/new?component=655104&template=1694023)
to report any encountered issues.
## Disclaimer
This project is not an official Google project. It is not supported by
Google and Google specifically disclaims all warranties as to its quality,
merchantability, or fitness for a particular purpose.
Raw data
{
"_id": null,
"home_page": "https://testsuite-smarthome-matter.googlesource.com/ui-automator/",
"name": "google-home-ui-automator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Google LLC",
"author_email": "google-home-testsuite-dev+ui-automator@google.com",
"download_url": "https://files.pythonhosted.org/packages/be/25/498453095ffc814624d69c92ab5fa8e3465e216dfa38b1c024aef78d561b/google-home-ui-automator-1.0.4.tar.gz",
"platform": null,
"description": "# Google Home UI Automator\n\nGoogle Home Automator can help you automate your Google Home App.\n\n## Getting Started\n\n### Prerequisites\n\n#### Python 3\n\nYou need a python 3 environment to run the script.\nGoogle Home UI Automator requires python 3.11 or newer.\n\n#### Android phone\n\n1. Turn on ***User Debugging*** mode on your android phone.\n1. Connect your android phone to computer.\n\n#### Google Home App\n\n1. You need to install Google Home App on your Android phone.\n1. Login to your Google Home App.\n1. Make sure the Google Home App's version is between `3.1.1.14` and `3.24.1.4`.\n\nNOTE: Please select the correct Google account on Google Home App.\n\n### Installation\n\n#### PyPI (recommended)\n```shell\n$ pip install google-home-ui-automator\n```\n\n#### Build from source code\n1. clone this repo.\n\n ```shell\n $ git clone https://testsuite-smarthome-matter.googlesource.com/ui-automator\n ```\n2. `cd` to the folder.\n3. Run `pip install .`\n\n## Usage\n\n### Commissioning Matter device\n\nFollow the steps below to automatically commission a matter device.\n\n```shell\n$ ui-automator --commission DEVICE_NAME,PAIRING_CODE,ROOM_NAME\n```\n* `DEVICE_NAME`: desired Matter device, e.g. `m5stack`\n* `PAIRING_CODE`: pairing code of your Matter device, e.g. `34970112332`\n* `ROOM_NAME`: room that is going to be assigned, e.g. `Office`\n\n### Decommissioning Matter device\n\nFollow the steps below to decommission a matter device.\n\n```shell\n$ ui-automator --decommission DEVICE_NAME\n```\n* `DEVICE_NAME`: display name of commissioned Matter device on GHA, e.g. `m5stack`\n\n### Regression Test\n\nFollow the steps below to run a regression test.\n\n```shell\n$ ui-automator --commission DEVICE_NAME,PAIRING_CODE,ROOM_NAME --regtest [--repeat <REPEAT_TIMES>] [--hub <HUB_VERSION>] [--dut <MODEL>,<TYPE>,<PROTOCOL>] [--fw <DEVICE_FIRMWARE>]\n```\n\n* flag `--regtest` is required\n* regression test need to be used with flag `--commission`\n* regression test now only supports commissioning/decommissioning cycle\n* defaultly, regression test will run until users use keyboard interrupt to\n stop the process\n* optionally add `--repeat` to run regression test in limited times\n * `REPEAT_TIMES`: repeated times for regression test\n* optionally add `--hub` to include hub version in produced test report\n * `HUB_VERSION`: version of hub for controlling devices on GHA\n* optionally add `--dut` to include device under test in produced test report\n * `MODEL`: Model of the device. e.g. `X123123`\n * `TYPE`: Type of the device. e.g. `LIGHT`\n * `PROTOCOL`: Used protocol of the device. e.g. `MATTER`\n* optionally add `--fw` to include device firmware in produced test report\n * `DEVICE_FIRMWARE`: Firmware of test device.\n\n## Roadmap\n\n- [x] Commissioning Matter device\n- [x] Decommissioning Matter device\n- [x] Regression test of cycling commissioning/decommissioning\n- [ ] Support regression test for devices that need additionally manual\n operations after decommissioning to recover to BLE commissioning mode\n- [ ] Share Fabric\n- [ ] Get pairing code when sharing fabric\n\n## Notice\n\n* While UI Automation is processing, interfering android phone with any UI\n operation might fail the automation.\n\n## Report issue\n\n- Click\n [here](https://issuetracker.google.com/issues/new?component=655104&template=1694023)\n to report any encountered issues.\n\n## Disclaimer\n\nThis project is not an official Google project. It is not supported by\nGoogle and Google specifically disclaims all warranties as to its quality,\nmerchantability, or fitness for a particular purpose.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Google Home UI Automator",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://testsuite-smarthome-matter.googlesource.com/ui-automator/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "be25498453095ffc814624d69c92ab5fa8e3465e216dfa38b1c024aef78d561b",
"md5": "b771af1d3effe67307d66e5d816212f8",
"sha256": "554b9f0b3f1afc04ef443716425fe08545804fca052e77d3548fce46e57bac1f"
},
"downloads": -1,
"filename": "google-home-ui-automator-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "b771af1d3effe67307d66e5d816212f8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 4404404,
"upload_time": "2024-10-23T03:47:55",
"upload_time_iso_8601": "2024-10-23T03:47:55.583246Z",
"url": "https://files.pythonhosted.org/packages/be/25/498453095ffc814624d69c92ab5fa8e3465e216dfa38b1c024aef78d561b/google-home-ui-automator-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-23 03:47:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "google-home-ui-automator"
}