Giter Site home page Giter Site logo

Comments (6)

Koenkk avatar Koenkk commented on August 20, 2024

Please try with the latest dev firmware (doesn't require re-pairing of devices), this should fix the undefined/message from coordinator errors which are holding you from continuing. (https://github.com/Koenkk/Z-Stack-firmware/tree/dev/coordinator/CC2531/bin)

from zigbee-herdsman-converters.

j4c3 avatar j4c3 commented on August 20, 2024

Looks like that did it.

zigbee2mqtt:info 2019-2-22 21:03:33 Succesfully configured TEST MCT-350 (0x000d6f000ccfb76c)
zigbee2mqtt:debug 2019-2-22 21:04:36 Received zigbee message of type 'attReport' with data '{"cid":"genPowerCfg","data":{"batteryVoltage":26}}' of device 'MCT-350 SMA' (0x000d6f000ccfb76c)

Thanks again!

from zigbee-herdsman-converters.

j4c3 avatar j4c3 commented on August 20, 2024

Well, maybe. Upon restarting zigbee2mqtt, I see:
zigbee2mqtt:error 2019-2-22 21:57:31 Failed to configure MCT-350 (1) (0x000d6f000ccfb76c) ('Error: AF data request fails, status code: 240. MAC transaction expired.')

But, activating it still generates messages:
zigbee2mqtt:warn 2019-2-22 21:57:35 No converter available for 'MCT-350 SMA' with cid 'ssIasZone', type 'statusChange' and data '{"cid":"ssIasZone","zoneStatus":33}' zigbee2mqtt:debug 2019-2-22 21:57:35 Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":33}' of device 'MCT-350 SMA' (0x000d6f000ccfb76c)

Not 100% sure yet, but in this state, I haven't seen it report a battery status.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

The configure only has to succeed once, it's not strange that this could fail the next time, as the device is probably sleeping.

Can you add to devices.js:

{
        zigbeeModel: ['MCT-350 SMA'],
        model: 'MCT-350',
        vendor: 'Visonic',
        description: 'Door and window contact sensor',
        supports: 'contact',
        fromZigbee: [fz.heiman_contact],
        toZigbee: [],
    },

from zigbee-herdsman-converters.

j4c3 avatar j4c3 commented on August 20, 2024

It looks good. I can't tell the low battery reporting, yet, but the tamper is correct. I wasn't sure if contact: true would mean that the the device should be closed, or if the contact sensor had been triggered.

I just got a Aqara door/window sensor, and the True/False for Closed/Open on that device are opposite from the MCT-350 (False when closed, True when open) using the heiman_contact converter.

Thanks!

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Contact should be true when the door is closed, current behaviour is wrong.

Add to:

devices.js

{
        zigbeeModel: ['MCT-350 SMA'],
        model: 'MCT-350',
        vendor: 'Visonic',
        description: 'Door and window contact sensor',
        supports: 'contact',
        fromZigbee: [fz.visonic_contact],
        toZigbee: [],
    },

fromZigbee.js

visonic_contact: {
        cid: 'ssIasZone',
        type: 'statusChange',
        convert: (model, msg, publish, options) => {
            const zoneStatus = msg.data.zoneStatus;
            return {
                contact: !((zoneStatus & 1) > 0), // Bit 1 = Alarm: Contact detection
                tamper: (zoneStatus & 1<<2) > 0, // Bit 3 = Tamper status
                battery_low: (zoneStatus & 1<<3) > 0, // Bit 4 = Battery LOW indicator
            };
        },
    },

If this works, please make a pull request.

from zigbee-herdsman-converters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.