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

Sonoff SNZB-04 identified as SNZB-02 #1449

Closed
bakman2 opened this issue Aug 3, 2020 · 15 comments
Closed

Sonoff SNZB-04 identified as SNZB-02 #1449

bakman2 opened this issue Aug 3, 2020 · 15 comments

Comments

@bakman2
Copy link

bakman2 commented Aug 3, 2020

I am trying to pair a SNZB-04 (door contact sensor), but it is identified as a SNZB-02 (temperature/humidity sensor).

Aug 03 10:38:18 homeautomation npm[31113]: zigbee2mqtt:info  2020-08-03 10:38:18: Successfully interviewed '0x00124b001b7d18ba', device has successfully been paired
Aug 03 10:38:18 homeautomation npm[31113]: zigbee2mqtt:info  2020-08-03 10:38:18: Device '0x00124b001b7d18ba' is supported, identified as: SONOFF Temperature and humidity sensor (SNZB-02)
Aug 03 10:38:18 homeautomation npm[31113]: zigbee2mqtt:info  2020-08-03 10:38:18: Configuring '0x00124b001b7d18ba'
Aug 03 10:38:18 homeautomation npm[31113]: zigbee2mqtt:info  2020-08-03 10:38:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x00124b001b7d18ba","model":"SNZB-02","vendor":"SONOFF","description":"Temperature and humidity sensor","supported":true}}'
Aug 03 10:38:20 homeautomation npm[31113]: zigbee2mqtt:error 2020-08-03 10:38:20: Failed to configure '0x00124b001b7d18ba', attempt 1 (Error: ConfigureReporting 0x00124b001b7d18ba/1 msTemperatureMeasurement([{"attribute":"measuredValue","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":100}], {"timeout":10000,"disableResponse":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Status 'UNSUPPORTED_ATTRIBUTE')
Aug 03 10:38:20 homeautomation npm[31113]:     at Endpoint.checkStatus (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:140:23)
Aug 03 10:38:20 homeautomation npm[31113]:     at Endpoint.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:348:26)
Aug 03 10:38:20 homeautomation npm[31113]:     at Generator.next (<anonymous>)
Aug 03 10:38:20 homeautomation npm[31113]:     at fulfilled (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:24:58))
@Koenkk
Copy link
Owner

Koenkk commented Aug 3, 2020

Can you share your data/database.db file?

@bakman2
Copy link
Author

bakman2 commented Aug 4, 2020

database.db

{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0019386313","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,8,11,12,13,47,110,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outC
lusterList":[],"clusters":{},"binds":[]},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outC
lusterList":[],"clusters":{},"binds":[]},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outC
lusterList":[],"clusters":{},"binds":[]},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"8":{"profId":260,"epId":8,"devId":5,"inClusterList":[],"outC
lusterList":[],"clusters":{},"binds":[]},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[],"outClusterList":[1280,1282],"clusters":{},"binds":[]},"12":{"profId":49246,"epId":12,"devId":5,"inClu
sterList":[],"outClusterList":[],"clusters":{},"binds":[]},"13":{"profId":260,"epId":13,"devId":5,"inClusterList":[25],"outClusterList":[],"clusters":{},"binds":[]},"47":{"profId":260,"epId":47,"devId":5,
"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"110":{"profId":260,"epId":110,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"242":{"profId":41440,"epId":242,
"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]}},"interviewCompleted":true,"meta":{},"lastSeen":null}
{"id":2,"type":"EndDevice","ieeeAddr":"0x00124b001b78291d","nwkAddr":8957,"manufId":0,"manufName":"eWeLink","powerSource":"Battery","modelId":"MS01","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"d
evId":1026,"inClusterList":[0,3,1280,1],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{"modelId":"MS01","manufacturerName":"eWeLink","powerSource":3,"zclVersion":1,"appVersion":3,"hwVersion":1
,"dateCode":"20191107"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0019386313","zoneState":1}},"genPowerCfg":{"attributes":{"batteryVoltage":32,"batteryPercentageRemaining":200}}},"binds":[{"cluste
r":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0019386313","endpointID":1}]}},"appVersion":3,"hwVersion":1,"dateCode":"20191107","zclVersion":1,"interviewCompleted":true,"meta":{"configured":1},"last
Seen":1596446852112}
{"id":3,"type":"EndDevice","ieeeAddr":"0x00124b001b7d18ba","nwkAddr":36678,"manufId":0,"manufName":"eWeLink","powerSource":"Battery","modelId":"TH01","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"
devId":1026,"inClusterList":[0,3,1280,1],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{"modelId":"TH01","manufacturerName":"eWeLink","powerSource":3,"zclVersion":1,"appVersion":3,"hwVersion":
1,"dateCode":"20191107"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0019386313","zoneState":1}}},"binds":[]}},"appVersion":3,"hwVersion":1,"dateCode":"20191107","zclVersion":1,"interviewCompleted":
true,"meta":{},"lastSeen":1596531005347}
{"id":4,"type":"EndDevice","ieeeAddr":"0x00124b001b7825d4","nwkAddr":57450,"manufId":0,"manufName":"eWeLink","powerSource":"Battery","modelId":"MS01","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"
devId":1026,"inClusterList":[0,3,1280,1],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{"modelId":"MS01","manufacturerName":"eWeLink","powerSource":3,"zclVersion":1,"appVersion":3,"hwVersion":
1,"dateCode":"20191107"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0019386313","zoneState":1}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0019386313","endpointID":1}]}},
"appVersion":3,"hwVersion":1,"dateCode":"20191107","zclVersion":1,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1596530936973}

