# I need help with water sensor "device.js"

**URL:** <https://community.homey.app/t/i-need-help-with-water-sensor-device-js/49333>\
**Category:** Developers\
**Tags:** zigbee\
**Created:** [July 11, 2021, 3:58pm UTC](https://community.homey.app/t/i-need-help-with-water-sensor-device-js/49333 "2021-07-11T15:58:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlieCat](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@CharlieCat](https://community.homey.app/u/CharlieCat)\
**Post date:** [July 11, 2021, 3:58pm UTC](https://community.homey.app/t/i-need-help-with-water-sensor-device-js/49333/1 "2021-07-11T15:58:50Z")

</div>

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:**

```javascript
'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

---

<div class="post-metadata">

**Author:** ![CharlieCat](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@CharlieCat](https://community.homey.app/u/CharlieCat)\
**Post date:** [July 18, 2021, 6:14pm UTC](https://community.homey.app/t/i-need-help-with-water-sensor-device-js/49333/3 "2021-07-18T18:14:12Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![CharlieCat](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@CharlieCat](https://community.homey.app/u/CharlieCat)\
**Post date:** [July 19, 2021, 9:03am UTC](https://community.homey.app/t/i-need-help-with-water-sensor-device-js/49333/4 "2021-07-19T09:03:18Z")

</div>

So they use same clusters for all devices lol
