-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Link
https://www.dresden-elektronik.de/produkt/scene-switch.html
Database entry
{"id":43,"type":"EndDevice","ieeeAddr":"0x00212effff0127a1","nwkAddr":2177,"manufId":4405,"manufName":"dresden elektronik","powerSource":"Battery","modelId":"Scene Switch ","epList":[1],"endpoints":{"1":{"profId":49246,"epId":1,"devId":2048,"inClusterList":[0,4096,64718],"outClusterList":[4096,3,6,8,4,5,768,0,65280,25],"clusters":{"genOnOff":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":3,"stackVersion":3,"hwVersion":2,"dateCode":"20211028","swBuildId":"0202001C","zclVersion":1,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{},"lastSeen":1762621784387}
Zigbee2MQTT version
2.6.3 (unknown)
External converter
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 ota = require('zigbee-herdsman-converters/lib/ota');
const e = exposes.presets;
const definition = {
zigbeeModel: ['Scene Switch '],
model: 'Scene Switch',
vendor: 'Dresden Elektronik',
description: 'Scene switch with multi-button functionality and OTA support',
ota: ota.zigbeeOTA,
fromZigbee: [
fz.on_off,
{
cluster: 'genScenes',
type: ['commandRecall'],
convert: (model, msg) => {
const sceneId = msg.data.sceneid;
return { action: `scene_${sceneId}_recall` };
},
},
{
cluster: 'genLevelCtrl',
type: ['commandMove', 'commandMoveWithOnOff', 'commandStop', 'commandStopWithOnOff'],
convert: (model, msg) => {
const movemode = msg.data?.movemode ?? msg.data?.moveMode; // 0=up, 1=down
const rate = msg.data?.rate;
if (msg.type === 'commandMove' || msg.type === 'commandMoveWithOnOff') {
if (movemode === 0) return { action: 'brightness_up', rate };
if (movemode === 1) return { action: 'brightness_down', rate };
}
if (msg.type === 'commandStop' || msg.type === 'commandStopWithOnOff') {
return { action: 'brightness_stop' };
}
},
},
{
cluster: 'genOnOff',
type: ['commandOn', 'commandOff'],
convert: (model, msg) => ({ action: msg.type === 'commandOn' ? 'on' : 'off' }),
},
],
toZigbee: [tz.on_off],
exposes: [
e.switch(),
e.action([
'on', 'off',
'scene_1_recall', 'scene_2_recall', 'scene_3_recall', 'scene_4_recall',
'brightness_up', 'brightness_down', 'brightness_stop',
]),
],
};
module.exports = definition;What does/doesn't work with the external definition?
left buttons on/off
long press: dim_up, dim_down
right buttons Scene 1 -4
picture:
Notes
software_build_id: 02010032
date_code: 20151212
endpoints:
{"1":{"clusters":{"input":["genBasic","touchlink","manuSpecificAssaDoorLock"],"output":["touchlink","genIdentify","genOnOff","genLevelCtrl","genGroups","genScenes","lightingColorCtrl","genBasic","65280","genOta"]}}}