-
Notifications
You must be signed in to change notification settings - Fork 302
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
Add eWeLink Manufacturer Specific Cluster #955
Conversation
The manuf code doesn't seem to be <mapping code="0x1286" translation="Shenzhen CoolKit Technology Co., Ltd"/> <mapping code="0x1321" translation="Shenzhen Sonoff Technologies Co., Ltd."/> Confirmed with random products on csa-iot.org: |
Agreed and I must admin I made a presumption and pulled this out of the converter definition I have a just sniffed my network and I can see attributes being reported from the cluster but I am not sure how I confirm what manufacturer code it should be linked to. |
Probably something like this to be consistent with the name attached to the ID, but let's see what @Koenkk says 😉 - manuSpecificSonoff: {
+ manuSpecificCoolkit: { - manufacturerCode: ManufacturerCode.SONOFF,
+ manufacturerCode: ManufacturerCode.COOLKIT, - /** Sonoff */
- SONOFF: 0x1286,
+ /** Coolkit (eWeLink / Sonoff) */
+ COOLKIT: 0x1286, Re: #902 |
Coolkit looks like the proper name indeed. I guess this is what SONOFF internally uses. |
Seems Sonoff is 0x1321 so possibly better to have 0x1286 as Coolkit (Ewelink) but that does then differ slightly from the converters which are in sonoff.ts... Either way, the question I was getting as is how I know the manufacturer code against the cluster is actually right (or whether it actually matters). I picked the only manufacturer code mentioned in the converter but is this just purely metadata for Z2M or will it only apply if the manufacturer and cluster match? (My understanding is that cluster ID should be globally unique so it shouldn't matter ?) |
Seems to be the branch for the eWeLink-specific stuff... |
https://forum.ewelink.cc/t/just-out-of-curiosity-i-ask/17808 The manufacturer code should indeed by Coolkit / Ewelink but I am not sure about the cluster. At some level does it matter which manufacturer it links to (I could see nothing in the Zigbee packets that includes a manufacturer code only the 0xfc11 cluster) Would I be right in thinking that this just affects what shows up in the cluster view and the dev console Let me know which manufacturer you want to link the 0xfc11 cluster to and whether it should be called Sonoff or Ewelink manufacturer specific cluster and I will update PR |
Then let's call it |
I've been working on refactoring (and adding missing) manufacture codes (& other ZCL-related data) using full entity names per CSA. This name will get overridden anyway when we get to merge it. 😉 @jamesonuk Manufacturer code + Cluster ID are used to identify clusters when parsing/creating ZCL frames, so it is expected to match if the device is providing it (seems yours isn't). Even though technically Z2M seems to fallback if not matching, likely because many devices don't set zigbee-herdsman/src/zcl/utils.ts Line 34 in 4a55f23
|
FYI for reference, CoolKit is a separate Chinese manufacturer company called Shenzhen Cool House Technology Co., Ltd. (abbreviated as Cool House Technology) that ITead/Sonoff contacts for much of their Zigbee development (hardware, firmware, and software) https://github.com/CoolKit-Technologies CoolKit's Zigbee radio board and devices/products are also used by otther companies, and it is actually CoolKit that owns Note! I have no affiliations to them, but a tip is to try sending specific questions to [email protected] and/or [email protected], alternativly perhaps try asking @xsp1989 who I believe might be affiliated or employed with them (and a community contributer). PS: The only reason I am aware of CoolKit is that I researched them because they make the SM-011 V1.0 / ZYZBP008 radio module and firmware that is used in many Chinese Zigbee gateways/bridges/hubs and a few other Zigbee devices, including the Silicon Labs EFR32MG21 based hubs from ITead/Sonoff as well as eWeLink ZB-GW03 white-label product made for rebranding and their own ZB-GW04 Zigbee Coordinator USB adapter dongle. I also believe that they designed the boards of first Zigbee Coordinator adapter dongles from ITead/Sonoff |
FYI: Once #971 is merged, we can inject the cluster on the device level |
@jamesonuk yes |
Not needed anymore because of Koenkk/zigbee-herdsman-converters#7432 |
There is a Sonoff manufacturer specific cluster which currently appears as 64529 when viewed in the UI
I have essentially gone through https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/sonoff.ts looking for everything under cluster 0xfc11 and also incorporated the two new values from Koenkk/zigbee-herdsman-converters#7130
Converter Definitions
``` binary({ name: 'tamper', cluster: 0xFC11, attribute: {ID: 0x2000, type: 0x20}, description: 'Tamper-proof status', valueOn: [true, 0x01], valueOff: [false, 0x00], zigbeeCommandOptions: {manufacturerCode: 0x1286}, access: 'STATE_GET', }), enumLookup({ name: 'illumination', lookup: {'dim': 0, 'bright': 1}, cluster: 0xFC11, attribute: {ID: 0x2001, type: 0x20}, zigbeeCommandOptions: {manufacturerCode: 0x1286}, description: 'Only updated when occupancy is detected', access: 'STATE', }), binary({ name: 'child_lock', cluster: 0xFC11, attribute: {ID: 0x0000, type: 0x10}, description: 'Enables/disables physical input on the device', valueOn: ['LOCK', 0x01], valueOff: ['UNLOCK', 0x00], }), binary({ name: 'open_window', cluster: 0xFC11, attribute: {ID: 0x6000, type: 0x10}, description: 'Automatically turns off the radiator when local temperature drops by more than 1.5°C in 4.5 minutes.', valueOn: ['ON', 0x01], valueOff: ['OFF', 0x00], }), numeric({ name: 'frost_protection_temperature', cluster: 0xFC11, attribute: {ID: 0x6002, type: 0x29}, description: 'Minimum temperature at which to automatically turn on the radiator, ' + 'if system mode is off, to prevent pipes freezing.', valueMin: 4.0, valueMax: 35.0, valueStep: 0.5, unit: '°C', scale: 100, }), numeric({ name: 'idle_steps', cluster: 0xFC11, attribute: {ID: 0x6003, type: 0x21}, description: 'Number of steps used for calibration (no-load steps)', access: 'STATE_GET', }), numeric({ name: 'closing_steps', cluster: 0xFC11, attribute: {ID: 0x6004, type: 0x21}, description: 'Number of steps it takes to close the valve', access: 'STATE_GET', }), numeric({ name: 'valve_opening_limit_voltage', cluster: 0xFC11, attribute: {ID: 0x6005, type: 0x21}, description: 'Valve opening limit voltage', unit: 'mV', access: 'STATE_GET', }), numeric({ name: 'valve_closing_limit_voltage', cluster: 0xFC11, attribute: {ID: 0x6006, type: 0x21}, description: 'Valve closing limit voltage', unit: 'mV', access: 'STATE_GET', }), numeric({ name: 'valve_motor_running_voltage', cluster: 0xFC11, attribute: {ID: 0x6007, type: 0x21}, description: 'Valve motor running voltage', unit: 'mV', access: 'STATE_GET', }), numeric({ name: 'valve_opening_degree(version >= v1.1.4)', cluster: 0xFC11, attribute: {ID: 0x600B, type: 0x20}, description: 'Valve open position (percentage) control. ' + 'If the opening degree is set to 100%, the valve is fully open when it is opened. ' + 'If the opening degree is set to 0%, the valve is fully closed when it is opened, ' + 'and the default value is 100%, ' + 'The valve opening degree should be greater than or equal to the valve closing degree.', valueMin: 0.0, valueMax: 100.0, valueStep: 1.0, unit: '%', }), numeric({ name: 'valve_closing_degree(version >= v1.1.4)', cluster: 0xFC11, attribute: {ID: 0x600C, type: 0x20}, description: 'Valve closed position (percentage) control. ' + 'If the closing degree is set to 100%, the valve is fully closed when it is closed. ' + 'If the closing degree is set to 0%, the valve is fully opened when it is closed, ' + 'and the default value is 100%. ' + 'The valve opening degree should be greater than or equal to the valve closing degree.', valueMin: 0.0, valueMax: 100.0, valueStep: 1.0, unit: '%', }) ```I am very old school and struggle with TypeScript and functional programming so be gentle 😬
There are two things that are confusing me