NEWS
Tester gesucht: Zigbee 3.2.x
-
Ich hab mal https://github.com/ioBroker/ioBroker.type-detector/issues/155 angelegt. Gern dort Meinungen rein hauen
-
Hab da ein Problem weis aber nicht Obs hier rein Passt.
Zumindest ist es die Testversion die ansonsten zuverlässig geht.
Hab angefangen zu Basteln, dazu wollte ich einen Externen Converter einbinden. Denke er wird auch gefunden nur der zugriff wird verweigert.
Das ganze läuft auf aktuellem Ubuntu unter Docker, ioBroker ist auch aktuell.

-
Bitte posten:
- den externen konverter den du nutzt
- die Einträge zum externen Konverter beim Start des Adapters. Da muss so etwas (o.a.) stehen
2025-11-23 20:12:40.755 - info: zigbee.0 (983320) Adding code from './../zigbee-herdsman-converters/dist/lib/modernExtend' as 'm' to sandbox -- success 2025-11-23 20:12:40.756 - info: zigbee.0 (983320) Adding code from './../zigbee-herdsman-converters/dist/lib/types' as 'type {DefinitionWithExtend}' to sandbox -- success 2025-11-23 20:12:40.757 - warn: zigbee.0 (983320) Trying to run sandbox for /opt/iobroker/iobroker-data/zigbee_0/shelly.js 2025-11-23 20:12:40.759 - info: zigbee.0 (983320) Model S4SW-001X8EU defined in external converter /opt/iobroker/iobroker-data/zigbee_0/shelly.js 2025-11-23 20:12:40.759 - info: zigbee.0 (983320) added external converter using addExternalDefinition (0 ms) 2025-11-23 20:12:40.760 - warn: zigbee.0 (983320) Trying to run sandbox for /opt/iobroker/iobroker-data/zigbee_0/esp.js 2025-11-23 20:12:40.763 - info: zigbee.0 (983320) Model ZBColorLightBulb defined in external converter /opt/iobroker/iobroker-data/zigbee_0/esp.js 2025-11-23 20:12:40.763 - info: zigbee.0 (983320) added external converter using addExternalDefinition (0 ms)A.
-
Das ist schon mal der Konverter wurde von PTVO erzeugt.
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters'); const zigbeeHerdsmanUtils = require('zigbee-herdsman-converters/lib/utils'); const exposes = zigbeeHerdsmanConverters['exposes'] || require("zigbee-herdsman-converters/lib/exposes"); const ea = exposes.access; const e = exposes.presets; const modernExposes = (e.hasOwnProperty('illuminance_lux'))? false: true; const fz = zigbeeHerdsmanConverters.fromZigbeeConverters || zigbeeHerdsmanConverters.fromZigbee; const tz = zigbeeHerdsmanConverters.toZigbeeConverters || zigbeeHerdsmanConverters.toZigbee; const ptvo_switch = (zigbeeHerdsmanConverters.findByModel)?zigbeeHerdsmanConverters.findByModel('ptvo.switch'):zigbeeHerdsmanConverters.findByDevice({modelID: 'ptvo.switch'}); fz.ptvo_on_off = { cluster: 'genOnOff', type: ['attributeReport', 'readResponse'], convert: (model, msg, publish, options, meta) => { if (msg.data.hasOwnProperty('onOff')) { const channel = msg.endpoint.ID; const endpointName = `l${channel}`; const binaryEndpoint = model.meta && model.meta.binaryEndpoints && model.meta.binaryEndpoints[endpointName]; const prefix = (binaryEndpoint) ? model.meta.binaryEndpoints[endpointName] : 'state'; const property = `${prefix}_${endpointName}`; if (binaryEndpoint) { return {[property]: msg.data['onOff'] === 1}; } return {[property]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'}; } }, }; const switchTypesList = { 'switch': 0x00, 'single click': 0x01, 'multi-click': 0x02, 'reset to defaults': 0xff, }; const switchActionsList = { on: 0x00, off: 0x01, toggle: 0x02, }; const inputLinkList = { no: 0x00, yes: 0x01, }; const bindCommandList = { 'on/off': 0x00, 'toggle': 0x01, 'change level up': 0x02, 'change level down': 0x03, 'change level up with off': 0x04, 'change level down with off': 0x05, 'recall scene 0': 0x06, 'recall scene 1': 0x07, 'recall scene 2': 0x08, 'recall scene 3': 0x09, 'recall scene 4': 0x0A, 'recall scene 5': 0x0B, 'dimmer': 0x0C, 'dimmer (hue)': 0x0D, 'dimmer (saturation)': 0x0E, 'dimmer (color temperature)': 0x0F, 'intruder alarm systems (ias)': 0x20, }; function getSortedList(source) { const keysSorted = []; for (const key in source) { keysSorted.push([key, source[key]]); } keysSorted.sort(function(a, b) { return a[1] - b[1]; }); const result = []; keysSorted.forEach((item) => { result.push(item[0]); }); return result; } function getListValueByKey(source, value) { const intVal = parseInt(value, 10); return source.hasOwnProperty(value) ? source[value] : intVal; } const getKey = (object, value) => { for (const key in object) { if (object[key] == value) return key; } }; tz.ptvo_on_off_config = { key: ['switch_type', 'switch_actions', 'link_to_output', 'bind_command'], convertGet: async (entity, key, meta) => { await entity.read('genOnOffSwitchCfg', ['switchType', 'switchActions', 0x4001, 0x4002]); }, convertSet: async (entity, key, value, meta) => { let payload; let data; switch (key) { case 'switch_type': data = getListValueByKey(switchTypesList, value); payload = {switchType: data}; break; case 'switch_actions': data = getListValueByKey(switchActionsList, value); payload = {switchActions: data}; break; case 'link_to_output': data = getListValueByKey(inputLinkList, value); payload = {0x4001: {value: data, type: 32 /* uint8 */}}; break; case 'bind_command': data = getListValueByKey(bindCommandList, value); payload = {0x4002: {value: data, type: 32 /* uint8 */}}; break; } await entity.write('genOnOffSwitchCfg', payload); }, }; fz.ptvo_on_off_config = { cluster: 'genOnOffSwitchCfg', type: ['readResponse', 'attributeReport'], convert: (model, msg, publish, options, meta) => { const channel = getKey(model.endpoint(msg.device), msg.endpoint.ID); const {switchActions, switchType} = msg.data; const inputLink = msg.data[0x4001]; const bindCommand = msg.data[0x4002]; return { [`switch_type_${channel}`]: getKey(switchTypesList, switchType), [`switch_actions_${channel}`]: getKey(switchActionsList, switchActions), [`link_to_output_${channel}`]: getKey(inputLinkList, inputLink), [`bind_command_${channel}`]: getKey(bindCommandList, bindCommand), }; }, }; function ptvo_on_off_config_exposes(epName) { const features = []; features.push(exposes.enum('switch_type', exposes.access.ALL, getSortedList(switchTypesList)).withEndpoint(epName)); features.push(exposes.enum('switch_actions', exposes.access.ALL, getSortedList(switchActionsList)).withEndpoint(epName)); features.push(exposes.enum('link_to_output', exposes.access.ALL, getSortedList(inputLinkList)).withEndpoint(epName)); features.push(exposes.enum('bind_command', exposes.access.ALL, getSortedList(bindCommandList)).withEndpoint(epName)); return features; } const device = { zigbeeModel: ['Mat-LED'], model: 'Mat-LED', vendor: 'Mat', description: '[Configurable firmware](https://ptvo.info/zigbee-configurable-firmware-features/)', fromZigbee: [fz.ignore_basic_report, fz.ptvo_on_off, fz.ptvo_multistate_action, fz.ptvo_on_off_config, fz.electrical_measurement,], toZigbee: [tz.ptvo_switch_trigger, tz.on_off, tz.ptvo_on_off_config,], exposes: [e.switch().withDescription('Impulsschalter').withEndpoint('l1'), e.action(['single', 'double', 'triple', 'hold', 'release']), ...ptvo_on_off_config_exposes('l1'), e.voltage().withAccess(ea.STATE).withEndpoint('l3'), ], meta: { multiEndpoint: true, }, endpoint: (device) => { return { l1: 1, l3: 3, }; }, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await endpoint.read('genBasic', ['modelId', 'swBuildId', 'powerSource']); for (const endpoint of device.endpoints) { if (endpoint.supportsInputCluster('haElectricalMeasurement')) { endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {dcCurrentDivisor: 1000, dcCurrentMultiplier: 1, dcPowerDivisor: 10, dcPowerMultiplier: 1, dcVoltageDivisor: 100, dcVoltageMultiplier: 1, acVoltageDivisor: 100, acVoltageMultiplier: 1, acCurrentDivisor: 1000, acCurrentMultiplier: 1, acPowerDivisor: 1, acPowerMultiplier: 1}); } if (endpoint.supportsInputCluster('seMetering')) { endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000, multiplier: 1}); } } }, }; module.exports = device; -
Dafür nicht.
Noch ein Tip:
Wenn du den
device =Teil des Konverters so anpasst wie unten gepostet, und du parallel zum Konverter auch noch ein Icon (PNG Format, max 512x512 px, am besten mit transparentem Hintergrund) hinterlegst (z.Bsp. alsMat-LED.png), dann sollte der Adapter das Icon automatisch auch einbinden.const device = { zigbeeModel: ['Mat-LED'], model: 'Mat-LED', vendor: 'Mat', description: '[Configurable firmware](https://ptvo.info/zigbee-configurable-firmware-features/)', fromZigbee: [fz.ignore_basic_report, fz.ptvo_on_off, fz.ptvo_multistate_action, fz.ptvo_on_off_config, fz.electrical_measurement,], toZigbee: [tz.ptvo_switch_trigger, tz.on_off, tz.ptvo_on_off_config,], exposes: [e.switch().withDescription('Impulsschalter').withEndpoint('l1'), e.action(['single', 'double', 'triple', 'hold', 'release']), ...ptvo_on_off_config_exposes('l1'), e.voltage().withAccess(ea.STATE).withEndpoint('l3'), ], meta: { multiEndpoint: true, }, endpoint: (device) => { return { l1: 1, l3: 3,}; }, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await endpoint.read('genBasic', ['modelId', 'swBuildId', 'powerSource']); for (const endpoint of device.endpoints) { if (endpoint.supportsInputCluster('haElectricalMeasurement')) { endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {dcCurrentDivisor: 1000, dcCurrentMultiplier: 1, dcPowerDivisor: 10, dcPowerMultiplier: 1, dcVoltageDivisor: 100, dcVoltageMultiplier: 1, acVoltageDivisor: 100, acVoltageMultiplier: 1, acCurrentDivisor: 1000, acCurrentMultiplier: 1, acPowerDivisor: 1, acPowerMultiplier: 1}); } if (endpoint.supportsInputCluster('seMetering')) { endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000, multiplier: 1}); } } }, icon: "./Mat-LED.png", }; -
@Asgothian - vielleicht hast du einen Tipp, wie ich dieses akute "Phänomen" untersuchen/beheben könnte: Seit ~3 Jahren laufen ~12 gleichartige Zigbee-Thermostate (Moes/Tuya) recht problemlos. Temperaturen und "Betriebsmodus" lassen sich setzen und lesen, beim Setzen der Absenktemperatur hörte man quasi sofort die Ventile schliessen.
Wenn die Batterie "alle" ist, geht "available" auf "false", das Gerät wird gemeldet, Batterie getauscht, und weiter gehts. So bis vor ein paar Tagen - kann das leider nicht mehr genau eingrenzen, da der Effekt nicth gleich erkannt wurde.Aus dem nichts heraus (glaube ich - habe eigentlich nirgends gross geschraubt - letzte Aktivitäten waren tatsächlich Zigbee-Adapter-Updates, aktuell auf 3.2.5) kann bei keinem dieser Thermostate irgendein schreibbarer Parameter mehr gesetzt werden (Zieltemperatur etc.). Während alle Read-only-Parameter nach wie vor mit aktuellem Timestamp reinkommen, sind die schreibbaren irgendwann in der Vergangenheit "stehen geblieben".
Allerdings - verstelle ich die Temperatur am Thermostat selbst, wird das zugehörge Objekt aktualisiert - genau einmal, auch danach erfolgt kein Update des Timestamps mehr.
Andere Zigbee-Greräte (~50) scheinen bislang nicht betroffen.
Habe einen Thermostat mal exemplarisch in den "Debug"-Modus eingetragen, Log u. Gerätekachel s.u.
Natürlich ist auch in der Vergangenheit mal das eine oder andere Zigbeegerät aus dem Netz gefallen, oder nach einem Batteriewechsel nicht mehr "online" gegangen - aber dann war immer auch "available" auf "false", und nach einem "Re-Pair" war das Gerät wieder da.Dass aber alle Geräte eines Typs auf einmal "partiell verschwinden", ist neu für mich - irgendwelche Tipps, wie ich da weiter vorgehen sollte? (werde mal einen versuchen, neu zu pairen - ist bei diesen Dingern leider relativ umständlich)

