Koenkk / zigbee2mqtt

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

[New device support]: Bosch Smart Home Twinguard Smoke Detector #14355

Closed safakaltun closed 1 year ago

safakaltun commented 1 year ago

Link

https://www.bosch-smarthome.com/uk/en/products/devices/twinguard/

Database entry

{"id":76,"type":"EndDevice","ieeeAddr":"0x000d6f00179e01b9","nwkAddr":43776,"manufId":4617,"manufName":"BoschSmartHomeGmbH","powerSource":"Battery","modelId":"Champion","epList":[1,2,3,4,5,6,7,8,9,10,11,12],"endpoints":{"1":{"profId":260,"epId":1,"devId":96,"inClusterList":[0,3,4,9,57344,57348],"outClusterList":[3,9],"clusters":{"genBasic":{"attributes":{"manufacturerName":"BoschSmartHomeGmbH"}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":97,"inClusterList":[0,3,4,9,57345,57348],"outClusterList":[3,9],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":61440,"inClusterList":[0,3,57346],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":260,"epId":4,"devId":98,"inClusterList":[0,1,3,4,9],"outClusterList":[3,9],"clusters":{"genBasic":{"attributes":{}},"genPowerCfg":{"attributes":{"batteryVoltage":91}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c11416","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":32,"minRepIntval":60,"maxRepIntval":"62000","repChange":0}],"meta":{}},"5":{"profId":260,"epId":5,"devId":770,"inClusterList":[0,3,1026],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}},"msTemperatureMeasurement":{"attributes":{"measuredValue":2540}}},"binds":[{"cluster":1026,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c11416","endpointID":1}],"configuredReportings":[{"cluster":1026,"attrId":0,"minRepIntval":"1","maxRepIntval":3600,"repChange":"100"}],"meta":{}},"6":{"profId":260,"epId":6,"devId":262,"inClusterList":[0,3,1024],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"7":{"profId":260,"epId":7,"devId":6,"inClusterList":[0,3,32],"outClusterList":[3,10,25],"clusters":{"genBasic":{"attributes":{}},"genPollCtrl":{"attributes":{"checkinInterval":6480}}},"binds":[{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c11416","endpointID":1}],"configuredReportings":[],"meta":{}},"8":{"profId":260,"epId":8,"devId":1012,"inClusterList":[0,3,1027],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}},"msPressureMeasurement":{"attributes":{"measuredValue":30603}}},"binds":[],"configuredReportings":[],"meta":{}},"9":{"profId":260,"epId":9,"devId":1008,"inClusterList":[0,3,1029],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}},"msRelativeHumidity":{"attributes":{"measuredValue":4787}}},"binds":[{"cluster":1029,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c11416","endpointID":1}],"configuredReportings":[{"cluster":1029,"attrId":0,"minRepIntval":"1","maxRepIntval":3600,"repChange":"100"}],"meta":{}},"10":{"profId":260,"epId":10,"devId":61442,"inClusterList":[0,3,57349],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":1010,"inClusterList":[0,3,1036],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}},"12":{"profId":260,"epId":12,"devId":1011,"inClusterList":[0,3,57347,57350,57351],"outClusterList":[3],"clusters":{"genBasic":{"attributes":{}}},"binds":[],"configuredReportings":[],"meta":{}}},"hwVersion":8,"dateCode":"20220210","swBuildId":"6b6048b","zclVersion":1,"interviewCompleted":true,"meta":{"configured":269791260},"lastSeen":1664994575645,"defaultSendRequestWhen":"immediate"}

Comments

Hi,

I have been trying to add support for this device, but haven't progressed a lot. I managed to read the temperature, humidity and the battery voltage, but couldn't go any further than that. I tried using the existing converters implemented in similar devices, but couldn't make any of them work. Unfortunately I hit a point where I cannot progress any more since I don't know what else I can try.

According to the OpenAPI documentation, it should at least report the following signals as well as the smoke detection status and a smoke test trigger.

