积分 132
金钱 100
威望 0
贡献 0
HASS币 0
注册会员
积分 132
金钱 100
HASS币 0
各位大佬好,像各位大佬求助,先说下我的基本情况,
基础设施:
- 群晖虚拟机安装的HA完整版
- 小米多模网关2走ZHA+淘宝的三方多模网关走Z2M
- 家里设备是精装房带的罗格朗zigbee系列
目前状态:
- 小米多模网关2走ZHA,能够识别大部分罗格朗的设备,但是唯独情景开关(双键,休息/起床)识别的有问题,没有实体,设备不上线(物理按键无法触发自动化)
- 因为ZHA的配置文件编写太难,网上资料太少,我又增加了一个多模网关,走Z2M,按照教程能识别出情景开关设备了, 但是仍然无法上线
- 配置文件我是按照官方教程做的,在点击物理按键同时查看debug日志的这一块已经触及了我的知识盲区了。
期望:
- 各位坛友帮忙看看配置文件,协助设备上线
罗格朗情景开关外观
js代码:(我知道肯定有很多错误,小白一个,供大家讨论,我可以配合实验,哈哈哈哈)
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['Sleep_Wake_SC'],
model: 'myModel',
vendor: 'myVendor',
description: 'My super switch!',
fromZigbee: [fz.legrand_scenes],
toZigbee: [],
exposes: [e.action(['sleep', 'wakeup'])],
// The configure method below is needed to make the device reports on/off state changes
// when the device is controlled manually through the button on it.
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
};
module.exports = definition;
复制代码
debug 日志
(在我按了休息按键以后出现)
<div style="box-sizing: border-box; color: rgb(108, 117, 125); font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><small class="pe-1" style="box-sizing: border-box; font-size: 12px; padding-right: 0.25rem !important;">2023-08-10 10:47:13</small><code style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 12px; overflow-wrap: break-word; color: var(--bs-code-color);">Received Zigbee message from '0x847127fffe4a3cce', type 'raw', cluster '23', data '{"data":[9,34,5,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0</code></div><div style="box-sizing: border-box; color: rgb(108, 117, 125); font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><small class="pe-1" style="box-sizing: border-box; font-size: 12px; padding-right: 0.25rem !important;">2023-08-10 10:47:13</small><code style="box-sizing: border-box; font-family: var(--bs-font-monospace); font-size: 12px; overflow-wrap: break-word; color: var(--bs-code-color);">No converter available for 'myModel' with cluster '23' and type 'raw' and data '{"data":[9,34,5,0,0],"type":"Buffer"}'</code></div>
复制代码
(在我按了起床按键以后出现)
2023-08-10 10:47:29Received Zigbee message from '0x847127fffe4a3cce', type 'raw', cluster '23', data '{"data":[9,35,5,1,0],"type":"Buffer"}' from endpoint 1 with groupID 0
2023-08-10 10:47:29No converter available for 'myModel' with cluster '23' and type 'raw' and data '{"data":[9,35,5,1,0],"type":"Buffer"}'
复制代码
烦请各位大佬深处援手,已经肝了好几天了。
多谢!