|
14 | 14 | - [0x14 Read Hardware Version](#0x14-read-hardware-version) |
15 | 15 | - [0x30 Setting Temperature Display Mode](#0x30-setting-temperature-display-mode) |
16 | 16 | - [0x31 Read the Display Mode and Value of the Meter](#0x31-read-the-display-mode-and-value-of-the-meter) |
| 17 | +- [Other Devices](#other) |
| 18 | + - [Outdoor Temperature/Humidity Sensor](#outdoor-temperaturehumidity-sensor) |
17 | 19 |
|
18 | 20 | ### Meter Broadcast Message |
19 | 21 |
|
@@ -563,7 +565,42 @@ The temperature value is one decimal, the range is (-20.0 °C ~ 60.0 °C) ;The |
563 | 565 | </tbody> |
564 | 566 | </table> |
565 | 567 |
|
| 568 | +### Other |
| 569 | + |
| 570 | +This section is for devices that don't quite fit the general |
| 571 | +specification above. Data here is unofficial and community provided. |
| 572 | + |
| 573 | +#### Outdoor Temperature/Humidity Sensor |
| 574 | + |
| 575 | +**WoSensorTHO** (Model W3400010) |
| 576 | + |
| 577 | +This device advertises 3 sections: |
| 578 | + |
| 579 | +``` |
| 580 | +# Sample Advertisement |
| 581 | +Length: 0x02, Type: 0x01, Data: bytes('06') |
| 582 | +Length: 0x0F, Type: 0xFF, Data: bytes('6909XXXXXXXXXXXX360302963700') |
| 583 | +Length: 0x06, Type: 0x16, Data: bytes('3DFD770064') |
| 584 | +``` |
| 585 | + |
| 586 | +XXXXXXXXXXXX represents BT device MAC address. |
| 587 | + |
| 588 | +The device type in the Service Data matches that of the WoSensorTH, |
| 589 | +but the data has moved to different locations, so the same code cannot |
| 590 | +be used. |
| 591 | + |
| 592 | +``` |
| 593 | +# Data from Type: 0xFF (Manufacturer Specific Data) |
| 594 | +temp = ((data[10] & 0x0F) * 0.1 + (data[11] & 0x7F)) * (((data[11] & 0x80) > 0 : 1 : -1); |
| 595 | +humidity = data[12] & 0x7F; |
| 596 | +``` |
| 597 | + |
| 598 | +``` |
| 599 | +# Data from Type: 0x16 (Service Data) |
| 600 | +battery_pct = data[5] |
| 601 | +``` |
| 602 | + |
566 | 603 | CopyRight@2022 Wonderlabs, Inc. |
567 | 604 |
|
568 | 605 | ### Back to [Home](https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/) |
569 | | -### Back to [Device Types](../README.md) |
| 606 | +### Back to [Device Types](../README.md) |
0 commit comments