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
Protocol
03
3
Length
2700
27 bytes
Type
4200
42 (Buzzer Control)
Header Count
0100
1
Header Types
01
1
Message ID
0414000000
14
Payload Count
0200
2
Payload Types
0105
1, 5
Duration
022000
20
Frequency
0400000063
0.5
Checksum
251238
61179
📡 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
Protocol
03
3
Length
2700
27 bytes
Type
4200
42 (Buzzer Control)
Header Count
0100
1
Header Types
01
1
Message ID
0449000000
49
Payload Count
0300
3
Payload Types
010203
1, 2, 3
Duration
0220807
2000
Sound Type
0101
1 (Siren)
Intensity
0101
1
Checksum
226126
32482
📡 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.