Common features
The following features are available for all battery operated Shelly BLU devices. For device specific functions, refer to the corresponding device's page.
Support Over The Air firmware update (OTA)
Keeping up to date with the latest firmware features and bug fixes is important. Fortunately, the Shelly BLU devices are relatively simple and do not require frequent updates if any at all.
Firmware update is acomplished with the help of Shelly BLE Debug mobile application available in Google play and Apple App store or from Shelly Smart Control App available at Google play and Apple App store, if the device is registered in the user's account. The firmware for OTA is encrypted with specific key for the corresponding device.
Important: Failure to finish OTA update will leave the device in bootloader mode. The device will switch itself to sleep mode after 40 seconds. Pressing the button will awake it for another 40 seconds. The OTA process can be repeated from bootloader mode.
Encryption
The connection to the device and the data payload of the BTHome compatible packet support ecryption. Ecryption can be easily done using the Shelly mobile applications. For detailed description see: Encryption
Pairing
The devices can be connected, controlled and modified only from a paired peer. Pairing requires entering a special pairing mode by holding the device's button for more than 10 seconds. Pairing mode is indicated by blue flashing LED on devices with LEDs. If the device is encrypted, the connection to it will require entering the PIN code used for encryption. Pairing mode will be terminated after 1 minute idle, or by connecting to the device. The maximum number of paried devices is 4. Further pairing is possible, but will discard paring keys from the least used peer device.
Beacon mode
With beacon mode activated, the device will periodically emit data packets with its battery level and status. This mode can be used for presence detection, or for keep-alive, or for collecting sensor data from the device. Some devices have beacon mode as their basic functionality and therefore they do not have a corresponding setting for enable/disable beacon mode.
Factory reset
The factory reset function erases all pairing keys from the device and restores the default settings. It can be accomplished either by writting to the factory reset characteristic or by removing the battery, then placing it back and, finally, holding the button of the device for more than 30 seconds.
Common GATT Services and characteristics
Characteristic | UUID | Type | Length | Properties | Function |
---|---|---|---|---|---|
Factory reset | b0a7e40f-2b87-49db-801c-eb3686a24bdb | byte | 1 | Write bonded, write without response bonded | Write 1 to restore factory settings |
Passkey | 0ffb7104-860c-49ae-8989-1f946d5f6c03 | byte | 4 | Write bonded, write without response bonded | User defined passkey for bonding and encryption (0-999999). Little endian encoded |
Beacon mode enabled | cb9e957e-952d-4761-a7e1-4416494a5bfa | byte | 1 | Read, Write bonded, write without response bonded | Enables periodic beacons |
Reconnection Address | 00002a03-0000-1000-8000-00805f9b34fb | byte | 6 | Read | Device MAC address in OTA mode (Bootloader active) |
Encryption key | eb0fb41b-af4b-4724-a6f9-974f55aba81a | byte | 16 | Read bonded | AES CCM encryption key (randomly generated on every change of the passkey) |
Unix time | d56a3410-115e-41d1-945b-3a7f189966a1 | byte | 4 | Read, Write bonded, write without response bonded | Device unix time |
Sample BTHome data | d52246df-98ac-4d21-be1b-70d5f66a5ddb | - | - | Read | Unencrypted BTHome data from the device |
Common BTHome data objects for FW and device identification
The packets is emited at device power on / restart and every 6 hours.
id | name | data type | scale factor | description |
---|---|---|---|---|
0x00 | packet id | uint8 | 1 | revolving counter |
0x01 | battery | uint8 | 1 | battery level in percent (0-100) |
0xF0 | device type id | uint16 | 1 | device internal identification number |
0xF1 | firmware version | uint32 | 1 | firmware version in format major.minor.patch.rc |
Manufacturer data in scan response
Format of AD structures of type Manufacturer-Specific Data (MFD for short) with Allterco's MFID (0x0BA9):
| Length, 1 byte | Type, 1 byte | MFID, 2 bytes | payload, variable size |
The payload contains a variable number of blocks of data, each formatted as:
| block type, 1 byte | block payload, determined by block type | ...
Definined block types:
type | length | contents |
---|---|---|
0x01 | 2 | Shelly bitfield flags, indicating features of the device |
0x0A | 6 | MAC address of the device |
0x0B | 2 | Shelly device model identification |
Shelly-Specific Flags
bit offset | meaning |
---|---|
0 | discoverable |
1 | auth enabled |
2 | RPC-over-BLE enabled |
3 | Buzzer enabled |
4 | In pairing mode |
Shelly device model identification:
id | Long name | Short name |
---|---|---|
0x0001 | Shelly BLU Button1 | SBBT-002C |
0x0002 | Shelly BLU DoorWindow | SBDW-002C |
0x0003 | Shelly BLU HT | SBHT-003C |
0x0005 | Shelly BLU Motion | SBMO-003Z |
0x0006 | Shelly BLU Wall Switch 4 | SBBT-004CEU |
0x0007 | Shelly BLU RC Button 4 | SBBT-004CUS |
0x0008 | Shelly BLU TRV | SBTR-001AEU |