Homey Community Forum

I need help with water sensor "device.js"

Hi!
I wanted to make support for Water sensor I brough like week ago and I’m stuck on missing_cluster error, I cannot find a cluster or guide for this

my code:

'use strict';

const { CLUSTER } = require('zigbee-clusters');
const { ZigBeeDevice } = require('homey-zigbeedriver');
const OnOffBoundCluster = require('../../lib/OnOffBoundCluster');

class WaterSensor extends ZigBeeDevice {

  onNodeInit() {
    // Register measure_battery capability and configure attribute reporting
    /*this.batteryThreshold = 20;
    this.registerCapability('alarm_battery', CLUSTER.POWER_CONFIGURATION, {
      getOpts: {
        getOnStart: true,
      },
      reportOpts: {
        configureAttributeReporting: {
          minInterval: 0, // No minimum reporting interval
          maxInterval: 60000, // Maximally every ~16 hours
          minChange: 5, // Report when value changed by 5
        },
      },
    });*/

    this.registerCapability('alarm_water', CLUSTER.ALARMS)

    // Bind bound cluster which handles incoming commands from the node, must be hardcoded on
    // endpoint 1 for this device
    this.zclNode.endpoints[1].bind(CLUSTER.ON_OFF.NAME, new OnOffBoundCluster({
      onWithTimedOff: this._onWithTimedOffCommandHandler.bind(this),
    }));
  }

}

module.exports = WaterSensor;

I used something from com.ikea.tradfri App

So I found out that Water Sensor which I got (from company CentraLite) is very similar to Samsung Smartthings sensors, still (in time of writing this) I cannot get correct Cluster Number, but Door Sensors, Motion Sensors and Plug are working

Thanks for reading (of my ununderstanding of Zigbee Clusters)

So they use same clusters for all devices lol