Skip to main content
Version: 1.0

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:

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.Calibrate RPC method is not available - the end positions (limits) are configured directly on the device itself and preserved across power cycles.
  • The Cover.GetConfig and Cover.GetStatus responses 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):

PropertyTypeDescription

id

number

The numeric ID of the Cover component instance

name

string

Name of the Cover component instance

motor

object

Configuration of the Cover motor. On this device the object has no user-configurable properties and is returned as an empty object.

initial_state

string

Defines the Cover target state on power-on, one of open (Cover will fully open), closed (Cover will fully close) or stopped (Cover will not change its position)

invert_directions

boolean

Defines the motor rotation for open and close directions (changing this parameter requires a reboot):

ValueDescription

false

On open the motor rotates clockwise, on close the motor rotates counter-clockwise

true

On open the motor rotates counter-clockwise, on close the motor rotates clockwise

maintenance_mode

boolean

Can be used to temporarily freeze all motions for maintenance:

ValueDescription

false

Normal mode, the device is operational.

true

Maintenance mode, the device will not respond to any movement commands or inputs.

Status

The status of the Cover component on Yihao YH002-A contains only the following properties (a subset of the standard Cover status):

PropertyTypeDescription

id

number

The numeric ID of the Cover component instance

source

string

Source of the last command

tag

string or null

Tag used to identify the origin of a state change

state

string

One of open (Cover is fully open), closed (Cover is fully closed), opening (Cover is actively opening), closing (Cover is actively closing), stopped (Cover is not moving, and is neither fully open nor fully closed, or the open/close state is unknown)

pos_control

boolean

Always true on this device - the Cover supports absolute positioning

last_direction

string or null

Direction of the last movement: open, close or null when unknown

current_pos

number or null

Current position in percent from 0 (fully closed) to 100 (fully open); null if the position is unknown

target_pos

number or null

Only present if Cover is actively moving to a requested position. Represents the target position in percent from 0 (fully closed) to 100 (fully open); null if the target position has been reached or the movement was canceled

move_timeout

number

Seconds, only present if Cover is actively moving. Cover will automatically stop after the timeout expires

move_started_at

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

http://192.168.33.1/rpc/Cover.SetConfig?id=0&config={"name":"Living Room Blinds","invert_directions":false}

Response

{
"restart_required": false
}

Cover.GetConfig example

http://192.168.33.1/rpc/Cover.GetConfig?id=0

Response

{
"id": 0,
"name": null,
"motor": {},
"initial_state": "stopped",
"invert_directions": false,
"maintenance_mode": false
}

Cover.GetStatus example

http://192.168.33.1/rpc/Cover.GetStatus?id=0

Response

{
"id": 0,
"source": "gesture",
"tag": null,
"state": "stopped",
"pos_control": true,
"last_direction": "open",
"current_pos": 15
}