Capteur de presence non reconnu par zigbee2mqtt

Bonjour à tous,

Je viens d’acquérir (sur notre site préféré FR) un capteur de présence humaine à la mode en ce moment.
CAPTEUR DE PRÉSENCE HUMAINE ZIGBEE 3.0 TUYA PIR + RADAR - NEO

Petite verif qu’il soit bien compatible etc rien n’indique le contraire.

Lors de mon premier appareillage je me tape un flow d’erreurs.

Device '.......' with Zigbee model 'TS0601' and manufacturer name '_TZE204_kyhbrfyl' is NOT supported, 
please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

De l’autre côté quand je me rend dans les appareils j’ai un nouveau module
HLK-LD2410_216E (216E)
LD2410 BLE LD2410 BLE - Home Assistant
Je désinstalle donc mon appareil et test avec ce module. 1ere chose j’ai que le Bluetooth. Et la pas de soucis bien reconnu etc seul bemol il est configure pour le Bluetooth et non zigbee.
Le capteur sera trop loin de ma Raspberry donc non exploitable pour moi

Je fais donc des recherches pour ajouter le code de mon appareil dans Zigbee2MQTT.
Je tombe sur cela : [New device support]: Motion and presence sensor TS0601 _TZE204_kyhbrfyl - not work well · Issue #19292 · Koenkk/zigbee2mqtt · GitHub
Pour info de mon cote j’ai zero sensor dans la fiche pas comme la personne.

Je me rend donc dans mon dossier Zigbee2MQTT et je crée un fichier
/homeassistant/zigbee2mqtt/_TZE204_kyhbrfyl.js
(j’ai essayer avec le script du dernier message et celui fourni dans le fichier txt)
Dans la config de Zigbee2MQTT depuis la page module j’ajoute ceci

external_converters:
  - _TZE204_kyhbrfyl.js

Après un redémarrage complet je me rend de nouveau dans Zigbee2MQTT mais pareil je tente une installe désinstalle du module mais pareil aussi.

Je suis donc actuellement bloqué !
Est-ce que j’ai fait une erreur dans l’emplacement des fichiers ?
Avez-vous des idées si vous avez déjà u le cas ?

Core 2023.11.3
Supervisor 2023.11.6
Operating System 11.1
Interface utilisateur 20231030.2
Zigbee2MQTT Current version: 1.34.0-1

Bonsoir,

A priori, les emplacements sont OK

Un exemple ci-dessous de fichier « external converters » et de fichier configuration.yaml (zigbee2mqtt) :

Alors j’ai pas placé la commande dans le fichier mais depuis le menu module


Bj

non cela est pas bon
tu dois le mettre mettre direct dans config de Z2M

vire ce que tu as mis dans socat tu risque d’aller vers des souci

Capture d'écran 2023-12-01 204658
Capture d'écran 2023-12-01 204745

ok merci j’ai modifier et j’ai placé la commande dans le fichier configuration directement.
Après un restart complet j’ai tenté de réinstaller le capteur mais toujours pareil.

Mon soucis je pense viens du script en lui même.
Par contre je remarque que Constructeur et Modèle ne sont pas présent dans la fiche comme mes autres capteurs.

Je continue de chercher.

Voici mon script js actuelle :

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
    model: 'NEO',
    vendor: 'TuYa',
    description: 'Human presence sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: console.log, 
    // configure: tuya.configureMagicPacket,
   
    exposes: [
        e.presence(), 
           
        exposes.enum('movement_type', ea.STATE, ['none', 'small', 'large'])
            .withDescription('traffic of movement from the point of view of the radar'),
        exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(600).withValueStep(1).withUnit('s')
            .withDescription('detection delay'),
        exposes.numeric('detection_range', ea.STATE_SET).withValueMin(150).withValueMax(600).withValueStep(10)
            .withDescription('far sensitivity of the radar'),
        exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Sensitivity of the radar'),
        exposes.numeric('motion_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Motionless sensitivity of the radar'),
        exposes.numeric('current_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
        exposes.numeric('battery_level', ea.STATE).withDescription('battery level').withUnit('%'),
           
    ],
    meta: {
        tuyaDatapoints: [
            [1, 'presence',tuya.valueConverter.trueFalse1],
            [11, 'movement_type', tuya.valueConverterBasic.lookup({'none': 0, 'small': 1, 'large': 2})],
            [12, 'detection_delay', tuya.valueConverter.raw],
            [13, 'detection_range', tuya.valueConverter.raw],
            [15, 'radar_sensitivity', tuya.valueConverter.raw],
            [16, 'motion_sensitivity', tuya.valueConverter.raw],
            [19, 'current_distance', tuya.valueConverter.raw],
            [101, 'battery_level', tuya.valueConverter.raw],
            
         
        ],
    },
};

