Matter 1.2 chip-tool cluster
Usage:
chip-tool cluster_name command_name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Clusters: |
+-------------------------------------------------------------------------------------+
| * accesscontrol |
| * accountlogin |
| * actions |
| * administratorcommissioning |
| * any |
| * applicationbasic |
| * applicationlauncher |
| * audiooutput |
| * ballastconfiguration |
| * barriercontrol |
| * basicinformation |
| * binaryinputbasic |
| * binding |
| * booleanstate |
| * bridgeddevicebasicinformation |
| * channel |
| * clientmonitoring |
| * colorcontrol |
| * contentlauncher |
| * delay |
| * descriptor |
| * diagnosticlogs |
| * discover |
| * doorlock |
| * electricalmeasurement |
| * ethernetnetworkdiagnostics |
| * fancontrol |
| * faultinjection |
| * fixedlabel |
| * flowmeasurement |
| * generalcommissioning |
| * generaldiagnostics |
| * groupkeymanagement |
| * groupsettings |
| * groups |
| * identify |
| * illuminancemeasurement |
| * keypadinput |
| * levelcontrol |
| * localizationconfiguration |
| * lowpower |
| * mediainput |
| * mediaplayback |
| * modeselect |
| * networkcommissioning |
| * occupancysensing |
| * onoff |
| * onoffswitchconfiguration |
| * operationalcredentials |
| * otasoftwareupdateprovider |
| * otasoftwareupdaterequestor |
| * pairing |
| * payload |
| * powersource |
| * powersourceconfiguration |
| * pressuremeasurement |
| * proxyconfiguration |
| * proxydiscovery |
| * proxyvalid |
| * pulsewidthmodulation |
| * pumpconfigurationandcontrol |
| * relativehumiditymeasurement |
| * scenes |
| * softwarediagnostics |
| * subscriptions |
| * switch |
| * targetnavigator |
| * temperaturemeasurement |
| * tests |
| * thermostat |
| * thermostatuserinterfaceconfiguration |
| * threadnetworkdiagnostics |
| * timeformatlocalization |
| * timesynchronization |
| * unitlocalization |
| * unittesting |
| * userlabel |
| * wakeonlan |
| * wifinetworkdiagnostics |
| * windowcovering |
| * interactive |
| * storage |
+-------------------------------------------------------------------------------------+
恒温器 cluster可读属性 :
chip-tool thermostat read attribute-name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Attributes: |
+-------------------------------------------------------------------------------------+
| * local-temperature |
| * outdoor-temperature |
| * occupancy |
| * abs-min-heat-setpoint-limit |
| * abs-max-heat-setpoint-limit |
| * abs-min-cool-setpoint-limit |
| * abs-max-cool-setpoint-limit |
| * picooling-demand |
| * piheating-demand |
| * hvacsystem-type-configuration |
| * local-temperature-calibration |
| * occupied-cooling-setpoint |
| * occupied-heating-setpoint |
| * unoccupied-cooling-setpoint |
| * unoccupied-heating-setpoint |
| * min-heat-setpoint-limit |
| * max-heat-setpoint-limit |
| * min-cool-setpoint-limit |
| * max-cool-setpoint-limit |
| * min-setpoint-dead-band |
| * remote-sensing |
| * control-sequence-of-operation |
| * system-mode |
| * thermostat-running-mode |
| * start-of-week |
| * number-of-weekly-transitions |
| * number-of-daily-transitions |
| * temperature-setpoint-hold |
| * temperature-setpoint-hold-duration |
| * thermostat-programming-operation-mode |
| * thermostat-running-state |
| * setpoint-change-source |
| * setpoint-change-amount |
| * setpoint-change-source-timestamp |
| * occupied-setback |
| * occupied-setback-min |
| * occupied-setback-max |
| * unoccupied-setback |
| * unoccupied-setback-min |
| * unoccupied-setback-max |
| * emergency-heat-delta |
| * actype |
| * accapacity |
| * acrefrigerant-type |
| * accompressor-type |
| * acerror-code |
| * aclouver-position |
| * accoil-temperature |
| * accapacityformat |
| * generated-command-list |
| * accepted-command-list |
| * event-list |
| * attribute-list |
| * feature-map |
| * cluster-revision |
+-------------------------------------------------------------------------------------+
恒温器 cluster可写属性 :
[1699348881.521066][140605:140605] CHIP:TOO: Missing attribute name
Usage:
chip-tool thermostat write attribute-name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Attributes: |
+-------------------------------------------------------------------------------------+
| * hvacsystem-type-configuration |
| * local-temperature-calibration |
| * occupied-cooling-setpoint |
| * occupied-heating-setpoint |
| * unoccupied-cooling-setpoint |
| * unoccupied-heating-setpoint |
| * min-heat-setpoint-limit |
| * max-heat-setpoint-limit |
| * min-cool-setpoint-limit |
| * max-cool-setpoint-limit |
| * min-setpoint-dead-band |
| * remote-sensing |
| * control-sequence-of-operation |
| * system-mode |
| * temperature-setpoint-hold |
| * temperature-setpoint-hold-duration |
| * thermostat-programming-operation-mode |
| * occupied-setback |
| * unoccupied-setback |
| * emergency-heat-delta |
| * actype |
| * accapacity |
| * acrefrigerant-type |
| * accompressor-type |
| * acerror-code |
| * aclouver-position |
| * accapacityformat |
+-------------------------------------------------------------------------------------+
可读基础信息:
chip-tool basicinformation read attribute-name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Attributes: |
+-------------------------------------------------------------------------------------+
| * data-model-revision |
| * vendor-name |
| * vendor-id |
| * product-name |
| * product-id |
| * node-label |
| * location |
| * hardware-version |
| * hardware-version-string |
| * software-version |
| * software-version-string |
| * manufacturing-date |
| * part-number |
| * product-url |
| * product-label |
| * serial-number |
| * local-config-disabled |
| * reachable |
| * unique-id |
| * capability-minima |
| * product-appearance |
| * generated-command-list |
| * accepted-command-list |
| * event-list |
| * attribute-list |
| * feature-map |
| * cluster-revision
可写基础信息:
Usage:
chip-tool basicinformation write attribute-name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Attributes: |
+-------------------------------------------------------------------------------------+
| * node-label |
| * location |
| * local-config-disabled |
+-------------------------------------------------------------------------------------+
其他cluster 同上就不一一列举了;
chip-tool thermostat 部分测试命令:
//解析QRcode信息
chip-tool payload parse-setup-payload MT:-24J0AFN00KA0648G00
//chip-tool pairing ble-wifi node-id ssid password setup-pin-code discriminator
chip-tool pairing ble-wifi 1234 siter siter666888 20202021 3840
chip-tool pairing ble-wifi 1234 PDCN 0987654321 20202021 3840
chip-tool pairing ble-wifi 1234 siter siter666888 20202021 3840 --paa-trust-store-path /var/PAA_certificate.der
//断开连接设备 factory_reset只是清除Matter入网配置信息不会清除其他NVS写入的信息
chip-tool pairing unpair 1234
//读取本地温度
chip-tool thermostat read local-temperature 1234 1
//chip-tool thermostat write local-temperature-calibration attribute-values destination-id endpoint-id-ignored-for-group-commands
chip-tool thermostat write local-temperature-calibration 2300 1234 1 // 23 属性值 1234
//chip-tool thermostat write-by-id attribute-ids attribute-values destination-id endpoint-id-ignored-for-group-commands
//实时温度不支持写操作
chip-tool thermostat write-by-id 0x0 2500 1234 1
//chip-tool thermostat write system-mode attribute-values destination-id endpoint-id-ignored-for-group-commands
//设置当前模式为制冷
chip-tool thermostat write system-mode 3 1234 1
//chip-tool thermostat write-by-id attribute-ids attribute-values destination-id endpoint-id-ignored-for-group-commands
chip-tool thermostat write-by-id 0x1c 3 1234 1
//chip-tool thermostat read system-mode destination-id endpoint-ids
//读取当前模式
chip-tool thermostat read system-mode 1234 1
//chip-tool thermostat read cluster-revision destination-id endpoint-ids
//读取cluster 版本
chip-tool thermostat read cluster-revision 1234 1
//chip-tool thermostat read setpoint-change-source-timestamp destination-id endpoint-ids
chip-tool thermostat read setpoint-change-source-timestamp 1234 1
//设置当前制热温度
chip-tool thermostat write occupied-heating-setpoint 2300 1234 1
//读取当前制热温度
chip-tool thermostat read occupied-heating-setpoint 1234 1
//读取当前最大制热温度
chip-tool thermostat read max-heat-setpoint-limit 1234 1
// chip-tool thermostat read min-cool-setpoint-limit destination-id endpoint-ids 读取当前最小制冷温度
chip-tool thermostat read min-cool-setpoint-limit 1234 1
//chip-tool thermostat write occupied-cooling-setpoint attribute-values destination-id endpoint-id-ignored-for-group-commands
//设置当前制冷温度
chip-tool thermostat write occupied-cooling-setpoint 1800 1234 1
//读取当前制冷温度
chip-tool thermostat read occupied-cooling-setpoint 1234 1
//读取当前最大制冷温度
chip-tool thermostat read max-cool-setpoint-limit 1234 1
//设置温控幅度
//chip-tool thermostat setpoint-raise-lower Mode Amount destination-id endpoint-id-ignored-for-group-commands
chip-tool thermostat setpoint-raise-lower 0 50 1234 1
//读取保持温度 1或者0
chip-tool thermostat read temperature-setpoint-hold 1 1
//读取最小制热的设置限制
chip-tool thermostat read abs-min-heat-setpoint-limit 1234 1
//读取占用值
chip-tool thermostat read occupancy 1234 1
// 设置定时配置
//chip-tool thermostat set-weekly-schedule NumberOfTransitionsForSequence DayOfWeekForSequence ModeForSequence Transitions destination-id endpoint-id-ignored-for-group-commands
chip-tool thermostat set-weekly-schedule 1 1 1 '[1,3,4]' 1234 1
//读取时间表
chip-tool thermostat read number-of-weekly-transitions 1234 1
//读取HVAC系统类型
//chip-tool thermostat read hvacsystem-type-configuration destination-id endpoint-ids
chip-tool thermostat read hvacsystem-type-configuration 1234 1
//chip-tool thermostat write hvacsystem-type-configuration attribute-values destination-id endpoint-id-ignored-for-group-commands
//读取基础信息
chip-tool basicinformation read unique-id 1234 1
chip-tool basicinformation read node-label 1234 1
chip-tool basicinformation read vendor-id 1234 1
//读取节点特征时间值
chip-tool identify read identify-time 1234 1
//chip-tool otasoftwareupdaterequestor announce-otaprovider ProviderNodeID VendorID AnnouncementReason Endpoint destination-id endpoint-id-ignored-for-group-commands
chip-tool otasoftwareupdaterequestor announce-otaprovider 0x2345 0 0 0 1234 0
//chip-tool groupkeymanagement read max-groups-per-fabric destination-id endpoint-ids
chip-tool groupkeymanagement read max-groups-per-fabric 1234 0
//chip-tool any command-by-id cluster-id command-id payload destination-id endpoint-id-ignored-for-group-commands
chip-tool any command-by-id 0x0201 0x00 '{"0x0":0, "0x1":"s:10"}' 17 1
// chip-tool otasoftwareupdaterequestor announce-otaprovider ProviderNodeID VendorID AnnouncementReason Endpoint destination-id endpoint-id-ignored-for-group-commands
chip-tool otasoftwareupdaterequestor announce-otaprovider 0x2345 0 0 0 1234 0
// chip-tool userlabel write label-list attribute-values destination-id endpoint-id-ignored-for-group-commands
chip-tool userlabel write label-list '[{"label":"room", "value":"bedroom 1"}, {"label":"orientation", "value":"east"}]' 0x7283 1
//这里开关和灯通过绑定命令和控制绑定在一起
chip-tool onoff subscribe on-off 1 2 29315 1
chip-tool onoff toggle 135246 1
chip-tool onoff toggle 135246 1 --commissioner-nodeid 445566
chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [ 112233, 445566 ], "targets": null}]' 135246 0
chip-tool onoff toggle 135246 1 --commissioner-nodeid 445566
错误操作写或者读失败,需要考虑是否添加了改操作属性或者cluster ,如下图不支持写的属性
通过测试证书进行设备配网需要先生成自己的测试PAI并添加在自己的chip-tool 工具环境中,从而验证设备是否合法
//使用测试PAA进行配网
oem@huqin:/var/paa-root-certs$ sudo cp ~/esp/esp-matter/connectedhomeip/connectedhomeip/credentials/development/paa-root-certs/Chip-Test-PAA-FFF1-Cert.der ./
oem@huqin:/var/paa-root-certs$ ls
Chip-Test-PAA-FFF1-Cert.der PAA_certificate
oem@huqin:/var/paa-root-certs$
oem@huqin:/var/paa-root-certs$ chip-tool pairing ble-wifi 1234 siter siter666888 20202021 3840 --paa-trust-store-path /var/paa-root-certs/
./chip-tool pairing ble-wifi 1234 siter siter666888 37714847 3452 --paa-trust-store-path /var/paa-root-certs/
//跳过设备证明验证,因此它将允许恶意的未经认证的设备等
//--bypass-attestation-verifier true