Google Home UI Automator
Project description
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
- Turn on User Debugging mode on your android phone.
- Connect your android phone to computer.
Google Home App
- You need to install Google Home App on your Android phone.
- Login to your Google Home App.
- Make sure the Google Home App's version is between
3.1.1.14
and3.24.1.4
.
NOTE: Please select the correct Google account on Google Home App.
Installation
PyPI (recommended)
$ pip install google-home-ui-automator
Build from source code
-
clone this repo.
$ git clone https://testsuite-smarthome-matter.googlesource.com/ui-automator
-
cd
to the folder. -
Run
pip install .
Usage
Commissioning Matter device
Follow the steps below to automatically commission a matter device.
$ 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.
$ 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.
$ 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 timesREPEAT_TIMES
: repeated times for regression test
- optionally add
--hub
to include hub version in produced test reportHUB_VERSION
: version of hub for controlling devices on GHA
- optionally add
--dut
to include device under test in produced test reportMODEL
: 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 reportDEVICE_FIRMWARE
: Firmware of test device.
Roadmap
- Commissioning Matter device
- Decommissioning Matter device
- 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 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file google-home-ui-automator-1.0.4.tar.gz
.
File metadata
- Download URL: google-home-ui-automator-1.0.4.tar.gz
- Upload date:
- Size: 4.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 554b9f0b3f1afc04ef443716425fe08545804fca052e77d3548fce46e57bac1f |
|
MD5 | b771af1d3effe67307d66e5d816212f8 |
|
BLAKE2b-256 | be25498453095ffc814624d69c92ab5fa8e3465e216dfa38b1c024aef78d561b |