Note that I have a couple of these devices, tried them all out so they make some noise.

@Koenkk
Copy link
Owner

Koenkk commented Aug 4, 2020

Can you check if this is fixed now?

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@bakman2
Copy link
Author

bakman2 commented Aug 4, 2020

Can you check if this is fixed now?

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

Thanks a lot! I hacked the changes in and it is detected properly.

@Koenkk
Copy link
Owner

Koenkk commented Aug 4, 2020

Cool! thanks for confirming.

@Koenkk Koenkk closed this as completed Aug 4, 2020
@kirovilya
Copy link
Contributor

something is wrong. now my temperature sensor is detected as a contact sensor...
image
although the device model and cluster set are correct.
something did not work in the fingerprint search

@kirovilya
Copy link
Contributor

database record:
{"id":3,"type":"EndDevice","ieeeAddr":"0x00124b001b783028","nwkAddr":41352,"manufId":0,"manufName":"eWeLink","powerSource":"Battery","modelId":"TH01","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":770,"inClusterList":[0,3,1026,1029,1],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{"modelId":"TH01","manufacturerName":"eWeLink","powerSource":3,"zclVersion":1,"appVersion":4,"hwVersion":1,"dateCode":"20200526"}},"genPowerCfg":{"attributes":{"batteryVoltage":29,"batteryPercentageRemaining":147}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0009eb0479","endpointID":1}]}},"appVersion":4,"hwVersion":1,"dateCode":"20200526","zclVersion":1,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1596787701552}

@kirovilya
Copy link
Contributor

image
we get first device which have a zigbeeModel, although its meaning does not match our

Koenkk added a commit that referenced this issue Aug 7, 2020
@kirovilya
Copy link
Contributor

image
now work's fine

@maccoylton
Copy link

HI I just purchased a Sonoff SNZB-04, in Homebridge-zigdee-nt, this shows up as manufacturer eWeLink and device DS01, how doo I tweak the setup here to recognise this combination? Below some trace if that helps

[02/01/2021, 09:46:54] [ZigBee] Found ZigBee device: Device {
ID: 2,
_type: 'EndDevice',
_ieeeAddr: '0x00124b002265c361',
_networkAddress: 25345,
_manufacturerID: 0,
_endpoints: [
Endpoint {
ID: 1,
profileID: 260,
deviceID: 1026,
inputClusters: [Array],
outputClusters: [Array],
deviceNetworkAddress: 25345,
deviceIeeeAddress: '0x00124b002265c361',
clusters: [Object],
_binds: [],
_configuredReportings: [],
meta: {}
}
],
_manufacturerName: 'eWeLink',
_powerSource: 'Battery',
_modelID: 'DS01',
_applicationVersion: 4,
_stackVersion: undefined,
_zclVersion: 1,
_hardwareVersion: 1,
_dateCode: '20201026',
_softwareBuildID: undefined,
_interviewCompleted: true,
_interviewing: false,
meta: {},
_lastSeen: 1609448069710
}
[02/01/2021, 09:46:54] [ZigBee] Unrecognized device: 0x00124b002265c361 eWeLink DS01

@Koenkk
Copy link
Owner

Koenkk commented Jan 3, 2021

This device is supported by zigbee2mqtt/zigbee-herdsman-converters. I suggest you open an issue at Homebridge-zigdee-nt

@maccoylton
Copy link

can you help me understand your code better .. I see this device reported as manufacturer eWeLink and device DS01 .. that's not a combo mentioned in your supported deice list at https://www.zigbee2mqtt.io/devices/SNZB-04.html.. although I see DS01 mentioned in the code below but with the manufacturer being Sonoff?

@Koenkk
Copy link
Owner

Koenkk commented Jan 3, 2021

The mapping is done here: https://raw.githubusercontent.com/Koenkk/zigbee-herdsman-converters/master/devices.js search for zigbeeModel: ['DS01'],

@maccoylton
Copy link

Is the mapping done purely on [Zigbee model] or a combination of that and manufacturer?

@Koenkk
Copy link
Owner

Koenkk commented Jan 3, 2021

purely on Zigbee model

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

No branches or pull requests

4 participants