Skip to content

Commit 33affe1

Browse files
authored
Update Bluetooth.md
1 parent 9479fdb commit 33affe1

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

docs/Bluetooth.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -186,40 +186,42 @@ The naming conventions in the product range of bluetooth sensors in XIAOMI-unive
186186
<th class="th-lboi">CGG1</th>
187187
<th class="th-lboi">CGD1</th>
188188
<th class="th-lboi">MiFlora</th>
189-
<th class="th-lboi">LYWSD03MMC</th>
189+
190190
</tr>
191191
<tr>
192192
<td class="tg-lboi"><img src="../_media/bluetooth/mj_ht_v1.png" width=200></td>
193193
<td class="tg-lboi"><img src="../_media/bluetooth/LYWDS02.png" width=200></td>
194194
<td class="tg-lboi"><img src="../_media/bluetooth/CGG1.png" width=200></td>
195195
<td class="tg-lboi"><img src="../_media/bluetooth/CGD1.png" width=200></td>
196196
<td class="tg-lboi"><img src="../_media/bluetooth/miflora.png" width=200></td>
197-
<td class="tg-lboi"><img src="../_media/bluetooth/LYWSD03MMC.png" width=200></td>
197+
198198
</tr>
199199
<tr>
200200
<td class="tg-lboi">temperature, humidity, battery</td>
201201
<td class="tg-lboi">temperature, humidity</td>
202202
<td class="tg-lboi">temperature, humidity, battery</td>
203203
<td class="tg-lboi">temperature, humidity</td>
204204
<td class="tg-lboi">temperature, illuminance, soil humidity, soil fertility</td>
205-
<td class="tg-lboi">temperature, humidity</td>
206205
</tr>
207206
</table>
208207

