42: Buzzer Control
Control the buzzer. Either pass duration and frequency, Or all fields without frequency.
Payload
| Field | Name | Description | Type | Unit |
|---|---|---|---|---|
| 1 | Duration | Duration of buzzer in milliseconds | uint16 | |
| 2 | Sound Type | A predefined sound type Possible values:
| uint8 | |
| 3 | Intensity | Intensity of buzzer. [0-2]. Work as frequency control for buzzer types (moving towards and away from resonance). | uint8 | |
| 4 | Run Count | Number of times to run the buzzer | uint8 | |
| 5 | Frequency | Frequency of buzzer of KHz.(if frequency is sent, only duration and frequency parameters will be inside the message) | float32 |
Examples
0.5KHz for 20ms
📡 Real example from RH2 ESP32 Toit on 2025-10-14This example is captured from an RH2 device as part of normal communications over I2C with the ESP32 co-processor, where Toit on the ESP32 made the request.
Siren sound for 2 seconds
📡 Real example from RH2 ESP32 Toit on 2025-10-14This example is captured from an RH2 device as part of normal communications over I2C with the ESP32 co-processor, where Toit on the ESP32 made the request.
Code
For convenience, the following constants can be used to reference this message type.