YoLink client using the Version 2 of the API.
python3 -m pip install -r requirements.txt
First ensure that you can run the standalone YoLink script. If that succeeds, proceed to docker if you want.
You will need YoLink account secrets: - UA ID - SEC ID
Populate the yolink_config.json
with your credentials.
cd <your_path>/YoLinkAPI_V2/src
python3 main.py --config yolink_config.json --debug
Assuming that you already have Docker setup.
Build the docker image
./build_docker_image.sh
Like previously mentioned, you will need to provide UA ID and SEC ID to your config file.
Start docker container
./start_docker_container.sh <PATH_TO_YOUR_CONFIG_FILE>
Modify the paths start_yolinkv2.sh
script to match your environment.
sudo cp yolinkv2ha.service /etc/systemd/system/
sudo systemctl enable yolinkv2ha.service
sudo systemctl start yolinkv2ha.service
sudo systemctl status yolinkv2ha.service
Utility script to obtain all the devices linked to your account as well as the home id. This step can be completely ignored.
Only if you are interested in seeing what devices are linked to your YoLink account.
cd <your_path>/YoLinkAPI_V2/src/utils
PYTHONPATH=<path_to>/YoLinkAPI_V2/src \
python3 yolink_utils.py \
--config yolink_config.json \
--devices