[Deprecated] Use YoLink API V2: https://github.com/Tonio101/YoLinkAPI_V2
Simple script that will integrate to YoLink IoT devices via MQTT protocol.
- Raspberry Pi (or any Linux enviroment)
- YoLink Hub + Door Sensors
- YoLink Garage Door Sensor
As mentioned in the API documentation wiki, contact Chi Yao ([email protected])
to request your YoLink account API keys.
KEEP YOUR YOLINK ACCOUNT API KEYS SECURED!
Ensure you have the following information: Required YoLink Account API Keys:
- CSID
- CSName
- CSSecKey
- SVR_URL
Using a QR Code Scanner, gather all the IoT device(s) serial number (32 char code).
List them somewhere as they will be required to enable the API for each device.
YoLink API Documentation
YoLink supports both HTTP callback API (webhook) or MQTT report topic.
This script will go over subscribing to the YoLink MQTT broker topic to receive
sensor events such as open/close.
Install python required modules:
/usr/bin/python3 -m pip install -r requirements.txt
Add your credentials and the IoT device(s) serial number to yolink_data.yml
.
/usr/bin/python3 yolink.py --config yolink_data.yml --debug