How to get the BTHome encryption key for Shelly H&T (Home Assistant)

Problem overview

When using a Shelly H&T in BTHome (BLE) mode with encryption enabledHome Assistant requires the 128-bit (32-character hexadecimal) encryption key.

However:

  • The Shelly mobile app does not display this key
  • The 6-digit PIN shown in the app is NOT the BTHome encryption key
  • The key cannot be derived from the PIN

As a result, pairing an encrypted BTHome Shelly H&T seems impossible at first.


The solution: Shelly BLE Debug app

Shelly provides a separate utility app called Shelly BLE Debug that reveals the BTHome encryption (bind) keybroadcast by the device.

Screenshot

Important notes about BTHome encryption

  • BTHome supports both encrypted and non-encrypted modes
  • Apps like Home Assistant accept both
  • Encryption is optional, not mandatory
  • Currently Home Assistant does not warn on encryption downgrade. It should be solved shortly: https://github.com/home-assistant/core/pull/159646
  • Shelly BLU TRV devices cannot be encrypted (BTHome used to report temperatures); in addition, if you use an external Shelly sensor (eg. Shelly H&T), it could not be encrypted.

Commentaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *