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

[Feature request]: Zigbee Fingerbot Additional Options #18011

Closed
Gr8z opened this issue Jun 13, 2023 · 10 comments
Closed

[Feature request]: Zigbee Fingerbot Additional Options #18011

Gr8z opened this issue Jun 13, 2023 · 10 comments
Labels
feature request Feature request

Comments

@Gr8z
Copy link

Gr8z commented Jun 13, 2023

Is your feature request related to a problem? Please describe

The zigbee fingerbot only has limited options such as:

Switch on/off and power_on_behaviour

Describe the solution you'd like

add support for more options such as:

  • Mode (Click/Switch)
  • Touch Control (On/Off)
  • Down Movement (0-100%)
  • Up Movement (0-100%)
  • etc

Describe alternatives you've considered

N/A

Additional context

N/A

@Gr8z Gr8z added the feature request Feature request label Jun 13, 2023
@Gr8z
Copy link
Author

Gr8z commented Jun 13, 2023

Maybe this helps?

debug 2023-06-13 20:56:13: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":101},{"data":{"data":[0,0,0,85],"type":"Buffer"},"datatype":2,"dp":102}],"seq":10752}'
debug 2023-06-13 20:56:13: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":103},{"data":{"data":[1],"type":"Buffer"},"datatype":4,"dp":104}],"seq":11008}'
debug 2023-06-13 20:56:14: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":106},{"data":{"data":[0,0,0,100],"type":"Buffer"},"datatype":2,"dp":105}],"seq":11264}'
debug 2023-06-13 20:56:14: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":1,"dp":108},{"data":{"data":[1],"type":"Buffer"},"datatype":1,"dp":107}],"seq":11520}'
debug 2023-06-13 20:56:18: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[255,255,255,0],"type":"Buffer"},"datatype":0,"dp":109}],"seq":11776}'
debug 2023-06-13 20:56:18: No converter available for 'TS0001_1' with cluster 'manuSpecificTuya' and type 'commandActiveStatusReport' and data '{"dpValues":[{"data":{"data":[0,0,0,237],"type":"Buffer"},"datatype":2,"dp":111}],"seq":12032}'

@Gr8z
Copy link
Author

Gr8z commented Jun 14, 2023

I did some Zigbee sniffing and compiled this list as well:

code Name type values
101 Mode enum Click/Switch/Program
107 Touch Control bool on/off
104 Reverse enum up_on/up_off
102 Down Movement number 50-100
106 Up Movement number 0-50
103 Sustain Time value 0s-10s
1 Switch enum On/Off
105 Battery number 0-100

@Gr8z
Copy link
Author

Gr8z commented Jun 14, 2023

Tried this code by following the docs but couldn't get anywhere :(

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 extend = require('zigbee-herdsman-converters/lib/extend')
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: 'TS0001_1',
      // The manufacturer name from: Device with modelID 'TS0601' is not supported.
      manufacturerName: '_TZ3210_dse8ogfy',
    },
  ],
  zigbeeModel: ['TS0001'],
  model: 'TS0001_1',
  vendor: 'Adaprox',
  description: 'White Zigbee FingerBot plus',
  fromZigbee: [tuya.fz.datapoints],
  toZigbee: [tuya.tz.datapoints],
  configure: tuya.configureMagicPacket,
  exposes: [
    // Here you should put all functionality that your device exposes
    e.battery(),
    e.enum('101', ea.STATE_SET, ['Click', 'Switch', 'Program']),
    e.boolean('107', ea.STATE_SET),
    e.enum('104', ea.STATE_SET, ['up_on', 'up_off']),
    e.percent('102', ea.STATE_SET),
    e.percent('106', ea.STATE_SET),
    e.value('103', ea.STATE_SET, {min: 0, max: 10, unit: 's'}),
    e.enum('1', ea.STATE_SET, ['On', 'Off']),
  ],
  meta: {
    // All datapoints go in here
    tuyaDatapoints: [
      [101, 'mode', tuya.converters.enum({0: 'Click', 1: 'Switch', 2: 'Program'})],
      [107, 'touch_control', tuya.converters.boolean],
      [104, 'reverse', tuya.converters.enum({0: 'up_on', 1: 'up_off'})],
      [102, 'down_movement', tuya.converters.percent],
      [106, 'up_movement', tuya.converters.percent],
      [103, 'sustain_time', tuya.converters.value({min: 0, max: 10, unit: 's'})],
      [1, 'switch', tuya.converters.enum({1: 'On', 0: 'Off'})],
      [105, 'battery', tuya.converters.value({min: 0, max: 100})],
    ],
  },
}

module.exports = definition

@Koenkk
Copy link
Owner

Koenkk commented Jun 14, 2023

Instead of e.g. e.enum('101', ea.STATE_SET, ['Click', 'Switch', 'Program']), use e.enum('mode', ea.STATE_SET, ['Click', 'Switch', 'Program']),

@Gr8z
Copy link
Author

Gr8z commented Jun 15, 2023

I get this error:

      .enum('mode', ea.STATE_SET, ['click', 'switch', 'program'])
           ^
TypeError: e.enum is not a function

@Koenkk
Copy link
Owner

Koenkk commented Jun 15, 2023

This should be fixed after Koenkk/zigbee-herdsman-converters#5883 is merged.

@Gr8z
Copy link
Author

Gr8z commented Jun 16, 2023

Awesome, thank you!

@Gr8z Gr8z closed this as completed Jun 16, 2023
@didi789
Copy link

didi789 commented Jun 20, 2023

@kirovilya
Copy link
Contributor

@kmanan
Copy link

kmanan commented Apr 25, 2024

I did some Zigbee sniffing and compiled this list as well:

code Name type values
101 Mode enum Click/Switch/Program
107 Touch Control bool on/off
104 Reverse enum up_on/up_off
102 Down Movement number 50-100
106 Up Movement number 0-50
103 Sustain Time value 0s-10s
1 Switch enum On/Off
105 Battery number 0-100

What does up_on and up_off mean in this case, sorry maybe it's obvious to everyone but for reverse up_on and up_off don't make sense to me.

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

No branches or pull requests

5 participants