Skip to content

Commit

Permalink
fix: Remove heimanSpecificFormaldehydeMeasurement in favour of `msF…
Browse files Browse the repository at this point in the history
…ormaldehyde` (#1166)

* Update cluster.ts | 

Because this is a standard ZCL cluster, not some specific heiman cluster. Due to the current implementation, when configuring reports of any device working with this standard cluster, z2m sends the manufacturer's code in a z2m packet, and the devices reject such a setting. This needs to be fixed. If heiman has such an implementation, then please implement it in the converter of a specific device from heiman.

* Update tstype.ts

msFormaldehyde

* Update tstype.ts

Because this is a standard ZCL cluster, not some specific cluster. Due to the current implementation, when configuring reports of any device working with this standard cluster, z2m sends the manufacturer's code in a z2m packet, and the devices reject such a setting. This needs to be fixed. If Hyman has such an implementation, then please implement it in the converter of a specific device from Hyman.

* Update cluster.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
smartboxchannel and Koenkk authored Aug 28, 2024
1 parent fedb6cd commit 717f729
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
24 changes: 11 additions & 13 deletions src/zspec/zcl/definition/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,17 @@ export const Clusters: Readonly<Record<ClusterName, Readonly<ClusterDefinition>>
commands: {},
commandsResponse: {},
},
msFormaldehyde: {
ID: 0x042b,
attributes: {
measuredValue: {ID: 0x0000, type: DataType.SINGLE_PREC},
minMeasuredValue: {ID: 0x0001, type: DataType.SINGLE_PREC},
maxMeasuredValue: {ID: 0x0002, type: DataType.SINGLE_PREC},
measuredTolerance: {ID: 0x0003, type: DataType.SINGLE_PREC},
},
commands: {},
commandsResponse: {},
},
pm1Measurement: {
ID: 0x042c,
attributes: {
Expand Down Expand Up @@ -4394,19 +4405,6 @@ export const Clusters: Readonly<Record<ClusterName, Readonly<ClusterDefinition>>
commands: {},
commandsResponse: {},
},
heimanSpecificFormaldehydeMeasurement: {
// from HS2AQ-3.0海曼智能空气质量检测仪API文档-V01
ID: 0x042b,
manufacturerCode: ManufacturerCode.HEIMAN_TECHNOLOGY_CO_LTD,
attributes: {
measuredValue: {ID: 0x0000, type: DataType.UINT16},
measuredMinValue: {ID: 0x0001, type: DataType.UINT16},
measuredMaxValue: {ID: 0x0002, type: DataType.UINT16},
measuredTolerance: {ID: 0x0003, type: DataType.UINT16},
},
commands: {},
commandsResponse: {},
},
heimanSpecificAirQuality: {
// from HS2AQ-3.0海曼智能空气质量检测仪API文档-V01
ID: 0xfc81,
Expand Down
2 changes: 1 addition & 1 deletion src/zspec/zcl/definition/tstype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export type ClusterName =
| 'pHMeasurement'
| 'msCO2'
| 'pm1Measurement'
| 'msFormaldehyde'
| 'pm10Measurement'
| 'pm25Measurement'
| 'ssIasZone'
Expand Down Expand Up @@ -213,7 +214,6 @@ export type ClusterName =
| 'manuSpecificCentraliteHumidity'
| 'manuSpecificSmartThingsArrivalSensor'
| 'manuSpecificSamsungAccelerometer'
| 'heimanSpecificFormaldehydeMeasurement'
| 'heimanSpecificAirQuality'
| 'heimanSpecificScenes'
| 'tradfriButton'
Expand Down

0 comments on commit 717f729

Please sign in to comment.