Shutter control

Blinds are controlled through the mesh-model-shutter.

A blind is controlled by the slatters position (0-100%) and the angle (0-90°).

Set command

mesh models msg send-vnd-rsp 1 0x0015 0x04AA <addr> 0xD0 0xD3 <payload>

With :

  • <addr>: the destination address (Unicast address of the product + 1)

  • <payload>: <position> <angle> <tid>

Get command

mesh models msg send-vnd-rsp 1 0x0015 0x04AA <addr> <0xD2 0xD3

Status message

Set and get commands return a status message (opcode = 0xD3) with the payload as follow :

<current position> <current angle> <target position> <target angle>

Commands examples

# Set product (unicast address 0x003), position = 0x63, angle = 0x00
uart:~$ mesh models msg send-vnd-rsp 1 0x0015 0x04AA 0x0004 0xD0 0xD3 630000
tailroom 6 oplen 3 Hex_len 3
len: 4
payload: 00006300
cmd_end

# Get current position
uart:~$ mesh models msg send-vnd-rsp 1 0x0015 0x04AA 0x0004 0xD2 0xD3
tailroom 6 oplen 3 Hex_len 0
len: 4
payload: 635a6300
cmd_end

Calibration

Remote calibration can be performed through the mesh-model-feature-property. The feature and its properties are described in shutter-controller.

Given :

FEATURE_PROPERTY_SHUTTER_CONTROLLER_AUTOCALIBRATION = 0x8150
FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_UP = 0x8151
FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_DOWN = 0x8152
FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_ROTATION_ACW = 0x8155
FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_ROTATION_CW = 0x8156
FEATURE_PROPERTY_SHUTTER_CONTROLLER_ROTATION_STEP = 0x8157
FEATURE_PROPERTY_SHUTTER_CONTROLLER_REPORT_TIMEOUT = 0x8158

The gateway shell command to set calibrations would be :

mesh models msg send-vnd-rsp 1 0x0013 0x04AA <addr> 0xC2 0xC3 <payload>

With :

  • <addr>: the destination address (Unicast address of the product, because the feature property server model is on the element[0] in the product)

  • <payload>: <feature_index = 0x01> <property_id (little endian 16 bits)> <property_access = 0x03> <property_size = 0x04> <property_data (little endian 32 bits)>

Calibration up and down are in 20ms steps. Current applied values are 0x03D4

Calibration rotation acw and cw are in 20ms steps. Current applied values are 0x005A

Manual calibration examples

# shutter-controller-calibration-up
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 0151810304D4030000
*: tailroom 53 oplen 3 Hex_len 9
read len  10
read payload  000051810304d4030000
EOC

# shutter-controller-calibration-down
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 0152810304D4030000
*: tailroom 53 oplen 3 Hex_len 9
read len  10
read payload  000052810304d4030000
EOC

# shutter-controller-calibration-rotation-cw
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 01558103045A000000
*: tailroom 53 oplen 3 Hex_len 9
read len  10
read payload  0000558103045a000000
EOC

# shutter-controller-calibration-rotation-acw
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 01568103045A000000
*: tailroom 53 oplen 3 Hex_len 9
read len  10
read payload  0000568103045a000000
EOC

Auto-recalibration

The shutter can recalibrate itself when it performs a complete open/close cycle. It recalculates the calibration-up and down values. Rotation calibrations are not affected by the auto-calibration. To enable or disable the auto-calibration, change the FEATURE_PROPERTY_SHUTTER_CONTROLLER_AUTOCALIBRATION setting :

#auto-calibration on
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 015081030401000000
#auto-calibration off
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC2 0xC3 015081030400000000

Start auto-calibration

The auto-calibration (calibration up and down calcutation) can be performed by a short button press (SINRS). The blind then runs a complete up/down/up cycle. The same operation can be remotely performed by a mesh command using the FEATURE_PROPERTY_OPCODE_ADJUST opcode on the FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_UP or FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_DOWN values.

# start auto-calibration
mesh models msg send-vnd-rsp 1 0x0013 0x04AA 0x0003 0xC5 0xC3 0151810304D4030000
# the property values is ignored here

When the calibration is complete the calibrations up and down are returned in a unsollicited mesh status :

[00:53:24.683,837] <inf> model: from 0x0003 dst 0xc000 rssi -50 element 1, model 0x04aa0013 op 0xc304aa len 10: 000151810f04d7030000
=> FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_UP = 0x03D7
[00:53:25.965,484] <inf> model: from 0x0003 dst 0xc000 rssi -45 element 1, model 0x04aa0013 op 0xc304aa len 10: 000152810f04cc030000
=> FEATURE_PROPERTY_SHUTTER_CONTROLLER_CALIBRATION_DOWN = 0x03CC

Blind tilt settings

Blind tilt control can be performed by a switch long press. The rotation step is adjustable and is stored into the shutter-controller-rotation-step feature property (0 to 90 degrees). The setting is 0 by default.

Given :

FEATURE_PROPERTY_SHUTTER_CONTROLLER_ROTATION_STEP = 0x8157 # shutter-controller-rotation-step

Change the value by a mesh command from the gateway :

# Set shutter-controller-rotation-step (0x8157) = 20° (0x14)
=> mesh models msg send-vnd-rsp 1 0x0013 0x04AA 3 0xC2 0xC3 015781030414000000