OpenWonderLabs / SwitchBotAPI-BLE

SwitchBot BLE open API
105 stars 10 forks source link

Add information for Thermometer Hygrometer Indoor Outdoor #29

Closed AdyRock closed 1 year ago

AdyRock commented 1 year ago

Current Situation

There are no details documented for the BLE data format of the Thermometer Hygrometer Indoor Outdoor

Proposed Change

Add the BLE data format information for the Thermometer Hygrometer Indoor Outdoor

Additional Context

I would like to add support for this device

AdyRock commented 1 year ago

I have cracked it. The device Type is 'w' and the temperature and humidity data is in the Manufacture data block as follows:

        const tempSign = (byte11 & 0b10000000) ? 1 : -1;
        const tempC = tempSign * ((byte11 & 0b01111111) + ((byte10 & 0b01111111) / 10));
        const humidity = (byte12 & 0b01111111);

Battery is still in the service data as for other devices.

donavanbecker commented 1 year ago

https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/issues/26

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.