Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New device support - GiEX Water Valve GX02 #7229

Closed
dgaust opened this issue Mar 17, 2024 · 1 comment
Closed

New device support - GiEX Water Valve GX02 #7229

dgaust opened this issue Mar 17, 2024 · 1 comment

Comments

@dgaust
Copy link

dgaust commented Mar 17, 2024

Link

https://www.aliexpress.com/item/1005006547328147.html

Database entry

{"id":35,"type":"EndDevice","ieeeAddr":"0xa4c138bb891ac9d9","nwkAddr":11184,"manufId":4417,"manufName":"_TZE204_7ytb3h8u","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"G@ -\u0011","65506":56,"65508":0,"65534":0,"appVersion":73,"manufacturerName":"_TZE204_7ytb3h8u","zclVersion":3,"modelId":"TS0601","powerSource":3,"stackVersion":0,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":73,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1324213189},"lastSeen":1710669460078}

Comments

This is an updated version of the QT06 devices that are currently supported by zigbee2mqtt, I have managed to create an external definitions file for the device which works. It's the same as the QT06_2 device, just a different fingerprint.

External definition

const exposes = require('zigbee-herdsman-converters/lib/exposes');
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 legacy = require('zigbee-herdsman-converters/lib/legacy');
const MINUTES_IN_A_DAY = 1440;
const SECONDS_IN_12_HOURS = 43200;

module.exports = [
    {
        fingerprint: [
            {modelID: 'TS0601', manufacturerName: '_TZE204_7ytb3h8u'},
        ],
        model: 'GX02',
        vendor: 'GiEX',
        description: 'GX02 GiEX Water Valve',
        extend: [],
        meta: {},
        onEvent: tuya.onEventSetLocalTime,
        fromZigbee: [legacy.fromZigbee.giexWaterValve],
        toZigbee: [legacy.toZigbee.giexWaterValve],
        exposes: [
            e.battery(),
            e.binary(legacy.giexWaterValve.state, ea.STATE_SET, 'ON', 'OFF')
                .withDescription('State'),
            e.enum(legacy.giexWaterValve.mode, ea.STATE_SET, ['duration', 'capacity'])
                .withDescription('Irrigation mode'),
            e.numeric(legacy.giexWaterValve.cycleIrrigationNumTimes, ea.STATE_SET)
                .withValueMin(0)
                .withValueMax(100)
                .withDescription('Number of cycle irrigation times, set to 0 for single cycle'),
            e.numeric(legacy.giexWaterValve.irrigationStartTime, ea.STATE)
                .withDescription('Last irrigation start time'),
            e.numeric(legacy.giexWaterValve.irrigationEndTime, ea.STATE)
                .withDescription('Last irrigation end time'),
            e.numeric(legacy.giexWaterValve.lastIrrigationDuration, ea.STATE)
                .withDescription('Last irrigation duration'),
            e.numeric(legacy.giexWaterValve.waterConsumed, ea.STATE)
                .withUnit('L')
                .withDescription('Last irrigation water consumption'),
            e.numeric(legacy.giexWaterValve.irrigationTarget, ea.STATE_SET)
                .withValueMin(0)
                .withValueMax(SECONDS_IN_12_HOURS)
                .withUnit('seconds or litres')
                .withDescription('Irrigation target, duration in seconds or capacity in litres (depending on mode), ' +
                    'set to 0 to leave the valve on indefinitely, ' +
                    'for safety reasons the target will be forced to a minimum of 10 seconds in duration mode'),
            e.numeric(legacy.giexWaterValve.cycleIrrigationInterval, ea.STATE_SET)
                .withValueMin(0)
                .withValueMax(SECONDS_IN_12_HOURS)
                .withUnit('sec')
                .withDescription('Cycle irrigation interval'),
        ],
    },
];
@Koenkk
Copy link
Owner

Koenkk commented Mar 17, 2024

Added in f3e846f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants