zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
683 stars 635 forks source link

[Device Support Request] Bosch Twinguard #2561

Open Smiley098 opened 10 months ago

Smiley098 commented 10 months ago

Problem description

Hello,

Unfortunately, the message Installation code too short appears when I want to add the Twinguard (Zha-permit). The twinguard cannot be added without a code.

https://github.com/home-assistant/core/issues/44805 https://www.zigbee2mqtt.io/devices/8750001213.html

Solution description

Allow all installation code lengths?

Screenshots/Video

Screenshots/Video ![image](https://github.com/zigpy/zha-device-handlers/assets/28257504/0c134680-92c1-48ac-b85c-bbcd8316c23e)

Device signature

Device signature ```json [Paste the device signature here] ```

Diagnostic information

Diagnostic information ```json [Paste the diagnostic information here] ```

Logs

Logs ```python Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:268 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 20:50:39 (1 occurrences) Last logged: 20:50:39 [140015670511680] Error handling message: invalid length of the install code for dictionary value @ data['install_code']. Got None (invalid_format) Florian from 192.168.0.194 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2023.4 (io.robbie.HomeAssistant; build:2023.460; iPadOS 16.6.0) Mobile/HomeAssistant, like Safari) Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:420 First occurred: 20:50:38 (1 occurrences) Last logged: 20:50:38 websocket_api script: Error executing script. Invalid data for call_service at pos 1: invalid length of the install code for dictionary value @ data['install_code'] ```

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

SkyConnect Multi-PAN

Silicon Labs Multiprotocol Current version: 2.3.2

Hedda commented 10 months ago

Is that "Bosch Twinguard" a Zigbee 3.0 device or? If so then you just have to type in "install code" in order to commission that specific Zigbee device, did you do that? ....Is it a Zigbee/CSA certified product or?

https://csa-iot.org/csa-iot_products/

I can not find any Zigbee info about it. Wondering if Bosch has posted specifications for it and which Zigbee profile(s) it supports?

Anyway, debug logs?

https://www.home-assistant.io/integrations/zha#debug-logging

You also need to provide the "Diagnostics" information (as well as the "Zigbee Device Signature" if possible but guess it is not):

https://www.home-assistant.io/integrations/zha#reporting-issues

Which Zigbee Coordinator adapter/dongle (Zigbee SoC brand and model) and exact firmware version have you tested with?

Note that not all ZHA-compatible radio adapters/dongles support commissioning via “Install Code” or “QR Code” as of yet. See:

https://www.home-assistant.io/integrations/zha#limitations

"Support for commissioning Zigbee 3.0 devices via “Install Code” or “QR Code” via the ‘zha.permit’ service has so far only been implemented for ‘ezsp’ (Silicon Labs EmberZNet) or ‘znp’ (Texas Instruments) radio type in ZHA. Other radio types are missing support in their respective radio libraries for zigpy or manufacturer’s firmware commands/APIs."

deCONZ serial protocol for ConBee/RaspBee Zigbee Coordinator adapters does not yet support joining/pairing via install code or qr code, and that is due to the manufacturer (dresden-elektronik) not fully documenting their serial protocol for it. See:

https://github.com/zigpy/zigpy-deconz/issues/214

and

https://github.com/dresden-elektronik/deconz-serial-protocol/issues/20

So if you want to use commissioning via “Install Code” today then you at least need a new Silicon Labs or Texas Instruments) radio.

PS: This is the same for Zigbee2MQTT / zigbee-herdsman when it comes to and deCONZ serial protocol for ConBee/RaspBee. See:

https://github.com/Koenkk/zigbee2mqtt/issues/17492

and

https://www.zigbee2mqtt.io/supported-devices/

Hedda commented 10 months ago

I can not find any Zigbee info about it. Wondering if Bosch has posted specifications for it and which Zigbee profile(s) it supports?

Hmm, according to Bosch's Twinguard help it uses "ZigBee HA 1.2 protocol and proprietary, manufacturer-specific protocol extensions" which I would assume means that it uses its own non-standard custom manufacturer code with extensions for it?

https://www.bosch-smarthome.com/uk/en/service/help/product-help/twinguard-help/

Check out this related Z2M discussion about Bosch Twinguard and Bosch Outdoor Siren using similar proprietary install code, what Bosch seem to call a “Device Local Key” in their Bosch Smart Home manual if using their own Zigbee gateway/bridge/hub:

https://github.com/Koenkk/zigbee2mqtt/issues/14355

https://github.com/Koenkk/zigbee2mqtt/issues/13520

PS: Zigbee2MQTT has at least added Bosch Smart Home specific clusters and a zigbee-herdsman converter for Bosch Twinguard:

https://github.com/Koenkk/zigbee-herdsman/pull/623

https://github.com/Koenkk/zigbee-herdsman/pull/630

https://github.com/Koenkk/zigbee-herdsman/pull/630/commits/b53b4d158f7951c6d342a81c43e71353a0a1e6c1

https://github.com/Koenkk/zigbee-herdsman-converters/pull/5176

https://github.com/Koenkk/zigbee-herdsman-converters/pull/5176/commits/4aabd248689bf4c1c46c3ddaacc9bfc6bcec7129

Smiley098 commented 10 months ago

Hello,

thanks for the fast research.

I added logs and a photo to my first post.

Seems as if the twinguards use a shorter installation code (16 bytes instead of 18).

Looks like the Twingurad isn't going to ZHA?

Hedda commented 10 months ago

Seems as if the twinguards use a shorter installation code (16 bytes instead of 18).

Looks like the Twingurad isn't going to ZHA?

Reading the comments by Adminiuga and @atmurray in https://github.com/home-assistant/core/issues/44805 it sounds as if the radio libraries could support shorter install codes if both ZHA and zigpy library (and its radio libraries) was patched to also accept 16-byte length of the install code when using the install_code command?

@atmurray even mentioned in that https://github.com/home-assistant/core/issues/44805 that he could "prepare a pull request to patch ZHA's helpers.py so that it aligns to the code length check in zigpy will it get accepted".

https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/core/helpers.py

Suggest that you at the very least submit a new issue as a feature request about "support for shorter install codes" to the zigpy library/project since that is what Home Assistant's ZHA integration depends on:

https://github.com/zigpy/zigpy/issues

UPDATE: I submitted an issue for tracking this feature request:

https://github.com/zigpy/zigpy/issues/1251

It sounds like ZHA Device Handlers (quirks) for such type of devices should be possible if the zigpy library/project already had support for shorter install codes in convert_install_code or? As in also accepting install_code lengths of 16 bytes?

https://github.com/search?q=repo%3Azigpy%2Fzigpy%20zigpy%20convert_install_code&type=code

At least now you have a clear use-case for such a request if now more than one device in Bosch Smart Home series requires this. That is, while the Zigbee 3.0 standard specifies that certified devices should only use 18-bytes install code, there clearly are some other commonly available devices that use Zigbee Home Automation (ZHA) profile with shorter non-standard install code length as a link key in a propriatory implementation (e.g. 16 bytes for Bosch Smart Home devices), as well as potentially 6-byte, 8-byte, 10-byte, 12-byte, 14-byte, 16-byte variants is possible in Zigbee Smart Energy (ZSE) devices, such as example Jetlun RD77715 -> https://fccid.io/X5QRD77715/User-Manual/Users-Manual-1592194

"While Zigbee smart energy networks allow the installation code to be comprised of either 6-, 8-, 12-, or 16-byte random, hexadecimal number with a 2-byte CRC appended to the end, Zigbee 3.0 (Z3) networks specifically require 16-byte hexadecimal installation codes, also accompanied by a 2-byte CRC"

https://www.silabs.com/documents/public/application-notes/an1089-using-installation-codes-with-zigbee-devices.pdf

PS: Again for reference, please note that install codes are currently only supported in zigpy radio libraries for newer Zigbee Coordinator adapters with new radio SoC chips from Silicon Labs and Texas Instruments, e.i. using either an EFR32MGxx based Zigbee Coordinator adapter** like ex. EFR32MG12/EFR32MG21 or an CC2652/CC1352 based Zigbee Coordinator adapter, (so at this point you can definitely not use/test on other Zigbee Coordinator adapters like ConBee/RaspBee, XBee, and ZiGate).

puddly commented 9 months ago

Can you post the full QR code? Unfortunately, the install code doesn't appear valid even when you remove the length restriction.

Smiley098 commented 9 months ago

Hello,

QrCode: RB01SG0D836591B3CC0010000000000000000000000D6F0017E0870CDLK999F98A7DFBCA6DD3955823AD9089631

puddly commented 9 months ago

Is this the entire QR code, nothing is missing?

Compared to the one in the Z2M issue, yours is shorter by two octets:

# Z2M
RB01SG0D83101826480040000000000000000000003C84FFFEEDA00BDLKCE5D5C1E3D59D1440ABFE85251205C36ADE4
# Yours
RB01SG0D836591B3CC0010000000000000000000000D6F0017E0870CDLK999F98A7DFBCA6DD3955823AD9089631
Smiley098 commented 9 months ago

Must be the whole thing, I copied it on my cell phone camera.

puddly commented 9 months ago

Just to be 100% sure it's not an app problem, could you post a photo of the QR code as well? The first example I posted validates properly with existing but the second one from your QR code does not. There's no link key in it even if you try every combination, which is unusual.

Smiley098 commented 9 months ago

Maybe mine is missing the crc?

key - a byte array representing DSLK with length 16 or IC with length 18

https://docs.bosch-iot-suite.com/gateway-software/API/modules/com.prosyst.mbs.zigbee.da.items.api/index.html?com/prosyst/mbs/services/zigbee/da/items/ZigBeeDiscovery.html

Smiley098 commented 9 months ago

image

puddly commented 9 months ago

Interesting. Your device's model number is 8750001215, while the linked device's model number is 8750001213. Perhaps yours is a newer revision?

The "Device Local Key" (4SLYCAGQXWMUFLKNC27BCHJ5JJ) doesn't correspond to any data within the QR code. The value itself looks to be base32-encoded (without padding), and decodes to the following key:

e4:97:81:00:d0:bd:99:42:ad:4d:16:be:11:1d:3d:4a

The supposed key within the QR code (without CRC) is:

99:9f:98:a7:df:bc:a6:dd:39:55:82:3a:d9:08:96:31

There's currently no way to directly provide link keys not derived from install codes but you can easily patch them into your respective radio library (e.g. hardcode the key to be t.KeyData.convert("99:9f:...") in https://github.com/zigpy/zigpy-znp/blob/e60c556197f640b07e57aa3f655cdcc220f2e809/zigpy_znp/zigbee/application.py#L351 and supply any valid install code).

Hedda commented 9 months ago

Guessing that a developer would have to buy the older "Bosch Smart Home Controller" (BSHC-1) and use Zigbee sniffer with Wireshark to sniff and dump Zigbee traffic when joining/paring this device to the official Bosch Smart Home Controller"?

https://www.bosch-smarthome.com/uk/en/service/help/product-help/smart-home-controller-help/

BSHC-1 is more commonly available and costs a lot more than their newer gateway/bridge/hub is on-sale at Amazon right now:

https://www.amazon.com/Bosch-Smart-Home-Controller-Zentraleinheit/dp/B01N7AE32J

https://www.amazon.de/Bosch-Smart-Home-Controller-Zentraleinheit/dp/B01N7AE32J

By the way, the Bosch Twinguard also seems to be on-sale at Amazon's German site right now:

https://www.amazon.de/-/en/detector-Twinguard-quality-measurement-connection/dp/B07V1P3W16/

Anyway, looks like their newer "Bosch Smart Home Controller II" (BSHC-2) should not be needed for the Bosch Twinguard device?

https://www.bosch-smarthome.com/uk/en/products/devices/smart-home-controller

According to their compatibility page it looks like both old BSHC-1 and new BSHC-2 should be compatible with Bosch Twinguard:

https://www.bosch-smarthome.com/uk/en/service/help/compatibility-controller/

https://www.bosch-smarthome.com/uk/media/en/content/03_produkte/01_geraete/27_kompatibilitaet_controller_ii/kompatibilitaets_listen/pr22202_bosch_smart_home_controller_ii_kompatibilitat_tabelle_rz1-6.pdf

It is the newer "Bosch Smart Home Controller II" (BSHC-2) that is not compatible with some of their older devices unless adding their radio stick to it, though at least the Bosch Twinguard seems to be available with both the old and new Bosch controllers:

https://www.bosch-smarthome.com/uk/en/products/control-elements-and-accessories/radio-stick/

image

image

image

Smiley098 commented 9 months ago

I was able to recreate the crc. The bits are reversed

999F-98A7-DFBC-A6DD-3955-823A-D908-9631-9F51

https://crccalc.com/?crc=999F-98A7-DFBC-A6DD-3955-823A-D908-9631&method=CRC-16/X-25&datatype=hex&outtype=0

The installation code is accepted. The twinguard is also found, but cannot be added.

I'll try again later and look at the logs.

Smiley098 commented 9 months ago

Is the installation code still the problem?

Log

Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0x485c (00:0d:6f:00:17:e0:87:0c) joined the network [0x485c] Requesting 'Node Descriptor' Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0x049b (00:0d:6f:00:17:e0:87:0c) joined the network [0x049b] Requesting 'Node Descriptor' Device 0x049b (00:0d:6f:00:17:e0:87:0c) joined the network [0x049b] Requesting 'Node Descriptor' Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0x049b (00:0d:6f:00:17:e0:87:0c) joined the network [0x049b] Requesting 'Node Descriptor' Device 0x049b (00:0d:6f:00:17:e0:87:0c) joined the network [0x049b] Requesting 'Node Descriptor' Device 0x647a (00:0d:6f:00:17:e0:87:0c) joined the network [0x647a] Requesting 'Node Descriptor' Device 0x049b (00:0d:6f:00:17:e0:87:0c) joined the network [0x049b] Requesting 'Node Descriptor' Device 0xb420 (00:0d:6f:00:17:e0:87:0c) joined the network [0xb420] Requesting 'Node Descriptor' Device 0xb420 (00:0d:6f:00:17:e0:87:0c) joined the network [0xb420] Requesting 'Node Descriptor' Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xb420 (00:0d:6f:00:17:e0:87:0c) joined the network [0xb420] Requesting 'Node Descriptor' Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0x647a (00:0d:6f:00:17:e0:87:0c) joined the network [0x647a] Requesting 'Node Descriptor' Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xe240 (00:0d:6f:00:17:e0:87:0c) joined the network [0xe240] Requesting 'Node Descriptor' Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network Device 0xba57 (34:25:b4:ff:fe:3f:e6:7f) joined the network [0xe240] Requesting 'Node Descriptor' [0xe240] Requesting 'Node Descriptor' [0xe240] Requesting 'Node Descriptor'

Log

Logger: zigpy.application Source: runner.py:186 First occurred: 10:02:30 (1 occurrences) Last logged: 10:02:30 Received relays from an unknown device: 0xe240

puddly commented 9 months ago

@Smiley098 Yes, I think so. From your log, the device joins the network multiple times (indicative of it leaving and trying again) and is unresponsive.

From the perspective of a Zigbee device, there are only link keys. They don't know or care about install codes. For that reason, manually appending a CRC to the 999F... code probably won't work for two reasons:

  1. Install codes are in the form: [code][crc], where code is then hashed with AES-MMO to derive a link key. You can turn anything into an install code if you append a valid CRC, but that doesn't mean that aes_mmo_hash(code) is going to give you the link key.
  2. Bosch, on the other hand, seems to directly specify a link key for your device, not an install code. There's no way to convert this into an install code.

To try these out, you will need to try both keys directly by patching the radio library as I mentioned above. Using them as install codes probably won't work.

Hedda commented 9 months ago

Interesting. Your device's model number is 8750001215, while the linked device's model number is 8750001213. Perhaps yours is a newer revision?

FYI, screenshot from safakaltun of his Bosch Twingard also has device model number 8750001215 and he have also posted several dumps when sniffing trying to join it as well his analysis of them -> https://github.com/Koenkk/zigbee2mqtt/issues/14355

datenzar also posted to https://github.com/Koenkk/zigbee2mqtt/issues/13520 saying that he figured out how to decode the link keys from sniffed packages following stm32mcu docs; "The derivation is actually just the MMO (Matyas-Meyer-Oseas) hash of the install code + crc." (but that is way over my head)

Originally posted by @datenzar in https://github.com/Koenkk/zigbee2mqtt/issues/13520#issuecomment-1501220624

How did I get above keys? It's mentioned in the docs that the key exchange will take place based on a derived link key. The derivation is actually just the MMO (Matyas-Meyer-Oseas) hash of the install code + crc. See here for a nice illustration: https://wiki.st.com/stm32mcu/nsfr_img_auth.php/thumb/2/24/Conectivity_InstallCode.png/700px-Conectivity_InstallCode.png

So, have Zigbee2MQTT been able to fully work around these Bosch quirk(s) in zigbee-herdsman and zigbee-herdsman-converters?

https://github.com/Koenkk/zigbee2mqtt/issues/14355

https://github.com/Koenkk/zigbee2mqtt/issues/13520

https://github.com/Koenkk/zigbee-herdsman/pull/623

https://github.com/Koenkk/zigbee-herdsman/pull/630

https://github.com/Koenkk/zigbee-herdsman-converters/pull/5176

Btw, are these same quirk(s) in more Bosch Smart Home series products than the Bosch Twinguard and the Bosch Outdoor Siren?

Smiley098 commented 9 months ago

I'm too stupid to find the file. :(

I'll wait and see if someone else can do it.

I was able to add the Bosch adapter plugs using the installation code. https://www.bosch-smarthome.com/de/de/produkte/geraete/zwischenstecker-kompakt/

Hedda commented 8 months ago

Not sure if related this issue(?) but FYI; noticed @promasu has submitted PR to "Add support for Bosch QR-codes for zha.permit"

https://github.com/home-assistant/core/pull/102427

https://github.com/home-assistant/home-assistant.io/pull/29459

https://github.com/home-assistant/core/pull/102427/commits/3a753de25a4bd420ad4aa04a86733f3f92d66f59

    # Bosch
    r"""
        ^RB01SG
        [0-9a-fA-F]{34}
        ([0-9a-fA-F]{16}) # IEEE address
        DLK
        ([0-9a-fA-F]{36}) # install code
        $
    """,

Note that since https://github.com/home-assistant/core/pull/102427 was just merged it will not be available until Home Assistant core 2023.11 release.

blatthew commented 7 months ago

@Smiley098 Have you been able to add the Twinguard through ZHA in the meantime?

I have exactly the same problem as you describe here..

Smiley098 commented 7 months ago

@blatthew Unfortunately I still haven't managed it

4s1 commented 6 months ago

Can anyone provide a step by step documentation how to zniff bosch' smart home controller zigbee traffic? I've got an ember stick and am able to capture the encrypted traffic of the controller and a few brand new gen II smart home bosch devices (I've just bought). But I've no cue how to retrieve the network key from the captured traffic.

puddly commented 6 months ago

Can you upload the traffic PCAP and a photo of the QR code on your devices?

If the network key is encrypted with the default link key ZigBeeAlliance09, it will be automatically decrypted. If not, make sure you have the key loaded:

image image
tsaG1337 commented 6 months ago

I also just bought the Twinguards and realized they use a different scheme to the ordinary Bosch smoke detector 2 (missing the installation code)...

The Smoke detector 2 connects fine by adding the Source IEE and installation code prior connecting to HA which the Twinguard is missing.

I do have HA on Debian with a Skyconnect stick on a Debian VM. Any way I could help?

QR code would be the following: RB01SG0D836591B3CC0010000000000000000000000D6F0019105047DLKE4F7A8C6A8C54F2281640ABC518B8A1B where 000D6F0019105047 is the Source IEEE. The local key is mentioned on the device but not in the QR code (so I assume its not needed (?)).

idstein commented 6 months ago

One quick update on the Bosch Twinguard. Bosch QR Code seems to contains straight a link key that is commonly derived from the installation code.

I have successfully paired my Twinguard via ZHA using some small changes on the QR code handling. Zigpy changes are not required. Yet, not sure if the reported values (except maybe humidity and temperature) are correct.

image
tsaG1337 commented 6 months ago

Can you elaborate what these changes were and how you implemented it? Or did you alter the Sourcecode on ZHA?

idstein commented 6 months ago

See https://github.com/home-assistant/core/pull/107460 for further details

Hedda commented 6 months ago

See home-assistant/core#107460 for further details

Nice! Is Bosch Twinguard their only device that needs such a unique solution or could it also be applies to other Bosch devices?

https://github.com/zigpy/zha-device-handlers/issues?q=is%3Aissue+Bosch

idstein commented 6 months ago

Nice! Is Bosch Twinguard their only device that needs such a unique solution or could it also be applies to other Bosch devices?

So far yes it seems that it is their only devices. For Bosch Outdoor Siren I could not verify yet, as I do not have it physically to test. If one could count the characters after DLK in the QR code, we could validate it. 36 hex characters translates to 18 bytes is the installation code (16 bytes) + crc (2 bytes). For 32 hex characters (like Bosch Twinguard) it represents the 16 bytes link key which is the AES MMO hash.

Zigpy internal does not directly passes along the installation code to the coordinator, but computes the AES MMO hash from the 18 bytes installation code + crc.

Mar1usW3 commented 5 months ago

does anyone get this running with Skyconnect?

4s1 commented 5 months ago

Can anyone provide a step by step documentation how to zniff bosch' smart home controller zigbee traffic? I've got an ember stick and am able to capture the encrypted traffic of the controller and a few brand new gen II smart home bosch devices (I've just bought). But I've no cue how to retrieve the network key from the captured traffic.

Okay, figured it out by myself

  1. used an install code from a new device
  2. calculated link key from it (though zigpy.util.convert_install_code(...))
  3. captured zigbee traffic as described here
  4. inserted link key in wireshark zigbee protocol preferences
  5. loaded a capture file (taken while joined the device with the given install code)
  6. filtered for _ws.col.info == "Transport Key" and voila, there it is: Key Type: Standard Network Key (0x01).

Added that key to wiresharks zigbee key list too, now I can see all traffic decrypted.

firstusing commented 4 months ago

With the update of today 2024.02 I could use the QR-Code. After 8 Hours the device did not show any status changes nor sensor output, right now it's unavailable.

4s1 commented 4 months ago

With the update of today 2024.02 I could use the QR-Code. After 8 Hours the device did not show any status changes nor sensor output, right now it's unavailable.

What kind of coordinator do you use? It is known to work with Texas Instrument based adapters (e.g. CC2652), but not with Silicon Labs (e.g. Skyconnect, HA yellow - EFR32 based)

idstein commented 4 months ago

Pairing itself works (manual cluster querying works), but it requires further quirks (manual heartbeat, pairing complete, periodic reporting)

I’ll try to push my changes soon to zha-quirks

firstusing commented 4 months ago

With the update of today 2024.02 I could use the QR-Code. After 8 Hours the device did not show any status changes nor sensor output, right now it's unavailable.

What kind of coordinator do you use? It is known to work with Texas Instrument based adapters (e.g. CC2652), but not with Silicon Labs (e.g. Skyconnect, HA yellow - EFR32 based)

I use Skyconnect and ZHA.

firstusing commented 4 months ago

Pairing itself works (manual cluster querying works), but it requires further quirks (manual heartbeat, pairing complete, periodic reporting)

I’ll try to push my changes soon to zha-quirks

Thank you for your work!

Mar1usW3 commented 4 months ago

With the update of today 2024.02 I could use the QR-Code. After 8 Hours the device did not show any status changes nor sensor output, right now it's unavailable.

What kind of coordinator do you use? It is known to work with Texas Instrument based adapters (e.g. CC2652), but not with Silicon Labs (e.g. Skyconnect, HA yellow - EFR32 based)

I use Skyconnect and ZHA.

Same for me

KorbinianPei commented 4 months ago

Hey everybody, is there still an opportunity to connect the Twinguard via Zigbee in Home Asisstant? Which components are required for this setup than? I would like to buy a smoke detektor which can also measure some other nice things like humidity and air purity. I found the twinguard and it seems like this device would be perfect for this. The problem is the integration into home assistant when the smart home controller should not bei used and the twinguard should run as stand alone device. @idstein do you have found a good solution?

Thanks for helping

Mar1usW3 commented 3 months ago

i just wonder if this a firmware issue or a quirk issue

firstusing commented 3 months ago

@idstein have you a custom quirk to use? Or do you think it can be enabled for ZHA? I do not want to sell the devices but my wife now comes after me :)

KorbinianPei commented 3 months ago

@id Screenshot_20240329_065640_Home Assistant stein have you a custom quirk to use? Or do you think it can be enabled for ZHA? I do not want to sell the devices but my wife now comes after me :)

Hey @firstusing,

I tried the Twinguard with the Zigbee2MQTT Integration an this works fine. So if you would like to use it you could also try this Integration. But therefore you have to switch all your Devices to zigbee2mqtt. This could also be a lot of work.

idstein commented 3 months ago

I fixed the readings for the sensors, but struggling to get a continuous reporting. It looks like the values are not continuously send.

Carbon Monoxide is actually not what the BME sensor provides. There is only a Indexed Air Quality available to indicate roughly VOC.

KorbinianPei commented 3 months ago

I fixed the readings for the sensors, but struggling to get a continuous reporting. It looks like the values are not continuously send.

Carbon Monoxide is actually not what the BME sensor provides. There is only a Indexed Air Quality available to indicate roughly VOC.

The Screenshot is what the zigbee2mqtt Integration provides.

https://www.zigbee2mqtt.io/devices/8750001213.html

I also thought that I red, that the twinguard "only" measures voc instead of co2. But at the end of the day it dose not matter what the Integration shows as long as you know what it means. Are you sure that the ppm value is voc? But except this one failure the values come continious into home Assistant. Until now I tested the twinguard for 3 days.

Also the siren can be switched in home assistant

Screenshot_20240329_083957_Home Assistant Screenshot_20240329_083926_Home Assistant

Mar1usW3 commented 3 months ago

for me z2m with a skyconnect is also not working

firstusing commented 2 months ago

@id Screenshot_20240329_065640_Home Assistant stein have you a custom quirk to use? Or do you think it can be enabled for ZHA? I do not want to sell the devices but my wife now comes after me :)

Hey @firstusing,

I tried the Twinguard with the Zigbee2MQTT Integration an this works fine. So if you would like to use it you could also try this Integration. But therefore you have to switch all your Devices to zigbee2mqtt. This could also be a lot of work.

I have to say i do not see how it works, i changed from ZHA to Z2M completly, the paring does work great but after that.... no measurments at all.

KorbinianPei commented 2 months ago

@id Screenshot_20240329_065640_Home Assistant stein have you a custom quirk to use? Or do you think it can be enabled for ZHA? I do not want to sell the devices but my wife now comes after me :)

Hey @firstusing, I tried the Twinguard with the Zigbee2MQTT Integration an this works fine. So if you would like to use it you could also try this Integration. But therefore you have to switch all your Devices to zigbee2mqtt. This could also be a lot of work.

I have to say i do not see how it works, i changed from ZHA to Z2M completly, the paring does work great but after that.... no measurments at all.

It depends on the z2m version. There are some issues with the new (1.36.1-1) version. You have to go back to the 1.36.0-1 than it should work.

paundl commented 5 days ago

hi @idstein and all others here
i'm trying to get the twinguard working in my network

what i understood in this thread is that with @idstein 's merged pull request binding should work via the QR code
but i'm not able to get my twinguard running

what i did:

then twinguard gets conected to my zigbee network but...

id there somewhere a step by step guide how to add the twinguard via ZHA to homeassistant?

thank you for your input!

UPDATE: i checked the logs and found ... if i try to reconfigure the device:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/device.py", line 604, in async_configure
    await self.identify_ch.trigger_effect(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 81, in wrapper
    with wrap_zigpy_exceptions():
  File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 73, in wrap_zigpy_exceptions
    raise HomeAssistantError(message) from exc
homeassistant.exceptions.HomeAssistantError: Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>

image

MoFa85 commented 3 days ago

Same for me 😕