遥控器按键收到的反馈是
No converter available for 'Orviboremote' with cluster '23' and type 'raw' and data '{"data":[25,0,8,4,0,0],"type":"Buffer"}'
No converter available for 'Orviboremote' with cluster '23' and type 'raw' and data '{"data":[25,0,8,1,0,0],"type":"Buffer"}'
每个按键收到的信息都不一样。
参考京鱼的按键的写法,但是不知道问题在哪里!有没有高手指点一下。
const fzLocal = {
WSZ01_on_off_action: {
cluster: '23',
type: ['raw'],
convert: (model, msg, publish, options, meta) => {
//const clickMapping = {'[25,0,8,1,0,0]': 'release', '[25,0,8,2,0,0]': 'single', '[25,0,8,3,0,0]': 'double', '[25,0,8,4,0,0]': 'hold'};
const clickMapping = {0: 'release', 1: 'single', 2: 'double', 3: 'hold'};
return {action: `${clickMapping[msg.data[170]]}`};
//return {action: msg.data['data'][3]};
},
},
//23:26:56Received Zigbee message from '橱柜按钮', type 'attributeReport', cluster '65029', data '{"1":1}' from endpoint 1 with groupID 0
//Received Zigbee message from '橱柜按钮', type 'attributeReport', cluster '65029', data '{"1":2}' from endpoint 1 with groupID 0
//No converter available for 'Orviboremote' with cluster '23' and type 'raw' and data '{"data":[25,0,8,1,0,0],"type":"Buffer"}'
//No converter available for 'Orviboremote' with cluster '23' and type 'raw' and data '{"data":[25,0,8,4,0,0],"type":"Buffer"}'
//Debug 2023-08-22 23:56:55Received Zigbee message from '欧瑞博2', type 'attributeReport', cluster 'genBasic', data '{"170":1}' from endpoint 1 with groupID 0
};
module.exports = [
// 无线开关
{
zigbeeModel: ['f2f44307f16b4b289ff99278e1c8fbf7'],
model: 'orvibo',
vendor: 'ADEO',
description: 'Wireless switch',
supports: "action, battery, linkquality",
fromZigbee: [fzLocal.WSZ01_on_off_action],
toZigbee: [],
exposes: [e.action(['release', 'single', 'double', '[25,0,8,4,0,0]'])],
},
]