Capteur ir zigbeelinker


pareille

Là j’ai plus de solution désolé.
Tu es dans quel coin?

sud seine et marne
je me deplace partout en ile de france

merci les gars pour votre patiente
je vais essayer de chercher encore

j’ai réussit incroyable


//       Converter for TS004F.        https://www.youtube.com/channel/UCJRaKbgv8u1O4OwG-0D3uRw
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;

const motionSensorDetector = {
    cluster: 'ssIasZone',
    type: ['attributeReport'],
    convert: (model, msg, publish, options, meta) => {
            if (msg.data.zoneStatus !== 1) {
                // In case of 0 no occupancy is reported.
                // https://github.com/Koenkk/zigbee2mqtt/issues/467
                return;
            }

            // The occupancy sensor only sends a message when motion detected.
            // Therefore we need to publish the no_motion detected by ourselves.
            const timeout = options && options.hasOwnProperty('occupancy_timeout') ?
                options.occupancy_timeout : 10;   // occupancy delay in seconds

            // Stop existing timers because motion is detected and set a new one.
            globalStore.getValue(msg.endpoint, 'timers', []).forEach((t) => clearTimeout(t));
            globalStore.putValue(msg.endpoint, 'timers', []);

            if (timeout !== 0) {
                const timer = setTimeout(() => {
                    publish({occupancy: false});
                }, timeout * 1000);

                globalStore.getValue(msg.endpoint, 'timers').push(timer);
            }

            // No occupancy since
            if (options && options.no_occupancy_since) {
                options.no_occupancy_since.forEach((since) => {
                    const timer = setTimeout(() => {
                        publish({no_occupancy_since: since});
                    }, since * 1000);
                    globalStore.getValue(msg.endpoint, 'timers').push(timer);
                });
            }

            if (options && options.no_occupancy_since) {
                return {occupancy: true, no_occupancy_since: 0};
            } else {
                return {occupancy: true};
            }
        
            }
};


 const definition = {
//    fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts'}],
    fingerprint: [{ieee_address: '0x00124b0005b4bd43'}],   // WARNING! Change this ieee_address for yours ieee_address!!!!
    zigbeeModel: ['TS0202'],
    model: 'TS0202',
    vendor: 'TuYa',
    description: 'Motion sensor',
    fromZigbee: [ motionSensorDetector ],
    toZigbee: [],
    exposes: [e.occupancy()],
};


module.exports = definition;

oui mais Ta fait quoi en fin de compte ?

1 « J'aime »

j’ai trouve sa sur le net je le mis dans .js et sa fonctionne
le seul ic je ne pas la batterie

Bravo, félicitation :+1: :clap:

J ai pas la remonte de la batterie
Vous avez pas une solution :grin:

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.