|
Bogdan Timofte
authored
2 weeks ago
|
1
|
---
|
|
|
2
|
title: "SONOFF SNZB-04 control via MQTT"
|
|
|
3
|
description: "Integrate your SONOFF SNZB-04 via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendor's bridge or gateway."
|
|
|
4
|
addedAt: 2020-07-10T21:02:48Z
|
|
|
5
|
pageClass: device-page
|
|
|
6
|
---
|
|
|
7
|
|
|
|
8
|
<!-- !!!! -->
|
|
|
9
|
<!-- ATTENTION: This file is auto-generated through docgen! -->
|
|
|
10
|
<!-- You can only edit the "Notes"-Section between the two comment lines "Notes BEGIN" and "Notes END". -->
|
|
|
11
|
<!-- Do not use h1 or h2 heading within "## Notes"-Section. -->
|
|
|
12
|
<!-- !!!! -->
|
|
|
13
|
|
|
|
14
|
# SONOFF SNZB-04
|
|
|
15
|
|
|
|
16
|
| | |
|
|
|
17
|
|-----|-----|
|
|
|
18
|
| Model | SNZB-04 |
|
|
|
19
|
| Vendor | [SONOFF](/supported-devices/#v=SONOFF) |
|
|
|
20
|
| Description | Contact sensor |
|
|
|
21
|
| Exposes | battery, voltage, contact, battery_low |
|
|
|
22
|
| Picture |  |
|
|
|
23
|
| White-label | eWeLink RHK06 |
|
|
|
24
|
|
|
|
25
|
|
|
|
26
|
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
|
|
|
27
|
## Notes
|
|
|
28
|
|
|
|
29
|
|
|
|
30
|
### Pairing
|
|
|
31
|
Long press reset button for 5s until the LED indicator flashes three times, which means the device has entered pairing mode
|
|
|
32
|
<!-- Notes END: Do not edit below this line -->
|
|
|
33
|
|
|
|
34
|
|
|
|
35
|
|
|
|
36
|
|
|
|
37
|
## Exposes
|
|
|
38
|
|
|
|
39
|
### Battery (numeric)
|
|
|
40
|
Remaining battery in %.
|
|
|
41
|
Value can be found in the published state on the `battery` property.
|
|
|
42
|
To read (`/get`) the value publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"battery": ""}`.
|
|
|
43
|
It's not possible to write (`/set`) this value.
|
|
|
44
|
The minimal value is `0` and the maximum value is `100`.
|
|
|
45
|
The unit of this value is `%`.
|
|
|
46
|
|
|
|
47
|
### Voltage (numeric)
|
|
|
48
|
Reported battery voltage in millivolts.
|
|
|
49
|
Value can be found in the published state on the `voltage` property.
|
|
|
50
|
To read (`/get`) the value publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"voltage": ""}`.
|
|
|
51
|
It's not possible to write (`/set`) this value.
|
|
|
52
|
The unit of this value is `mV`.
|
|
|
53
|
|
|
|
54
|
### Contact (binary)
|
|
|
55
|
Indicates whether the device is opened or closed.
|
|
|
56
|
Value can be found in the published state on the `contact` property.
|
|
|
57
|
It's not possible to read (`/get`) or write (`/set`) this value.
|
|
|
58
|
If value equals `false` contact is ON, if `true` OFF.
|
|
|
59
|
|
|
|
60
|
### Battery low (binary)
|
|
|
61
|
Indicates whether the battery of the device is almost empty.
|
|
|
62
|
Value can be found in the published state on the `battery_low` property.
|
|
|
63
|
It's not possible to read (`/get`) or write (`/set`) this value.
|
|
|
64
|
If value equals `true` battery low is ON, if `false` OFF.
|
|
|
65
|
|