"state": { "combinedRating": [ "GOOD", "MEDIUM", "BAD" ], "description": "string", "temperature": 0, "temperatureRating": [ "GOOD", "MEDIUM", "BAD" ], "humidity": 0, "humidityRating": [ "GOOD", "MEDIUM", "BAD" ], "purity": 0, "purityRating": "string"

According to the product page, it should also be possible to trigger its built-in siren. To test this feature, I tried "squawk" and "warning", but the device did not respond.

External converter

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 definition = {
    zigbeeModel: ['Champion'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'Twinguard', // Vendor model number, look on the device for a model number
    vendor: 'Bosch', // Vendor of the device (only used for documentation and startup logging)
    description: 'Twinguard', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [fz.temperature, fz.humidity, fz.battery, fz.ias_siren, fz.ias_smoke_alarm_1],
    toZigbee: [tz.warning, tz.squawk],
    meta: {battery: {voltageToPercentage: '9V_2500'}},
    configure: async (device, coordinatorEndpoint, logger) => {
        device.defaultSendRequestWhen = 'immediate';
        device.type = 'EndDevice';
        device.save();
        await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
    },
    exposes: [e.warning(), e.temperature(), e.humidity(), e.battery(), e.squawk(), e.smoke()],
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

skrebber commented 1 year ago

Hi,

I also bought a Bosch Twinguard and tried to pair the device. With no luck. First I wonder how @dubtec managed to use the install code from the QR code. My installation says code length is too short. After reading some specs I think, Bosch only included the install code without appended CRC sum. And if I take the 16 bytes and calculate the CRC-X25 and append the 2 bytes in little-endian order zigbee2mqtt accepts the code! But pairing won't work. Therefore maybe I'm wrong... ;-)

The whole QR-code: RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F9562 The Result: Debug 2023-02-01 13:27:21Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"jvudr-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F9562"}' Error 2023-02-01 13:27:21Request 'zigbee2mqtt/bridge/request/install_code/add' failed with error: 'Wrong install code length' Debug 2023-02-01 13:27:21Error: Wrong install code length at EZSPAdapter.addInstallCode (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:260:19) at Controller.addInstallCode (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:230:28) at Zigbee.addInstallCode (/app/lib/zigbee.ts:314:29) at Bridge.installCodeAdd (/app/lib/extension/bridge.ts:229:27) at Bridge.onMQTTMessage (/app/lib/extension/bridge.ts:122:63) at EventEmitter.emit (node:events:525:35) at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:109:22) at MQTT.onMessage (/app/lib/mqtt.ts:140:27) at WebSocket.<anonymous> (/app/lib/extension/frontend.ts:121:27) at WebSocket.emit (node:events:513:28) Info 2023-02-01 13:27:21MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{},"error":"Wrong install code length","status":"error","transaction":"jvudr-1"}'

My changed QR code: RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21 The result: Debug 2023-02-01 13:28:56Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"jvudr-2","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"}' Info 2023-02-01 13:28:56Successfully added new install code Info 2023-02-01 13:28:56MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{"value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"},"status":"ok","transaction":"jvudr-2"}' Debug 2023-02-01 13:28:56Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"jvudr-3","value":true}' Info 2023-02-01 13:28:56Zigbee: allowing new devices to join. Debug 2023-02-01 13:28:56Received Zigbee message from 'Coordinator', type 'commandNotification', cluster 'greenPower', data '{"data":[25,6,2,11,254,0],"type":"Buffer"}' from endpoint 242 with groupID null, ignoring since it is from coordinator Info 2023-02-01 13:28:56MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"jvudr-3"}'

But the pairing result like this: Debug 2023-02-01 09:02:20Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"060a7-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"}' Info 2023-02-01 09:02:20Successfully added new install code Info 2023-02-01 09:02:20MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{"value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"},"status":"ok","transaction":"060a7-1"}' Debug 2023-02-01 09:02:20Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"060a7-2","value":true}' Info 2023-02-01 09:02:20Zigbee: allowing new devices to join. Debug 2023-02-01 09:02:20Received Zigbee message from 'Coordinator', type 'commandNotification', cluster 'greenPower', data '{"data":[25,7,2,11,254,0],"type":"Buffer"}' from endpoint 242 with groupID null, ignoring since it is from coordinator Info 2023-02-01 09:02:21MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"060a7-2"}' Info 2023-02-01 09:03:43Device '0x000d6f0018869ddb' joined Info 2023-02-01 09:03:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb"},"type":"device_joined"}' Info 2023-02-01 09:03:43Starting interview of '0x000d6f0018869ddb' Info 2023-02-01 09:03:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"started"},"type":"device_interview"}' Error 2023-02-01 09:04:43Failed to interview '0x000d6f0018869ddb', device has not successfully been paired Info 2023-02-01 09:04:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"failed"},"type":"device_interview"}'

My installation: Zigbee2MQTT Version 1.29.2-dev commit: bbbaaf4 Coordinator-Typ EZSP v9 Coordinator-Version 7.1.1.0 build 273

I'm using the HomeAssistant SkyConnect Coordinator.

Maybe anyone has an idea? Thanks in advance!

Best regards: Sönke

dubtec commented 1 year ago

Hi Sönke,

I will not be able to tell You detailed values right now for I’m not at home.

But what I can help You with is the process I used to get that. I used my iPhone camera app to get the QR-code. From there I copied the value and pasted it directly in the Zigbee2MQTT web site > settings > add install code (or similar - I jot that done based of my memory).

There was no editing of the code or similar. After adding I triggered another pairing process, which then succeeded.

Hope this helps!

Best regards

Am 01.02.2023 um 13:33 schrieb Sönke @.***>:

Hi,

I also bought a Bosch Twinguard and tried to pair the device. With no luck. First I wonder how @dubtec https://github.com/dubtec managed to use the install code from the QR code. My installation says code length is too short. After reading some specs I think, Bosch only included the install code without appended CRC sum. And if I take the 16 bytes and calculate the CRC-X25 and append the 2 bytes in little-endian order zigbee2mqtt accepts the code! But pairing won't work. Therefore maybe I'm wrong... ;-)

The whole QR-code: RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F9562 The Result: Debug 2023-02-01 13:27:21Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"jvudr-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F9562"}' Error 2023-02-01 13:27:21Request 'zigbee2mqtt/bridge/request/install_code/add' failed with error: 'Wrong install code length' Debug 2023-02-01 13:27:21Error: Wrong install code length at EZSPAdapter.addInstallCode (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:260:19) at Controller.addInstallCode (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:230:28) at Zigbee.addInstallCode (/app/lib/zigbee.ts:314:29) at Bridge.installCodeAdd (/app/lib/extension/bridge.ts:229:27) at Bridge.onMQTTMessage (/app/lib/extension/bridge.ts:122:63) at EventEmitter.emit (node:events:525:35) at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:109:22) at MQTT.onMessage (/app/lib/mqtt.ts:140:27) at WebSocket. (/app/lib/extension/frontend.ts:121:27) at WebSocket.emit (node:events:513:28) Info 2023-02-01 13:27:21MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{},"error":"Wrong install code length","status":"error","transaction":"jvudr-1"}'

My changed QR code:

The result: Debug 2023-02-01 13:28:56Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"jvudr-2","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"}' Info 2023-02-01 13:28:56Successfully added new install code Info 2023-02-01 13:28:56MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{"value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"},"status":"ok","transaction":"jvudr-2"}' Debug 2023-02-01 13:28:56Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"jvudr-3","value":true}' Info 2023-02-01 13:28:56Zigbee: allowing new devices to join. Debug 2023-02-01 13:28:56Received Zigbee message from 'Coordinator', type 'commandNotification', cluster 'greenPower', data '{"data":[25,6,2,11,254,0],"type":"Buffer"}' from endpoint 242 with groupID null, ignoring since it is from coordinator Info 2023-02-01 13:28:56MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"jvudr-3"}'

But the pairing result like this: Debug 2023-02-01 09:02:20Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"060a7-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"}' Info 2023-02-01 09:02:20Successfully added new install code Info 2023-02-01 09:02:20MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{"value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F95621B21"},"status":"ok","transaction":"060a7-1"}' Debug 2023-02-01 09:02:20Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"060a7-2","value":true}' Info 2023-02-01 09:02:20Zigbee: allowing new devices to join. Debug 2023-02-01 09:02:20Received Zigbee message from 'Coordinator', type 'commandNotification', cluster 'greenPower', data '{"data":[25,7,2,11,254,0],"type":"Buffer"}' from endpoint 242 with groupID null, ignoring since it is from coordinator Info 2023-02-01 09:02:21MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"060a7-2"}' Info 2023-02-01 09:03:43Device '0x000d6f0018869ddb' joined Info 2023-02-01 09:03:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb"},"type":"device_joined"}' Info 2023-02-01 09:03:43Starting interview of '0x000d6f0018869ddb' Info 2023-02-01 09:03:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"started"},"type":"device_interview"}' Error 2023-02-01 09:04:43Failed to interview '0x000d6f0018869ddb', device has not successfully been paired Info 2023-02-01 09:04:43MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"failed"},"type":"device_interview"}'

My installation: Zigbee2MQTT Version 1.29.2-dev commit: bbbaaf4 https://github.com/Koenkk/zigbee2mqtt/commit/bbbaaf4 Coordinator-Typ EZSP v9 Coordinator-Version 7.1.1.0 build 273

Maybe anyone has an idea? Thanks in advance!

Best regards: Sönke

— Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/14355#issuecomment-1411985309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6OD3HHSGOLJVDH4SXEA33WVJJY3ANCNFSM6AAAAAAQ54K46U. You are receiving this because you were mentioned.

safakaltun commented 1 year ago

Hi Sönke, can you try adding 0000 as padding before the DLK? Ideally you should not need to do this manual change though. So, if the issue is related to the length of the install code generated by the QR code, then you should create a new issue to allow shorter install codes.

You can give this a look and try it yourself. If that solves your problem, then you should definitely create an issue to get shorter install codes supported. https://github.com/Koenkk/zigbee2mqtt/issues/13520#issuecomment-1230662569

skrebber commented 1 year ago

Hi, added the 4 zeros before DLK, but with no luck. The install-code is accepted, but pairing didn't work out. Debug 2023-02-01 22:37:20Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"p83kr-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDB0000DLK82AF21EF5510E04E0459F250813F9562"}' Info 2023-02-01 22:37:20Successfully added new install code Info 2023-02-01 22:37:21MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{"value":"RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDB0000DLK82AF21EF5510E04E0459F250813F9562"},"status":"ok","transaction":"p83kr-1"}' Debug 2023-02-01 22:37:22Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"p83kr-2","value":true}' Info 2023-02-01 22:37:22Zigbee: allowing new devices to join. Debug 2023-02-01 22:37:22Received Zigbee message from 'Coordinator', type 'commandNotification', cluster 'greenPower', data '{"data":[25,3,2,11,254,0],"type":"Buffer"}' from endpoint 242 with groupID null, ignoring since it is from coordinator Info 2023-02-01 22:37:22MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"p83kr-2"}' Info 2023-02-01 22:38:09Device '0x000d6f0018869ddb' joined Info 2023-02-01 22:38:09MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb"},"type":"device_joined"}' Info 2023-02-01 22:38:09Starting interview of '0x000d6f0018869ddb' Info 2023-02-01 22:38:09MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"started"},"type":"device_interview"}' Error 2023-02-01 22:39:10Failed to interview '0x000d6f0018869ddb', device has not successfully been paired Info 2023-02-01 22:39:10MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000d6f0018869ddb","ieee_address":"0x000d6f0018869ddb","status":"failed"},"type":"device_interview"}'

So you mean, Bosch has done here something different with the QR-code?

safakaltun commented 1 year ago

Interesting stuff. Your original Install code "RB01SG0D836591B3CC0010000000000000000000000D6F0018869DDBDLK82AF21EF5510E04E0459F250813F9562" is as long as mine. So z2m should accept that actually. I can actually add your install code as it is...

I am on this commit https://github.com/Koenkk/zigbee2mqtt/commit/80c464c . Maybe give that a shot. Otherwise you should create an issue specific to install code problem you are experiencing.

skrebber commented 1 year ago

switched to 15.0.39 ea0a999, also wrong install length. Could check your version, but I think the newer version should be fine. I will open a new issue.

l154 commented 1 year ago

Hi I have exactly the same error when I'm trying connect to Bosh Smart Home Twinguard. 2023-03-16 09:55:10Received MQTT message on 'zigbee2mqtt/bridge/request/install_code/add' with data '{"transaction":"kge09-1","value":"RB01SG0D836591B3CC0010000000000000000000000D6F0017E1B786DLK0CEC411FCB2F415FB95ED8E4C9C4F316"}' Error 2023-03-16 09:55:10Request 'zigbee2mqtt/bridge/request/install_code/add' failed with error: 'Wrong install code length' Debug 2023-03-16 09:55:10Error: Wrong install code length at EZSPAdapter.addInstallCode (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:260:19) at Controller.addInstallCode (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:230:28) at Zigbee.addInstallCode (/app/lib/zigbee.ts:314:29) at Bridge.installCodeAdd (/app/lib/extension/bridge.ts:229:27) at Bridge.onMQTTMessage (/app/lib/extension/bridge.ts:122:63) at EventEmitter.emit (node:events:525:35) at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:109:22) at MQTT.onMessage (/app/lib/mqtt.ts:140:27) at WebSocket.<anonymous> (/app/lib/extension/frontend.ts:121:27) at WebSocket.emit (node:events:513:28) Info 2023-03-16 09:55:10MQTT publish: topic 'zigbee2mqtt/bridge/response/install_code/add', payload '{"data":{},"error":"Wrong install code length","status":"error","transaction":"kge09-1"}'

l154 commented 1 year ago

Hi found a solution Firstly I used Sonoff 3.0 Pro (ZBDongle-E) and I got an error 'Wrong install code length'. After that I changed it to an older Sonoff 3.0 model ZBDongle-P and I haven't got any errors. So, the problem is in adapter.

dubtec commented 1 year ago

Hi,

if the adapter could be the root for these issues, I am adding mine for future reference: Slaesh‘s CC2562.

BTW, I currently run 3 Bosch Twinguards and none had any of these recent issues described in this thread.

Hope this helps. Best regards

pasarn commented 1 year ago

Hello to all.

I could also integrate 3 smoke detectors without problems. I use a ZZH stick from Electrolama.

MarcR2000 commented 8 months ago

Hi,

I have now tried 6 (!) different Bosch Twinguards and always end up with the same problem:

The device pairs perfectly with the install code. However after half a day or so each of the devices starts to beep and blink orange three times. The manual suggests that this is a sign, the device is broken and needs replacement. I hardly believe that since all devices were brand new. Something inside Zigbee2Mqtt seems to trigger this error. I can reset and repair but after a couple of hours the problem re-appears.

Anybody had a similar problem? USing zigbee2mqtt 1.34.0 with CC2652P Sonoff ZigBee 3.0

danieledwardgeorgehitchcock commented 8 months ago

Maybe the device expects some sort of a heartbeat from the hub..? I will try and replicate this problem and hopefully capture it via a sniff

safakaltun commented 8 months ago

Hi. Do the devices connect to the coordinator through a router? If yes,  I might know the issue. Twinguard needs to know the tome to correctly operate. So for this asks for the time from the coordinator. I had this issue where my twinguards were connecting the network through another zigbee router (An Eglo Lamp) which had a poor firmware. What happened for me was that Twingurd asked for the time and the router provided a wrong time reference back to Twinguard. This put the Twinguard into error mode. Unfortunately it wasn’t possible to fix this without removing the router from my network. My suggestion would be to remove whatever device they connect through and see if that helps.

