Yihao YH002-A
Yihao YH002-A is a smart rope-driven motor for retrofitting chain-operated window coverings. It motorizes existing roller blinds, Roman blinds, zebra blinds, vertical blinds, and Venetian blinds, providing remote control, scheduled operation, and integration with the Shelly ecosystem.
The following components are available in Yihao YH002-A:
- System
- WiFi
- Bluetooth Low Energy
- Cloud
- MQTT
- Outbound Websocket
- Cover (
cover:0) - see notes below - Virtual components
- BTHome components
- Up to 10 instances of Script
Cover - device-specific changes
The Cover component on Yihao YH002-A is based on the standard Cover, but tailored for a DC chain-driven motor without physical inputs, power metering, temperature monitoring or slat support. Most of the standard Cover behavior, methods and webhook events apply as documented, with the following exceptions:
- The
Cover.CalibrateRPC method is not available - the end positions (limits) are configured directly on the device itself and preserved across power cycles. - The
Cover.GetConfigandCover.GetStatusresponses include only the subset of properties listed in Configuration and Status below.
Configuration
The configuration of the Cover component on Yihao YH002-A contains only the following properties (a subset of the standard Cover configuration):
| Property | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| number | The numeric ID of the | ||||||
| string | Name of the | ||||||
| object | Configuration of the | ||||||
| string | Defines the | ||||||
| boolean | Defines the motor rotation for open and close directions (changing this parameter requires a reboot):
| ||||||
| boolean | Can be used to temporarily freeze all motions for maintenance:
|
Status
The status of the Cover component on Yihao YH002-A contains only the following properties (a subset of the standard Cover status):
| Property | Type | Description |
|---|---|---|
| number | The numeric ID of the |
| string | Source of the last command |
| string or null | Tag used to identify the origin of a state change |
| string | One of |
| boolean | Always |
| string or null | Direction of the last movement: |
| number or null | Current position in percent from 0 (fully closed) to 100 (fully open); null if the position is unknown |
| number or null | Only present if |
| number | Seconds, only present if |
| number | Only present if Cover is actively moving in either open or closed directions. Represents the time at which the movement has begun |
Examples
Cover.SetConfig example
- Cover.SetConfig HTTP GET Request
- Cover.SetConfig Curl Request
- Cover.SetConfig Mos Request
http://192.168.33.1/rpc/Cover.SetConfig?id=0&config={"name":"Living Room Blinds","invert_directions":false}
curl -X POST -d '{"id":1,"method":"Cover.SetConfig","params":{"id":0,"config":{"name":"Living Room Blinds","invert_directions":false}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Cover.SetConfig '{"id":0,"config":{"name":"Living Room Blinds","invert_directions":false}}'
Response
- Cover.SetConfig HTTP GET Response
- Cover.SetConfig Curl Response
- Cover.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Cover.GetConfig example
- Cover.GetConfig HTTP GET Request
- Cover.GetConfig Curl Request
- Cover.GetConfig Mos Request
http://192.168.33.1/rpc/Cover.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"Cover.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Cover.GetConfig '{"id":0}'
Response
- Cover.GetConfig HTTP GET Response
- Cover.GetConfig Curl Response
- Cover.GetConfig Mos Response
{
"id": 0,
"name": null,
"motor": {},
"initial_state": "stopped",
"invert_directions": false,
"maintenance_mode": false
}
{
"id": 1,
"params": {
"id": 0,
"name": null,
"motor": {},
"initial_state": "stopped",
"invert_directions": false,
"maintenance_mode": false
}
}
{
"id": 0,
"name": null,
"motor": {},
"initial_state": "stopped",
"invert_directions": false,
"maintenance_mode": false
}
Cover.GetStatus example
- Cover.GetStatus HTTP GET Request
- Cover.GetStatus Curl Request
- Cover.GetStatus Mos Request
http://192.168.33.1/rpc/Cover.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"Cover.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Cover.GetStatus '{"id":0}'
Response
- Cover.GetStatus HTTP GET Response
- Cover.GetStatus Curl Response
- Cover.GetStatus Mos Response
{
"id": 0,
"source": "gesture",
"tag": null,
"state": "stopped",
"pos_control": true,
"last_direction": "open",
"current_pos": 15
}
{
"id": 1,
"params": {
"id": 0,
"source": "gesture",
"tag": null,
"state": "stopped",
"pos_control": true,
"last_direction": "open",
"current_pos": 15
}
}
{
"id": 0,
"source": "gesture",
"tag": null,
"state": "stopped",
"pos_control": true,
"last_direction": "open",
"current_pos": 15
}