module.exports = definition;```

J’ai trouvé ceci sur un forum « tchèque »

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
    model: 'RTX PRO',
    vendor: 'TuYa',
    description: 'Human presence sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    // onEvent: tuya.onEventSetTime, 
    // configure: tuya.configureMagicPacket,
   
    exposes: [
        e.presence(), 
           
        exposes.enum('approach_distance', ea.STATE, ['none', 'small_movement', 'large_movement'])
            .withDescription('traffic of movement from the point of view of the radar'),
        exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(600).withValueStep(1)
            .withDescription('detection delay'),
        exposes.numeric('detection_range', ea.STATE_SET).withValueMin(150).withValueMax(600).withValueStep(10)
            .withDescription('far sensitivity of the radar'),
        exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Sensitivity of the radar'),
        exposes.numeric('motion_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Motionless sensitivity of the radar'),
        exposes.numeric('current_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
        exposes.numeric('battery_level', ea.STATE).withDescription('battery level').withUnit('%'),
           
    ],
    meta: {
        tuyaDatapoints: [
            [1, 'presence', tuya.valueConverter.trueFalse1],
            [11, 'approach_distance', tuya.valueConverterBasic.lookup({'none': 0, 'small_movement': 1, 'large_movement': 2})],
            [12, 'detection_delay', tuya.valueConverter.raw],
            [13, 'detection_range', tuya.valueConverter.raw],
            [15, 'radar_sensitivity', tuya.valueConverter.raw],
            [16, 'motion_sensitivity', tuya.valueConverter.raw],
            [19, 'current_distance', tuya.valueConverter.raw],
            [101, 'battery_level', tuya.valueConverter.raw],
            
         
        ],
    },
};

module.exports = definition;

Autre que j’ai trouvé sur un git

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 ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const e = exposes.presets;
const ea = exposes.access;


const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key, 'radar_sensitivity', 'entry_sensitivity', 'illumin_threshold', 'detection_range','shield_range','entry_distance_indentation','entry_filter_time','departure_delay','block_time', 'breaker_polarity', 'status_indication','breaker_mode','se sensor']
}

const definition = {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE204_clrdrnya']),
        model: 'MTG235-ZB-RL',
        vendor: 'TuYa',
        description: '24G human presence sensor with relay',
        configure: tuya.configureMagicPacket,
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
        exposes: [
            e.presence(), e.illuminance_lux(),
            e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
            e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Sensitivity of the radar'),
            e.numeric('entry_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Entry sensitivity'),
            e.numeric('illumin_threshold', ea.STATE_SET).withValueMin(0).withValueMax(420).withValueStep(0.1).withUnit('lx')
                .withDescription('Illumination threshold for switching on'),
            e.numeric('detection_range', ea.STATE_SET).withValueMin(240).withValueMax(1250).withValueStep(10)
                .withUnit('cm').withDescription('Detection range'),
            e.numeric('shield_range', ea.STATE_SET).withValueMin(30).withValueMax(1240).withValueStep(10).withUnit('cm')
                .withDescription('Shield range of the radar'),
            e.numeric('entry_distance_indentation', ea.STATE_SET).withValueMin(0).withValueMax(1220).withValueStep(10).withUnit('cm')
                .withDescription('Entry distance indentation'),
            e.numeric('entry_filter_time', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
                .withDescription('Entry filter time'),
            e.numeric('departure_delay', ea.STATE_SET).withValueMin(2).withValueMax(1500).withValueStep(1).withUnit('s').
                withDescription('Turn off delay'),
            e.numeric('block_time', ea.STATE_SET).withValueMin(1.5).withValueMax(60).withValueStep(0.1).withUnit('s').withDescription('Block time'),
            e.binary('breaker_status', ea.STATE_SET, 'ON', 'OFF').withDescription('Breaker status changes with breaker_mode->standard'),
            e.enum('breaker_mode', ea.STATE_SET, ['standard', 'local']).withDescription('Status Breaker mode'),
            e.enum('status_indication', ea.STATE_SET, ['ON', 'OFF']).withDescription('Led backlight when triggered'),
			e.enum('sensor', ea.STATE_SET, ['turn_on', 'turn_off', 'occupied', 'unoccupied']).withDescription('The radar sensor can be set in four states: turn on, turn off, occupied, and unoccupied. For example, if occupied is set up, it will continue to maintain a presence regardless of whether someone present or not. If unoccupied is set, the unoccupied state will be maintained continuously.'),
		
			
        ],
        meta: {
            tuyaDatapoints: [
                [1, 'presence', tuya.valueConverter.trueFalse1],
                [2, 'radar_sensitivity', tuya.valueConverter.raw],
                [3, 'shield_range', tuya.valueConverter./*divideBy100*/raw], 
                [4, 'detection_range', tuya.valueConverter./*divideBy100*/raw],
                [6, 'equipment_status', tuya.valueConverter.raw],
                [9, 'target_distance', tuya.valueConverter./*divideBy100*/raw],
                [101, 'entry_filter_time', tuya.valueConverter.divideBy10],
                [102, 'departure_delay', tuya.valueConverter.raw],
                [103, 'cline', tuya.valueConverter.raw],
                [104, 'illuminance_lux', tuya.valueConverter.divideBy10],
                [105, 'entry_sensitivity', tuya.valueConverter.raw],
                [106, 'entry_distance_indentation', tuya.valueConverter./*divideBy100*/raw],
			    [107, 'breaker_mode', tuya.valueConverterBasic.lookup({'standard': tuya.enum(0), 'local': tuya.enum(1)})],
                [108, 'breaker_status', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [109, 'status_indication', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [110, 'illumin_threshold', tuya.valueConverter.divideBy10],
                [112, 'block_time', tuya.valueConverter.divideBy10],
                [113, 'parameter_setting_result', tuya.valueConverter.raw],
                [114, 'factory_parameters', tuya.valueConverter.raw],
                [115, 'sensor', tuya.valueConverterBasic.lookup({'turn_on': tuya.enum(0), 'turn_off': tuya.enum(1), 'occupied': tuya.enum(2), 'unoccupied': tuya.enum(3)})], 
            ],
        },
    icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAABpCAMAAAAk7AynAAABAlBMVEX////w7+/f3d3g3t3h39/x8fHi4ODi4OHi4uLe3Nvu7u7+//7r6+vz8/Pj4uHm5OMAicTm5eXp6Ojk4+Tk4uLY1tbd29va2dng39/9/fz8e0L5+vkBiMHh4eH+ezb29vYnm8jV09P8dDXl9fnJyMf5ZCbc8fP8biX2URfxRRDzWST9gTzlsJsLjcN6wNvPz83w+vr+eSz6jEWRzOG74exmt9ar2eftkWv0qn/2w6Cysafp1s46oszz1sQclMWLi3z46d7gw7j2ll70gUrr39pDp87AvbT0zbPra0dUr9H89e7qmH2pqZrtflh6e1PS7PPln4VoaDiRko1aWy6enJbw3d1SHi9FAAAK0ElEQVRo3ryaB1viWhCGlySkE0w7CYbAIgKKiH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ujNfoEudX3/E7y6quxr/jKNkolFY1H+Xfd+o7d+UbGcZqeNFb4XsgrYqQbKyGN1f6GqiAOGOFEAjeit/CaHm0QgoE1171AjR0offRIuRdc/Ufw2hVn+15/uvebHoYBGEwvBF1m8ABTYsNMcTEe///vxvVnWay6QIe9h65vHy3oQ9HhWBIZ6gBBQf4y9xjTTqH/4VaBDUeHXyfj0DQ0YGvdu7DFLabB6gr5URQyI7gd26DCsF32SkssvcU5Zqv7gomb4owYGSdgADDdh2W4DjKXZ+i8tAWI9B0MMgzpyysur1di43ywDwpE4tCiBSNmmaRFEVR3oUxpSLM0gLOZjnwnztga9OlVHexfIkZVG/qGIrbC14dFvTV2rXQLAycjdJGdMaPkvV5nDbS+iT3/9ITvYOPrlg8bjYAAAAASUVORK5CYII=',
    };
	
module.exports = definition;

Toujours pareil malheureusement.
A croire qu’il s’en fou de mon fichier j’ai toujours ajouter le device. Je vais continué a chercher demain.
Merci pour ton aide en tt cas

regarde dans les journaux de Z2M si tu as pas d’autre infos sur les erreurs

A chaque modification, il faut redémarrer complètement le système. Par ailleurs, essaie de stimuler ton détecteur de présence lors de l’appairage en passant ta main plusieures fois devant le capteur. Il faut aussi éventuellement placer ton détecteur au plus près du coordinateur.

Oui je le stimule etc mais cela ne change rien.
Par contre chose bizarre quand je refais un appairage du module et que je retourne dans mon fichier configuration j’ai plus les lignes external_converters. Est-ce que c’est normal ?
On est bien d’accord que je place cette ligne dans le fichier /homeassistant/zigbee2mqtt/configuration.yaml

Voici les logs mais j’ai pas d’infos sur le soucis j’ai juste une ligne en plus quand je passe ma main devant.

Warning 2023-12-02 09:37:54Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_kyhbrfyl'
Warning 2023-12-02 09:37:54Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Debug 2023-12-02 09:37:54 Received Zigbee message from '0xa4c1380654317f70', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,52],"type":"Buffer"},"datatype":2,"dp":19}],"seq":20225}' from endpoint 1 with groupID null

Pense à bien enregistrer ton fichier configuration.yaml du répertoire « zigbee2mqtt » avant de redémarrer le système. Tes lignes ajoutées doivent rester dans le fichier.

Refais le si elles ne sont pas présentes et poste éventuellement une copie du fichier (en supprimant les informations confidentielles).

Selon la capture d’écran que tu as posté plus haut, l’appairage se fait mais les données du converteur externe ne sont pas prises en compte. Le problème vient de là.

Donc j’ai change le nom du fichier au cas ou et redémarré deux fois pas de soucis les lignes reste dans le fichier.
Par contre dès que je lance l’appairage pouf les lignes disparaisse du fichier.

homeassistant: true
serial:
  adapter: deconz
  port: /dev/ttyACM0
mqtt:
  server: mqtt://core-mosquitto:1883
  user: addons
  password: gvfdgdfgdfgdfgfdgfdg
frontend:
  port: 8099
external_converters:
  - TZE204.js  
devices:

Le fichier TZE204.js

const definition = {
      fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
      model: 'HLK-LD2410_216E',
      vendor: 'TuYa',
        description: '24G human presence sensor with relay',
        configure: tuya.configureMagicPacket,
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
        exposes: [
            e.presence(), e.illuminance_lux(),
            e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
            e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Sensitivity of the radar'),
            e.numeric('entry_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Entry sensitivity'),
            e.numeric('illumin_threshold', ea.STATE_SET).withValueMin(0).withValueMax(420).withValueStep(0.1).withUnit('lx')
                .withDescription('Illumination threshold for switching on'),
            e.numeric('detection_range', ea.STATE_SET).withValueMin(240).withValueMax(1250).withValueStep(10)
                .withUnit('cm').withDescription('Detection range'),
            e.numeric('shield_range', ea.STATE_SET).withValueMin(30).withValueMax(1240).withValueStep(10).withUnit('cm')
                .withDescription('Shield range of the radar'),
            e.numeric('entry_distance_indentation', ea.STATE_SET).withValueMin(0).withValueMax(1220).withValueStep(10).withUnit('cm')
                .withDescription('Entry distance indentation'),
            e.numeric('entry_filter_time', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
                .withDescription('Entry filter time'),
            e.numeric('departure_delay', ea.STATE_SET).withValueMin(2).withValueMax(1500).withValueStep(1).withUnit('s').
                withDescription('Turn off delay'),
            e.numeric('block_time', ea.STATE_SET).withValueMin(1.5).withValueMax(60).withValueStep(0.1).withUnit('s').withDescription('Block time'),
            e.binary('breaker_status', ea.STATE_SET, 'ON', 'OFF').withDescription('Breaker status changes with breaker_mode->standard'),
            e.enum('breaker_mode', ea.STATE_SET, ['standard', 'local']).withDescription('Status Breaker mode'),
            e.enum('status_indication', ea.STATE_SET, ['ON', 'OFF']).withDescription('Led backlight when triggered'),
			e.enum('sensor', ea.STATE_SET, ['turn_on', 'turn_off', 'occupied', 'unoccupied']).withDescription('The radar sensor can be set in four states: turn on, turn off, occupied, and unoccupied. For example, if occupied is set up, it will continue to maintain a presence regardless of whether someone present or not. If unoccupied is set, the unoccupied state will be maintained continuously.'),
        ],
        meta: {
            tuyaDatapoints: [
                [1, 'presence', tuya.valueConverter.trueFalse1],
                [2, 'radar_sensitivity', tuya.valueConverter.raw],
                [3, 'shield_range', tuya.valueConverter./*divideBy100*/raw], 
                [4, 'detection_range', tuya.valueConverter./*divideBy100*/raw],
                [6, 'equipment_status', tuya.valueConverter.raw],
                [9, 'target_distance', tuya.valueConverter./*divideBy100*/raw],
                [101, 'entry_filter_time', tuya.valueConverter.divideBy10],
                [102, 'departure_delay', tuya.valueConverter.raw],
                [103, 'cline', tuya.valueConverter.raw],
                [104, 'illuminance_lux', tuya.valueConverter.divideBy10],
                [105, 'entry_sensitivity', tuya.valueConverter.raw],
                [106, 'entry_distance_indentation', tuya.valueConverter./*divideBy100*/raw],
			    [107, 'breaker_mode', tuya.valueConverterBasic.lookup({'standard': tuya.enum(0), 'local': tuya.enum(1)})],
                [108, 'breaker_status', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [109, 'status_indication', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [110, 'illumin_threshold', tuya.valueConverter.divideBy10],
                [112, 'block_time', tuya.valueConverter.divideBy10],
                [113, 'parameter_setting_result', tuya.valueConverter.raw],
                [114, 'factory_parameters', tuya.valueConverter.raw],
                [115, 'sensor', tuya.valueConverterBasic.lookup({'turn_on': tuya.enum(0), 'turn_off': tuya.enum(1), 'occupied': tuya.enum(2), 'unoccupied': tuya.enum(3)})], 
            ],
        },
    icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAABpCAMAAAAk7AynAAABAlBMVEX////w7+/f3d3g3t3h39/x8fHi4ODi4OHi4uLe3Nvu7u7+//7r6+vz8/Pj4uHm5OMAicTm5eXp6Ojk4+Tk4uLY1tbd29va2dng39/9/fz8e0L5+vkBiMHh4eH+ezb29vYnm8jV09P8dDXl9fnJyMf5ZCbc8fP8biX2URfxRRDzWST9gTzlsJsLjcN6wNvPz83w+vr+eSz6jEWRzOG74exmt9ar2eftkWv0qn/2w6Cysafp1s46oszz1sQclMWLi3z46d7gw7j2ll70gUrr39pDp87AvbT0zbPra0dUr9H89e7qmH2pqZrtflh6e1PS7PPln4VoaDiRko1aWy6enJbw3d1SHi9FAAAK0ElEQVRo3ryaB1viWhCGlySkE0w7CYbAIgKKiHQVey/by///LXdOSQgSvCphB6TtPnnnm3ZOAp8+rd96zTSra/8ArWlafXj3Oc1Ouz8+aevnN5/K5Q1i5eihjO/lcvnzaP36gzEh7u/TJ+zC/vk+9ah8Wl+7Az/OMWk8GnWBfTp6Kp93f/wYjYkjG/uTtfMnWOppfTLsjTfOR5/G5WFv2B31nmgEuv+G/7l7ft4clrv13vi0NyxDDE43/g1fI3yowG797u5HtzkeB0/l06enf8Wn+jf2u/Xh+WjyVO+O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YGSdgADDdh2W4DjKXZ+i8tAWI9B0MMgzpyysur1di43ywDwpE4tCiBSNmmaRFEVR3oUxpSLM0gLOZjnwnztga9OlVHexfIkZVG/qGIrbC14dFvTV2rXQLAycjdJGdMaPkvV5nDbS+iT3/9ITvYOPrlg8bjYAAAAASUVORK5CYII=',
    };
	
module.exports = definition;

J’ai tenté un appareillage en Bluetooth qui lui fonctionne pour essayez d’obtenir plus d’infos sur les capteurs etc.
Nom de l’appareil HLK-LD2410_216E qui est bien rentrer dans le fichier JS je pense

fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
model: 'HLK-LD2410_216E',
vendor: 'TuYa',
binary_sensor.hlk_ld2410_216e_mouvement
binary_sensor.hlk_ld2410_216e_occupation

Mon problème semble vraiment ce situé dans le fichier JS

Ton fichier me semble pas bon. Il manque l’appel aux constantes.

Voici un fichier que j’ai en « external converter » :

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 tuya = require('zigbee-herdsman-converters/lib/tuya');

const tzLocal = {
        tamper_alarm_switch: {
                key: ['tamper_alarm_switch'],
                convertSet: async (entity, key, value, meta) => {
                        const lookup = {'off': false, 'on': true };
                        value = value.toLowerCase();
                        const pState = lookup [value];
                        await tuya.sendDataPointBool(entity, 101, pState);
                        return {state: {tamper_alarm_switch: value}};
                }
        },
        alarm_mode: {
                key: ['alarm_mode'],
                convertSet: async (entity, key, value, meta) => {
                        value = value.toLowerCase();
                        await tuya.sendDataPointEnum(entity, 102, {'alarm_sound': 0, 'alarm_light': 1, 'alarm_sound_light': 2 }[value]);
                        return {state: {alarm_mode: value}};
                }
        },
        alarm_melody: {
                key: ['alarm_melody'],
                convertSet: async (entity, key, value, meta) => {
                        value = value.toLowerCase();
                        await tuya.sendDataPointEnum(entity, 21, {'melody1': 0, 'melody2': 1, 'melody3': 2}[value]);
                        return {state: {alarm_melody: value}};
                }
        },
        battery: {
                key: ['battery'],
                convertGet: async (entity, key, meta) => {
                  const result = await tuya.sendDataPoint(entity, 15);
                  const batteryData = result.dpValues.find(dpValue => dpValue.dp === 15);
                  if (batteryData) {
                    const batteryLevel = batteryData.data.data[3];
                    return batteryLevel;
                  }
                  return null;
                },
              },
}

const definition = {
// Since a lot of TuYa devices use the same modelID, but use different datapoints
// it's necessary to provide a fingerprint instead of a zigbeeModel
fingerprint: [
{
// The model ID from: Device with modelID 'TS0601' is not supported
// You may need to add \u0000 at the end of the name in some cases
modelID: 'TS0601',
// The manufacturer name from: Device with modelID 'TS0601' is not supported.
manufacturerName: '_TZE200_nlrfgpny',
},
],
model: 'NAS-AB06B2',
vendor: 'Neo',
description: 'Outdoor solar alarm',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints, tzLocal.tamper_alarm_switch,tzLocal.alarm_mode,tzLocal.alarm_melody],
onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
configure: tuya.configureMagicPacket,
exposes: [
        exposes.enum('alarm_state', ea.STATE, ['alarm_sound', 'alarm_light', 'alarm_sound_light', 'normal']).withDescription('Alarm status'),
        exposes.binary('alarm_switch', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable alarm'),
        exposes.binary('tamper_alarm_switch', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable tamper alarm'),
        exposes.binary('tamper_alarm', ea.STATE, 'ON', 'OFF').withDescription('Indicates whether the device is tampered'),
        exposes.enum('alarm_melody', ea.STATE_SET, ['melody1', 'melody2', 'melody3']).withDescription('Alarm sound effect'),
        exposes.enum('alarm_mode', ea.STATE_SET, ['alarm_sound', 'alarm_light', 'alarm_sound_light']).withDescription('Alarm mode'),
        exposes.numeric('alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(60).withValueStep(1).withUnit('min').withDescription('Alarm duration in minutes'),
        exposes.binary('charge_state', ea.STATE, 'Charging', 'Not Charging').withDescription('Charging status'),
        // exposes.numeric('battery', ea.STATE).withDescription('Battery percentage'),
        exposes.numeric('battpercentage', ea.STATE).withUnit('%').withDescription('Remaining battery in % (can take up to 24 hours before reported)'),
        exposes.binary('battery_low', ea.STATE, true, false).withDescription('Indicates if the battery of this device is almost empty'),
],
meta: {
// All datapoints go in here
tuyaDatapoints: [
        [1, 'alarm_state', tuya.valueConverterBasic.lookup({'alarm_sound': 0, 'alarm_light': 1, 'alarm_sound_light': 2,'normal': 3})],
        [13, 'alarm_switch', tuya.valueConverter.onOff],
        [101, 'tamper_alarm_switch', tuya.valueConverter.onOff],
        [20, 'tamper_alarm', tuya.valueConverter.onOff],
        [21, 'alarm_melody', tuya.valueConverterBasic.lookup({'melody1': 0, 'melody2': 1, 'melody3': 2})],
        [102, 'alarm_mode', tuya.valueConverterBasic.lookup({'alarm_sound': 0, 'alarm_light': 1, 'alarm_sound_light': 2})],
        [7, 'alarm_time', tuya.valueConverter.raw],
        [6, 'charge_state', tuya.valueConverter.onOff],
        [15, 'battpercentage', tuya.valueConverter.raw]
],
},
};

module.exports = definition;

Tu n’as pas les premières lignes (commençant par « const ») et qui sont indispensables.

Le convertisseur en .text posté sur le github me parait incorrect :

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 utils = require('zigbee-herdsman-converters/lib/utils');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;


const tuyaExposes = {
    powerOnBehavior: exposes.enum('power_on_behavior', ea.STATE_SET, ['off', 'on', 'previous'])
        .withDescription('Controls the behavior when the device is powered on'),
    lightType: exposes.enum('light_type', ea.STATE_SET, ['led', 'incandescent', 'halogen'])
        .withDescription('Type of light attached to the device'),
    lightBrightnessWithMinMax: e.light_brightness().withMinBrightness().withMaxBrightness().setAccess(
        'state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET).setAccess(
        'min_brightness', ea.STATE_SET).setAccess('max_brightness', ea.STATE_SET),
    countdown: exposes.numeric('countdown', ea.STATE_SET).withValueMin(0).withValueMax(43200).withValueStep(1).withUnit('s')
        .withDescription('Countdown to turn device off after a certain time')
}

const configureMagicPacket = async (device, coordinatorEndpoint, logger) => {
    const endpoint = device.getEndpoint(1);
    await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
};

const fingerprint = (modelID, manufacturerNames) => {
    return manufacturerNames.map((manufacturerName) => {
        return {modelID, manufacturerName};
    })
}

const valueConverterBasic = {
    lookup: (map) => {
        return {
            to: (v) => {
                if (map[v] === undefined) throw new Error(`Value '${v}' is not allowed, expected one of ${Object.keys(map)}`)
                return map[v];
            },
            from: (v) => {
                const value = Object.entries(map).find((i) => i[1] === v);
                if (!value) throw new Error(`Value '${v}' is not allowed, expected one of ${Object.values(map)}`)
                return value[0];
            }
        }
    },
    scale: (min1, max1, min2, max2) => {
        return {to: (v) => utils.mapNumberRange(v, min1, max1, min2, max2), from: (v) => utils.mapNumberRange(v, min2, max2, min1, max1)};
    },
    raw: {to: (v) => v, from: (v) => v},
}

const valueConverter = {
    onOff: valueConverterBasic.lookup({'ON': true, 'OFF': false}),
    powerOnBehavior: valueConverterBasic.lookup({'off': 0, 'on': 1, 'previous': 2}),
    lightType: valueConverterBasic.lookup({'led': 0, 'incandescent': 1, 'halogen': 2}),
    scale0_254to0_1000: valueConverterBasic.scale(0, 254, 0, 1000),
    scale1_255to0_1000: valueConverterBasic.scale(1, 255, 0, 1000),
}


const tzDataPoints = {
    key: ['state', 'brightness', 'min_brightness', 'max_brightness'],
    convertSet: async (entity, key, value, meta) => {
        // A set converter is only called once; therefore we need to loop
        const state = {};
        if (!meta.mapped.meta || !meta.mapped.meta.datapoints) throw new Error('No datapoints map defined');
        const datapoints = meta.mapped.meta.datapoints
        for (const [key, value] of Object.entries(meta.message)) {
            const convertedKey = meta.mapped.meta.multiEndpoint ? `${key}_${meta.endpoint_name}` : key;
            const dpEntry = datapoints.find(d => d[1] === convertedKey);
            if (!dpEntry || !dpEntry[1]) {
                throw new Error(`No datapoint defined for '${key}'`);
            }
            const dpId = dpEntry[0];
            const convertedValue = dpEntry[2].to(value);
            await tuya.sendDataPointValue(entity, dpId, convertedValue, 'dataRequest', 1);
            state[convertedKey] = value;
        }
        return {state};
    }
};

const fzDataPoints = {
    cluster: 'manuSpecificTuya',
    type: ['commandDataResponse', 'commandDataReport'],
    convert: (model, msg, publish, options, meta) => {
    const result = {};
    if (!model.meta || !model.meta.datapoints) throw new Error('No datapoints map defined');
        const datapoints = model.meta.datapoints
        for (const dpValue of msg.data.dpValues) {
        const dpId = dpValue.dp;
        const dpEntry = datapoints.find(d => d[0] === dpId);
        if (dpEntry) {
            const value = tuya.getDataValue(dpValue);
            result[dpEntry[1]] = dpEntry[2].from(value);
        } else {
            meta.logger.warn(`Datapoint ${dpId} not defined for '${meta.device.manufacturerName}' with data ${JSON.stringify(dpValue)}`);
                }
            }
            return result;
        }
    };

const definition = {
    fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
    model: 'RTX PRO',
    vendor: 'TuYa',
    description: 'Human presence sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime, 
    configure: tuya.configureMagicPacket,

   
    
    exposes: [
        e.presence(), 
           
        e.enum('approach_distance', ea.STATE, ['none', 'small_movement', 'large_movement'])
            .withDescription('traffic of movement from the point of view of the radar'),
        e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(600).withValueStep(1)
            .withDescription('detection delay'),
        e.numeric('detection_range', ea.STATE_SET).withValueMin(150).withValueMax(600).withValueStep(10)
            .withDescription('far sensitivity of the radar'),
        e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Sensitivity of the radar'),
        e.numeric('motion_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Motionless sensitivity of the radar'),
        e.numeric("target_distance", ea.STATE).withDescription("Distance to target").withUnit("m"),
        e.numeric('battery_level', ea.STATE).withDescription('battery level').withUnit('%'),
           
    ],
    meta: {
        tuyaDatapoints: [
            [1, 'presence', tuya.valueConverter.trueFalse1],
            [11, 'approach_distance', tuya.valueConverterBasic.lookup({'none': 0, 'small_movement': 1, 'large_movement': 2})],
            [12, 'detection_delay', tuya.valueConverter.raw],
            [13, 'detection_range', tuya.valueConverter.raw],
            [15, 'radar_sensitivity', tuya.valueConverter.raw],
            [16, 'motion_sensitivity', tuya.valueConverter.raw],
            [19, "target_distance", tuya.valueConverter.divideBy100],
            [101, 'battery_level', tuya.valueConverter.raw],
            
         
        ],
    },
};

module.exports = definition;

Supprime ton fichier .js et crée en un nouveau, vierge, puis édite le et colle les lignes ci-dessous dedans. Enregistre le tout et redémarre le système.

Tu as un lien vers le modèle exacte de ton détecteur (il y a des appels qui ne correspondent à rien pour un détecteur de présence dans le convertisseur posté en .text).

Utilises les lignes ci-dessous à coller dans ton fichier .js :

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: tuya.fingerprint('TS0601', ['_TZE204_kyhbrfyl']),
    model: 'RTX PRO',
    vendor: 'TuYa',
    description: 'Human presence sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: console.log, 
    // configure: tuya.configureMagicPacket,
   
    exposes: [
        e.presence(), 
           
        exposes.enum('movement_type', ea.STATE, ['none', 'small', 'large'])
            .withDescription('traffic of movement from the point of view of the radar'),
        exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(600).withValueStep(1).withUnit('s')
            .withDescription('detection delay'),
        exposes.numeric('detection_range', ea.STATE_SET).withValueMin(150).withValueMax(600).withValueStep(10)
            .withDescription('far sensitivity of the radar'),
        exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Sensitivity of the radar'),
        exposes.numeric('motion_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(7).withValueStep(1)
            .withDescription('Motionless sensitivity of the radar'),
        exposes.numeric('current_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
        exposes.numeric('battery_level', ea.STATE).withDescription('battery level').withUnit('%'),
           
    ],
    meta: {
        tuyaDatapoints: [
            [1, 'presence',tuya.valueConverter.trueFalse1],
            [11, 'movement_type', tuya.valueConverterBasic.lookup({'none': 0, 'small': 1, 'large': 2})],
            [12, 'detection_delay', tuya.valueConverter.raw],
            [13, 'detection_range', tuya.valueConverter.raw],
            [15, 'radar_sensitivity', tuya.valueConverter.raw],
            [16, 'motion_sensitivity', tuya.valueConverter.raw],
            [19, 'current_distance', tuya.valueConverter.raw],
            [101, 'battery_level', tuya.valueConverter.raw],
            
         
        ],
    },
};

module.exports = definition;

Toujours pareil. J’ai supprimer le fichier et crée un nouveau fichier radar.js j’ai coller ton code dedans. (le dernier de ton message) J’ai modifier le fichier configuration external_converters: - radar.js J’ai redémarré HA quand je vais de nouveau dans le fichier configuration j’ai toujours external_converters. Et dès que je lance l’appareillage quand il a fini je retourne dans le fichier et external_converters à disparu.

Warning 2023-12-02 11:20:48Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_kyhbrfyl'
Warning 2023-12-02 11:20:48Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Debug 2023-12-02 11:20:48Received Zigbee message from '0xa4c1380654317f70', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":19}],"seq":6401}' from endpoint 1 with groupID null

Ca va être compliqué de t’aider plus sans avoir le même détecteur.
A priori, le convertisseur externe sur le github est corrompu.

ci-dessous le lien vers la procédure pour créer un convertisseur :

Remplace déjà dans ton fichier configuration.yaml les lignes

external_converters:
  - radar.js

par

advanced:
  log_level: debug
external_converters:
  - radar.js

Après, il faudrait vérifier que les tuyadatapoints soient les bons (si tu as une passerelle tuya).

Remplace dans ton fichier radar.js

model: 'RTX PRO',

par

model: 'NAS-PS09B2',

et

vendor: 'TuYa',

par

vendor: 'Neo',

Merci pour tes infos malheureusement toujours pareil. Et oui sans avoir le même appareil cela est difficile de m’aider. Tu as essayer au moins. Je vais attendre un peu j’aurais surement une MAJ de ce capteur prochainement enfin j’espère

Est-ce que pour tes essais, tu avais supprimé l’appareil de la liste des appareils de z2m à chaque fois puis tenté de le réappairer après avoir modifié l’external converter ?

(suppression depuis l’interface z2m et depuis l’intégration MQTT)

oui a chaque fois je supprime le détecteur

Bon, ben je suis au bout de ce que je peux faire, il te reste éventuellement chatGPT et sinon, attendre que l’appareil soit pris en charge. Demande quand même sur le github si quelqu’un d’autre a réussi à intégrer l’external converter… Bonne chance et bon courage :wink:

1 « J'aime »