Koenkk / zigbee2mqtt

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

[New device support]: I have tried to set this up using the guide with no luck #24900

Open jamiegalbreath opened 1 week ago

jamiegalbreath commented 1 week ago

Link

https://www.amazon.co.uk/dp/B0DG8PJC5G?ref=ppx_yo2ov_dt_b_fed_asin_title

Database entry

{"id":2,"type":"EndDevice","ieeeAddr":"0xa4c138ce596d0846","nwkAddr":57126,"manufId":4417,"manufName":"_TZ3000_402vrq2i","powerSource":"Battery","modelId":"TS004F","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":260,"inClusterList":[1,3,4,6,4096,0],"outClusterList":[3,4,5,6,8,4096,25,10],"clusters":{"genBasic":{"attributes":{"stackVersion":0,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1732451631190}

Zigbee2MQTT version

1.41.0 commit: unknown

Comments

I have tried to set this up using the guide with no luck. Help would be greatly appreciated.

External definition

const {battery, onOff, commandsOnOff, commandsLevelCtrl} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['TS004F'],
    model: 'TS004F',
    vendor: '_TZ3000_402vrq2i',
    description: 'Automatically generated definition',
    extend: [battery(), onOff({"powerOnBehavior": false}), commandsOnOff(), commandsLevelCtrl()],
    meta: {},
};

module.exports = definition;

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

Does not show any triggers in setting up an automation

codefaux commented 6 days ago

What superb timing -- I've just bought two of these from AliExpress. Same exact generated external definition. Gotta say, they feel pretty solid for $5.

I haven't gotten any further, and was unable to make heads or tails of the documentation as it seems to be written for people who already know what they're doing.

I've got plenty of spare time to spend if someone can point me toward a guide written for people who need a guide, lol

codefaux commented 6 days ago

I should add, after creating the .js file and adding it to configuration.yaml I get the following error on any action performed upon the device aka twist, push, etc:

[2024-11-25 14:54:33] error:    z2m: Failed to configure 'ZigDial2', attempt 1 (Error: ZCL command 0xa4c138b4b46ef09f/1 genOnOff.configReport([{"minimumReportInterval":0,"maximumReportInterval":65000,"reportableChange":1,"attribute":"onOff"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')
    at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:350:28)
    at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:956:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:688:9)
    at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:162:17)
    at /app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:546:17
    at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:205:21)
    at Configure.configure (/app/lib/extension/configure.ts:130:13)
    at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:206:17))
DaeMonSxy commented 3 days ago

Hi gents,

just got mine also, would be good to have it integrated, isnt it?:)

codefaux commented 1 day ago

After fiddling around and searching more thoroughly, I've gotten mine working. The answer is in another pending issue;

https://github.com/Koenkk/zigbee2mqtt/issues/23543#issuecomment-2508257550

I'm still not sure how to get to that point with the tutorial, but it's working.

It does support three-tap to switch from Command to Event mode.

In Event mode, it supports Single tap, Double tap (don't tap too fast), Hold (4sec), Rotate Left and Rotate Right

In command mode, it supports Single, no Double, no Hold, brightness_step_up/_down and distance, color_temperature_step_up/_down and distance.

djurny commented 12 hours ago

1.42.0 supports the Smart Knob Dimmer. From the release notes:

Groetjes,

codefaux commented 11 hours ago

As this release just pushed 14 hours ago, I'll go ahead and say they had support for our device already in the pipeline. Nice to see it released, after @jamiegalbreath verifies support they can probably close this Issue.

Can someone weigh in on best practices moving forward? Should we nuke the external definition file after moving to this version? Is the external definition from the Issue I linked essentially the same as the internal definition will be?

If it is best to remove the external definition, will this impact Home Assistant devices?

djurny commented 11 hours ago

The external converter was made by copy/pasting parts from what is now available in 1.42.0. I would remove the external definition and just use what is in 1.42.0. I did not see anything bork after doing so. Groetjes,

Velomeloman commented 2 hours ago

I also made an automatic converter. After it didn't work, I found a similar device in herdsman converters and copied the code into my js. After checking the converter's operability, I made a pull request to detect this dimmer. white_knob.js.txt