Ich vermute mal, das Log entspricht genau dem zu Beobachtenden - Gerät nicht erreichbar:
2025-11-26 13:41:40.260 - ESC[33mwarnESC[39m: zigbee.0 (3734244) ELEVATED:O01 (0ca4) User state change of state zigbee.0.040d84fffe5f5fcc.min_temperature with value 12 (ack: false) from system.adapter.admin.0 2025-11-26 13:41:40.263 - ESC[33mwarnESC[39m: zigbee.0 (3734244) ELEVATED:O02 (0ca4) Change state 'min_temperature' at device 0x040d84fffe5f5fcc type 'BRT-100-TRV' 2025-11-26 13:41:40.263 - ESC[33mwarnESC[39m: zigbee.0 (3734244) ELEVATED:O03 (0ca4) Publishing to 0x040d84fffe5f5fcc of model BRT-100-TRV with min_temperature 2025-11-26 13:41:40.266 - ESC[33mwarnESC[39m: zigbee.0 (3734244) ELEVATED:O04 (0ca4) convert min_temperature with value 12 and options {} for device 0x040d84fffe5f5fcc with Endpoint min_temperature 2025-11-26 13:41:50.272 - ESC[33mwarnESC[39m: zigbee.0 (3734244) ELEVATED:EXSET (0ca4) caught error ZCL command 0x040d84fffe5f5fcc/1 manuSpecificTuya.dataRequest({"seq":389,"dpValues":[{"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,12]}}]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Data request failed with error: 'Timeout' (9999)) when setting value for device 0x040d84fffe5f5fcc. 2025-11-26 13:41:50.272 - ESC[32minfoESC[39m: zigbee.0 (3734244) Send command to 0x040d84fffe5f5fcc failed with: Code 9999 (No response)