You can look at this comment and the few comments before that for more details on this https://github.com/Koenkk/zigbee2mqtt/issues/14355#issuecomment-1347309852

MarcR2000 commented 8 months ago

Yes, I was considering a router to be the problem. I can confirm the issue with Eglo and Ikea Tradfri. However I do think I have seen it once on the coordinator itself.

Is there any way to bind it to the coordinator so that it does not use routers? I can hardly throw out all the bulbs I have in the house....

safakaltun commented 7 months ago

Unfortunately not. Even if you connect to the coordinator directly while pairing, the zigbee network will optimize itself at some point and put a router between your Twinguard and the coordinator…

MarcR2000 commented 7 months ago

So, do we think this is the definite explanation? Then I would see no other chance than returning it.

safakaltun commented 7 months ago

I don’t think there is anything else you can do. I had asked the same questions… https://github.com/Koenkk/zigbee2mqtt/issues/14355#issuecomment-1342916706

That being said, I am not sure if Tradfri has the same issue. I have some of them and don’t experience this with my Twinguards. I don’t know how many Eglo products you have, but you can consider turning them off and see if that solves your issue.

MarcR2000 commented 7 months ago

I just updated firmware on all of my Eglo lamps (7) through the AWOX App. Seems like the issue is gone - for now. I will keep monitoring and will update if it didn't solve it. Anybody else who has this issue should try the same.

4s1 commented 7 months ago

Maybe the device expects some sort of a heartbeat from the hub..? I will try and replicate this problem and hopefully capture it via a sniff

Can you give me a hint @danieledwardgeorgehitchcock, how to retrieve network key from install code to decrypt sniffed traffic? I've got a smart home controller II running with all kind of bosch smart devices. I'm willing to help to debug an getting things to work (and privide captured OTAs) in z2m

vaenror commented 7 months ago

I cannot pair/interview my Twinguards with the zbdongle-e from sonoff. Z2M accepts the install code and starts interviewing the TwinGuard but this fails. Any suggestions? (Running MultiPan on the dongle-e)

tsaG1337 commented 7 months ago

I cannot pair/interview my Twinguards with the zbdongle-e from sonoff. Z2M accepts the install code and starts interviewing the TwinGuard but this fails. Any suggestions? (Running MultiPan on the dongle-e)

Same here. I am using the Skyconnect stick and I am unable to pair my two Twinguards. The Bosch Smoke Detector 2s however are working.

Mar1usW3 commented 6 months ago

I cannot pair/interview my Twinguards with the zbdongle-e from sonoff. Z2M accepts the install code and starts interviewing the TwinGuard but this fails. Any suggestions? (Running MultiPan on the dongle-e)

Same here. I am using the Skyconnect stick and I am unable to pair my two Twinguards. The Bosch Smoke Detector 2s however are working.

same here also with a skyconnect

Tronix117 commented 6 months ago

Here I am,

After a twinguard reset (remove one batterie + hold button + put back battery + release button and re-hold until green light):

~ZBDongle-P is flashed with the coordinator firmware, is it the issue ?~

~Any idea ? It seems some people had success here with the P dongle.~

EDIT : successfully paired it with the P, by turning off all other routers (hue bulbs). Sensor took some time to give me feedback, CO2 value come after few minutes, controls seems to work (only tried pre-alarm)

Mar1usW3 commented 6 months ago

anyone has any idea why this is not working with the silicon labs adapter?

4s1 commented 6 months ago

Hmm, maybe we should collect Zigbee-herdsman debug logging from successful and unsuccessful join attempts and compare them?

I can try to provide logs for my non working Home Assistant Yellow (SILabs based)

Mar1usW3 commented 6 months ago

this i can also provide...