209208
<table>
210209
<tr>
210+
<th class="th-lboi">LYWSD03MMC</th>
211211
<th class="th-lboi">NLIGHT</th>
212212
<th class="th-lboi">MJYD2S</th>
213213
<th class="th-lboi">YEE RC</th>
214214
<th class="th-lboi">MHO-C401</th>
215215
</tr>
216216
<tr>
217+
<td class="tg-lboi"><img src="../_media/bluetooth/LYWSD03MMC.png" width=200></td>
217218
<td class="tg-lboi"><img src="../_media/bluetooth/nlight.png" width=200></td>
218219
<td class="tg-lboi"><img src="../_media/bluetooth/mjyd2s.png" width=200></td>
219220
<td class="tg-lboi"><img src="../_media/bluetooth/yeerc.png" width=200></td>
220221
<td class="tg-lboi"><img src="../_media/bluetooth/MHO-C401.png" width=200></td>
221222
</tr>
222223
<tr>
224+
<td class="tg-lboi">temperature, humidity</td>
223225
<td class="tg-lboi">motion</td>
224226
<td class="tg-lboi">motion, illuminance, battery, no-motion-time</td>
225227
<td class="tg-lboi">button press (single and long)</td>
@@ -234,7 +236,9 @@ It is possible to get the necessary decryption key ("bind_key") with the help of
234236
(iOS-example: https://community.home-assistant.io/t/xiaomi-passive-ble-monitor-sensor-platform/177352/101?u=magalex)
235237
This key and the corresponding MAC of the sensor can be injected with the NRFKEY-command (or NRFMJYD2S). It is probably a good idea to save the whole config as RULE like that:
236238

237-
```rule1 on System#Init do backlog NRFkey 00112233445566778899AABBCCDDEEFF112233445566; NRFkey 00112233445566778899AABBCCDDEEFF112233445566; NRFPage 6; NRFUse 0; NRFUse 4 endon```
239+
```haskell
240+
rule1 on System#Init do backlog NRFkey 00112233445566778899AABBCCDDEEFF112233445566; NRFkey 00112233445566778899AABBCCDDEEFF112233445566; NRFPage 6; NRFUse 0; NRFUse 4 endon
241+
```
238242
(key for two sensors, 6 sensors per page in the WebUI, turn off all sensors, turn on LYWS03)
239243

240244
LYWSD03MMC sends encrypted sensor data every 10 minutes. As there are no confirmed reports about correct battery presentation of the sensor (always shows 99%), this function is currently not supported.
@@ -246,9 +250,9 @@ A simplified presence dection will scan for regular BLE advertisements of a give
246250
If the driver receives a packet from the "beacon" a counter will be (re-)started with an increment every second. This timer is published in the TELE-message, presented in the webUI and processed as a RULE.
247251
The stability of regular readings will be strongly influenced by the local environment (many BLE-devices nearby or general noise in the 2.4-GHz-band).
248252

249-
## BLE Sensors using built-in Bluetooth on the ESP32
253+
## BLE Sensors on ESP using built-in Bluetooth
250254

251-
You must [compile your build](Compile-your-build) for the ESP32. Change the following to `my_user_config.h`:
255+
You must [compile your build](Compile-your-build) for the ESP32. Change the following to `user_config_override.h`:
252256

253257
```
254258
#ifdef ESP32
@@ -257,7 +261,8 @@ You must [compile your build](Compile-your-build) for the ESP32. Change the foll
257261
```
258262

259263
To turn on/off support for decyrption, change the following in the driver code:
260-
```
264+
265+
```haskell
261266
#define USE_MI_DECRYPTION
262267
```
263268
Without encryption support the driver will read data from found LYWSD03MMC via connection. This will increase power consumption of the sensor, but no "bind_key" is needed.
@@ -291,7 +296,6 @@ This will update every day at 00:30 AM.
291296
<th class="th-lboi">LYWSD02</th>
292297
<th class="th-lboi">LYWSD03MMC</th>
293298
<th class="th-lboi">CGD1</th>
294-
<th class="th-lboi">MiFlora</th>
295299
</tr>
296300
<tr>
297301
<td class="tg-lboi"><img src="../_media/bluetooth/mj_ht_v1.png" width=200></td>
@@ -305,31 +309,32 @@ This will update every day at 00:30 AM.
305309
<td class="tg-lboi">temperature, humidity, battery</td>
306310
<td class="tg-lboi">temperature, humidity, battery</td>
307311
<td class="tg-lboi">temperature, humidity, battery</td>
308-
<td class="tg-lboi">temperature, illuminance, soil humidity, soil fertility, battery</td>
309312
</tr>
310313
<tr>
311314
<td class="tg-lboi"></td>
312315
<td class="tg-lboi">set time using "MI32Time"<p>toggle temperature units with "MI32Unit"</td>
313316
<td class="tg-lboi"></td>
314317
<td class="tg-lboi">unsupported time or alarm</td>
315-
<td class="tg-lboi"></td>
316318
</tr>
317319
</table>
318320

319321
<table>
320322
<tr>
323+
<th class="th-lboi">MiFlora</th>
321324
<th class="th-lboi">NLIGHT</th>
322325
<th class="th-lboi">MJYD2S</th>
323326
<th class="th-lboi">YEE RC</th>
324327
<th class="th-lboi">MHO-C401</th>
325328
</tr>
326329
<tr>
330+
<td class="tg-lboi">temperature, illuminance, soil humidity, soil fertility, battery</td>
327331
<td class="tg-lboi"><img src="../_media/bluetooth/nlight.png" width=200></td>
328332
<td class="tg-lboi"><img src="../_media/bluetooth/mjyd2s.png" width=200></td>
329333
<td class="tg-lboi"><img src="../_media/bluetooth/yeerc.png" width=200></td>
330334
<td class="tg-lboi"><img src="../_media/bluetooth/MHO-C401.png" width=200></td>
331335
</tr>
332336
<tr>
337+
<td class="tg-lboi"></td>
333338
<td class="tg-lboi">motion, no-motion-time (computed by the driver)</td>
334339
<td class="tg-lboi">motion, illuminance, battery, no-motion-time</td>
335340
<td class="tg-lboi">button press (single and long)</td>

0 commit comments

Comments
 (0)