Koenkk / zigbee2mqtt

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

[New device support]: Nous E8 - smoke sensor #23941

Closed Bobsilvio closed 2 weeks ago

Bobsilvio commented 1 month ago

Link

https://www.zigbee2mqtt.io/devices/E8.html

Database entry

{"id":38,"type":"EndDevice","ieeeAddr":"0x8c6fb9fffe2cf889","nwkAddr":2373,"manufId":4098,"manufName":"_TZE284_0zaf1cr8","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"modelId":"TS0601","manufacturerName":"_TZE284_0zaf1cr8","stackVersion":0,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":67,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1726070066310}

Zigbee2MQTT version

1.40.1

Comments

This a new device E8 Nous, is a smoke sensor

External definition

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_0zaf1cr8',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;

What does/doesn't work with the external definition?

nothing work and nothing see

ahorseman commented 3 weeks ago

I've tried with the extended definition according to the tutorials for Tuya devices (https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html#_4-mapping-the-datapoints), but no luck. I don't get any datapoint:

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

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: '_TZE284_0zaf1cr8',
        },
    ],
    zigbeeModel: ['TS0601'],
    model: 'E8',
    vendor: 'Nous',
    description: 'Nous Smoke Sensor E8',
    extend: [],
    meta: {},
    description: 'Nous E8 Smoke Sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    configure: tuya.configureMagicPacket,
    exposes: [
        // Here you should put all functionality that your device exposes
    ],
    meta: {
        // All datapoints go in here
        tuyaDatapoints: [],
    },
    extend: [
        // A preferred new way of extending functionality.
    ],
};

module.exports = definition;
jschwarz88 commented 3 weeks ago

Hi there, just got mine today. According to https://www.zigbee2mqtt.io/devices/E8.html support should have been added in sept. '24.

I'll take a look at the documentation for tuya devices/endpoints as well...

kersten-lohmeyer commented 3 weeks ago

Just installed Z2M just to find out this device is not supported although it says that on the box and also here: https://www.zigbee2mqtt.io/devices/E8.html

Luckily I only ordered one for now.

Koenkk commented 2 weeks ago

Added!

Changes will be available in the dev branch in a few hours from now.

kersten-lohmeyer commented 2 weeks ago

Thank you so much! Any ETA when this release is coming to Home Assistant?

Matten-Matten commented 2 weeks ago

Hello @Koenkk , I manually adjusted the tuya.js on my system as you changed, but it didn't work. I had to change it like this.

    {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE200_0zaf1cr8', '_TZE204_ntcy3xu1', '_TZE284_0zaf1cr8']),
        model: 'TS0601_smoke_1',
        vendor: 'Tuya',
        description: 'Smoke sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tuya.tz.datapoints],
        configure: tuya.configureMagicPacket,
        exposes: [e.smoke(), e.tamper(), e.battery_low()],
        meta: {
            tuyaDatapoints: [
                [1, 'smoke', tuya.valueConverter.trueFalse0],
                [4, 'tamper', tuya.valueConverter.raw],
                [14, 'battery_low', tuya.valueConverter.trueFalse0],
            ],
        },
        whiteLabel: [tuya.whitelabel('Nous', 'E8', 'Smoke sensor', ['_TZE200_0zaf1cr8', '_TZE284_0zaf1cr8'])],
    },

I also adjusted the fingerprint.

greeting Matten Matten

kersten-lohmeyer commented 2 weeks ago

Hello @Koenkk , I manually adjusted the tuya.js on my system as you changed, but it didn't work. I had to change it like this.

    {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE200_0zaf1cr8', '_TZE204_ntcy3xu1', '_TZE284_0zaf1cr8']),
        model: 'TS0601_smoke_1',
        vendor: 'Tuya',
        description: 'Smoke sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tuya.tz.datapoints],
        configure: tuya.configureMagicPacket,
        exposes: [e.smoke(), e.tamper(), e.battery_low()],
        meta: {
            tuyaDatapoints: [
                [1, 'smoke', tuya.valueConverter.trueFalse0],
                [4, 'tamper', tuya.valueConverter.raw],
                [14, 'battery_low', tuya.valueConverter.trueFalse0],
            ],
        },
        whiteLabel: [tuya.whitelabel('Nous', 'E8', 'Smoke sensor', ['_TZE200_0zaf1cr8', '_TZE284_0zaf1cr8'])],
    },

I also adjusted the fingerprint.

greeting Matten Matten

Can I adjust this file when running Z2M as an addon in HA? And if yes how?

jschwarz88 commented 2 weeks ago

@Matten-Matten: I tried testing your adjustments using a external converter (NousE8.js):

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

const definition =     {
    fingerprint: tuya.fingerprint('TS0601', ['_TZE200_0zaf1cr8', '_TZE204_ntcy3xu1', '_TZE284_0zaf1cr8']),
    model: 'TS0601_smoke_1',
    vendor: 'Tuya',
    description: 'Smoke sensor',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
    configure: tuya.configureMagicPacket,
    exposes: [e.smoke(), e.tamper(), e.battery_low()],
    meta: {
        tuyaDatapoints: [
            [1, 'smoke', tuya.valueConverter.trueFalse0],
            [4, 'tamper', tuya.valueConverter.raw],
            [14, 'battery_low', tuya.valueConverter.trueFalse0],
        ],
    },
    whiteLabel: [tuya.whitelabel('Nous', 'E8', 'Smoke sensor', ['_TZE200_0zaf1cr8', '_TZE284_0zaf1cr8'])],
};

module.exports = definition;

Unfortunately that didn't work... After removing the smoke detector from Z2M it couldn't be paired again.

Euer-Ernst commented 2 weeks ago

@Matten-Matten Thank you, I am doing the same and after restarting my Docker Container it works without deleting / reconnecting my device.

Frontend-Version: 0.7.4 Zigbee Herdsman Konverter Version: 20.21.0 Zigbee Herdsman Version: 2.1.3

kersten-lohmeyer commented 2 weeks ago

@Koenkk I installed Z2M 1.40.2 in Home Assistant and the device is still unsupported.

image
markusmauch commented 2 weeks ago

Same here, I installed Zigbee2Mqtt v1.40.2-1, restarted Home Assistant, removed and then re-joined the device and it is still 'unsupported'

The log says: 2024-10-02 17:23:24] warning: z2m: Device '0x403059fffe6372cb' with Zigbee model 'TS0601' and manufacturer name '_TZE284_0zaf1cr8' is NOT supported, please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

Koenkk commented 2 weeks ago

Made a mistake, added it now

Changes will be available in the dev branch in a few hours from now.

rionshin commented 1 week ago

Made a mistake, added it now

Changes will be available in the dev branch in a few hours from now.

@Koenkk I am trying to pull the dev but it said no changes, are converters merged to zigbee2mqtt as well ? :

pi@homebridge:/opt/zigbee2mqtt $ git config remote.origin.fetch "+refs/heads/:refs/remotes/origin/" pi@homebridge:/opt/zigbee2mqtt $ git fetch --all Fetching origin remote: Enumerating objects: 123, done. remote: Counting objects: 100% (120/120), done. remote: Compressing objects: 100% (56/56), done. remote: Total 123 (delta 70), reused 102 (delta 64), pack-reused 3 (from 1) Receiving objects: 100% (123/123), 234.81 KiB | 3.09 MiB/s, done. Resolving deltas: 100% (70/70), completed with 10 local objects. From https://github.com/Koenkk/zigbee2mqtt

my git config:

[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://github.com/Koenkk/zigbee2mqtt.git fetch = +refs/heads/:refs/remotes/origin/ [branch "master"] remote = origin merge = refs/heads/master [branch "dev"] remote = origin merge = refs/heads/dev

Koenkk commented 1 week ago

make sure to execute "npm ci" after updating

rionshin commented 1 week ago

make sure to execute "npm ci" after updating

 @Koenkk Thanks, i am "idiot" :) i didn't realize i already fetch it, that's why it said all is up to date.

kersten-lohmeyer commented 1 week ago

Would be nice anyway to have a minor HA addon update. @Koenkk

daytrax commented 1 week ago

Same here, system is up to Date. All fresh , HASS and Zigbee2MQTT-Version [1.40.2]

Nous Smoke E8 will be known as unsupported Device

??

kersten-lohmeyer commented 1 week ago

Nous took their E8 off Amazon for a few weeks to "fix" certain things. Now it's available for purchase again. I just wish the Z2M developer would already release the new version on HA. Pretty please! 😚

daytrax commented 1 week ago

1 have one here and 6 come this week from amazon :(

kersten-lohmeyer commented 1 week ago

1 have one here and 6 come this week from amazon :(

I also have one and need 3 more. But I am not ordering until I know it's working with Z2M.

Koenkk commented 6 days ago

It's available in the dev branch for now (and the 1 November release)