Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.67k stars 1.64k forks source link

[New device support]: FORIA F00XN00-04-1 #22002

Open dinamik1488 opened 4 months ago

dinamik1488 commented 4 months ago

Link

https://svetomaniya.ru/product/00000018475

Database entry

{"id":31,"type":"EndDevice","ieeeAddr":"0xa4c1381c65b01ad8","nwkAddr":7305,"manufId":4417,"manufName":"_TZ3000_etufnltx","powerSource":"Battery","modelId":"TS1002","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":261,"inClusterList":[1,3,4,6,4096,57345,0],"outClusterList":[3,4,5,6,8,4096,25,10],"clusters":{"genBasic":{"attributes":{"65503":"XT�-\u0012^T�-\u0018_T�-\u0016","65506":55,"65508":0,"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZ3000_etufnltx","zclVersion":3,"appVersion":70,"modelId":"TS1002","powerSource":3}},"genOnOff":{"attributes":{"tuyaOperationMode":1}},"manuSpecificTuya_2":{"attributes":{"53265":1}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":30}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-2021484159},"lastSeen":1711804995069}

Comments

Dimmer for 4 groups

Everything works. But when dimming, the values jump to 254 and back. temp color works well

50cc891de285bd7bd643f6036725080e webp (1)

External definition

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

const definition = {
    fingerprint: [{modelID: 'TS1002', manufacturerName: '_TZ3000_etufnltx'}],
        model: 'F00XN00-04-1',
        vendor: 'FORIA',
        description: 'Dimmer',
        fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_move_to_level, fz.command_move_to_color_temp, fz.command_step_color_temperature, fz.command_step],
        toZigbee: [],
        exposes: [e.battery(), e.battery_voltage(), e.action(['on', 'off', 'brightness_move_to_level', 'color_temperature_move'])],
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint = device.getEndpoint(1);
            await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
            await endpoint.command('genGroups', 'miboxerSetZones', {zones: [
                {zoneNum: 1, groupId: 101},
                {zoneNum: 2, groupId: 102},
                {zoneNum: 3, groupId: 103},
                {zoneNum: 4, groupId: 104},
            ]});
            await endpoint.command('genBasic', 'tuyaSetup', {}, {disableDefaultResponse: true});
        },
    };

module.exports = definition;
Koenkk commented 4 months ago

the values jump to 254 and back.

Looks like an issue of the device itself since z2m just passes the value.

Could you make a PR to add out-of-the-box support for this device?